> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onvy.health/llms.txt
> Use this file to discover all available pages before exploring further.

# List facts

> Get paginated list of user facts



## OpenAPI

````yaml /api-reference/openapi.yaml get /users/{user_id}/facts
openapi: 3.1.0
info:
  title: ONVY Health API
  description: >-
    AI-powered holistic health services API with data merging and metrics
    calculation
  version: 1.0.0
  contact:
    name: ONVY Support
    email: support@onvy.health
    url: https://onvy.health
  license:
    name: Proprietary
    url: https://onvy.health/terms
servers:
  - url: https://api.onvy.health
    description: Public API
security:
  - bearerAuth: []
tags:
  - name: static
    description: Static configuration endpoints
  - name: users
    description: User management
  - name: baselines
    description: User baseline metrics
  - name: daily-records
    description: Daily health records
  - name: chat
    description: AI chat completions
  - name: facts
    description: User facts for individualization
  - name: activities
    description: User activities (workouts and mindfulness sessions)
  - name: ai-summaries
    description: |
      AI-generated summaries. This is how ONVY exposes domain-specific
      insights such as meal nutrition analysis, sleep insights, workouts,
      and daily, weekly, nutrition, trend, and impact analysis. Most
      summary types are system-generated; the public create surface
      currently accepts `type=meal`.
  - name: custom-records
    description: Custom records and types
  - name: meals
    description: Nutrition meal tracking
paths:
  /users/{user_id}/facts:
    get:
      tags:
        - facts
      summary: List facts
      description: Get paginated list of user facts
      operationId: listFacts
      parameters:
        - $ref: '#/components/parameters/UserIdParam'
        - $ref: '#/components/parameters/PageParam'
        - $ref: '#/components/parameters/LimitParam'
        - $ref: '#/components/parameters/FactTypeParam'
      responses:
        '200':
          description: List of facts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactList'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    UserIdParam:
      name: user_id
      in: path
      required: true
      description: User ID (e.g., google_104940819145861640201)
      schema:
        type: string
    PageParam:
      name: page
      in: query
      required: false
      description: Page Key for pagination
      schema:
        type: string
    LimitParam:
      name: limit
      in: query
      required: false
      description: Number of items per page
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 100
    FactTypeParam:
      name: type
      in: query
      required: false
      description: Filter by fact type
      schema:
        type: string
        enum:
          - mind
          - body
          - activity
          - nutrition
          - sleep
          - recovery
          - goal
  schemas:
    FactList:
      title: FactList
      type: object
      required:
        - facts
        - pagination
      properties:
        facts:
          type: array
          items:
            title: Fact
            allOf:
              - title: CreateFactRequest
                type: object
                required:
                  - text
                  - type
                properties:
                  source:
                    type: string
                    description: Source of the fact
                    enum:
                      - survey
                      - user_input
                      - coach
                      - integration
                    ref:
                      type:
                        - string
                        - 'null'
                  text:
                    type: string
                    description: Fact text content
                    minLength: 1
                    maxLength: 1000
                  type:
                    type: string
                    description: Fact category
                    enum:
                      - mind
                      - body
                      - activity
                      - nutrition
                      - sleep
                      - recovery
                      - goal
              - type: object
                required:
                  - user_id
                  - created_at
                  - updated_at
                properties:
                  id:
                    type: string
                    description: Unique fact identifier
                  user_id:
                    type: string
                    description: User ID
                  certainty_on_creation:
                    type: number
                    minimum: 0
                    maximum: 1
                    description: Initial certainty score when the fact was created.
                  certainty_on_update:
                    type:
                      - number
                      - 'null'
                    minimum: 0
                    maximum: 1
                    description: >-
                      Most recent certainty score set during an update
                      operation.
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        pagination:
          type: object
          title: Pagination
          required:
            - limit
            - total
          properties:
            page:
              type: string
            limit:
              type: integer
              minimum: 1
              maximum: 1000
            total:
              type: integer
              minimum: 0
            next_page:
              type: string
    ValidationError:
      type: object
      title: ValidationError
      required:
        - error
      properties:
        error:
          type: string
          minLength: 1
      additionalProperties: false
  responses:
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth bearer token for Health API authentication

````