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

# List patients



## OpenAPI

````yaml /openapi.json get /patients
openapi: 3.1.0
info:
  title: Docistra API
  version: 1.0.0
  description: >-
    Connect your software to Docistra in both directions. All times are ISO
    8601; Docistra's clinics run on Cairo time (Africa/Cairo). Every path {id}
    takes Docistra's id or `ext:<your id>`.
servers:
  - url: https://docistra.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Organization
  - name: Patients
  - name: Appointments
  - name: Availability
  - name: Doctors
  - name: Doctor schedule
  - name: Branches
  - name: Reference data
  - name: Webhooks
paths:
  /patients:
    get:
      tags:
        - Patients
      summary: List patients
      operationId: listPatients
      parameters:
        - name: phone
          in: query
          schema:
            type: string
          description: >-
            Any spelling of the number: 01012345678, +201012345678,
            201012345678.
        - name: external_id
          in: query
          schema:
            type: string
        - name: updated_since
          in: query
          schema:
            type: string
            format: date-time
          description: >-
            Only patients changed at or after this time, oldest change first.
            Use it to catch up after downtime.
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: A page of patients
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientList'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
    Cursor:
      name: cursor
      in: query
      schema:
        type: string
      description: '`next_cursor` from the previous page.'
  schemas:
    PatientList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Patient'
        next_cursor:
          type:
            - string
            - 'null'
    Patient:
      type: object
      properties:
        object:
          const: patient
        id:
          type: string
          format: uuid
        external_id:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
          example: '+201012345678'
        contact_phone:
          type:
            - string
            - 'null'
        gender:
          type:
            - string
            - 'null'
          enum:
            - male
            - female
            - other
            - null
        date_of_birth:
          type:
            - string
            - 'null'
          format: date
        age:
          type:
            - integer
            - 'null'
        address:
          type:
            - string
            - 'null'
        nationality:
          type:
            - string
            - 'null'
          description: ISO 3166-1 alpha-2
          example: EG
        file_number:
          type:
            - string
            - 'null'
        holder_id:
          type:
            - string
            - 'null'
          description: 'Set on a family member: the patient whose phone they use.'
        relationship:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: slot_taken
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing, wrong or revoked key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your API key (dk_live_...), from Settings > Integrations > API in
        Docistra.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.