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

# List appointments

> Returns a paginated list of appointments. Requires read:appointments scope.



## OpenAPI

````yaml /openapi-v3.json get /appointments
openapi: 3.0.0
info:
  title: Max AI Public API
  description: API for third-party marketplace apps
  version: '3.0'
  contact: {}
servers:
  - url: https://api.maxcare.ai/v3
security: []
tags: []
paths:
  /appointments:
    get:
      tags:
        - Appointments
      summary: List appointments
      description: >-
        Returns a paginated list of appointments. Requires read:appointments
        scope.
      operationId: AppointmentsPublicController_listAppointments
      parameters:
        - name: page
          required: false
          in: query
          description: Page number (1-indexed)
          schema:
            default: 1
            example: 1
        - name: pageSize
          required: false
          in: query
          description: Number of items per page (max 100)
          schema:
            default: 100
            example: 100
        - name: dateFrom
          required: false
          in: query
          description: Filter appointments from this date (ISO 8601)
          schema:
            example: '2025-01-01'
            type: string
        - name: dateTo
          required: false
          in: query
          description: Filter appointments up to this date (ISO 8601)
          schema:
            example: '2025-12-31'
            type: string
        - name: statuses
          required: false
          in: query
          description: Comma-separated list of statuses to filter by
          schema:
            type: array
            items:
              type: string
        - name: facilityId
          required: false
          in: query
          description: Filter by facility ID
          schema:
            type: string
        - name: patientId
          required: false
          in: query
          description: Filter by patient ID
          schema:
            type: string
        - name: sortBy
          required: false
          in: query
          description: Sort field
          schema:
            enum:
              - scheduledStartDate
              - lastSyncedAt
              - status
            type: string
        - name: sortOrder
          required: false
          in: query
          description: Sort direction
          schema:
            enum:
              - asc
              - desc
            type: string
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
          description: Target clinic organization ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAppointmentsSuccessResponseV3'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiUnauthorizedResponse'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiForbiddenResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitResponse'
      security:
        - api-key: []
components:
  schemas:
    ListAppointmentsSuccessResponseV3:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/ListAppointmentsResponseDataV3'
      required:
        - code
        - data
    PublicApiUnauthorizedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unauthorized
        message:
          type: string
          description: Human-readable error message
          example: Invalid or missing API key
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiForbiddenResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: forbidden
        message:
          type: string
          description: Human-readable error message
          example: Insufficient scope
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiRateLimitResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message
          example: Rate limit exceeded. Maximum 1000 requests per 60 seconds.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    ListAppointmentsResponseDataV3:
      type: object
      properties:
        appointments:
          type: array
          items:
            $ref: '#/components/schemas/ExternalAppointmentResponseV3'
        pagination:
          $ref: '#/components/schemas/PaginationInfoResponse'
      required:
        - appointments
        - pagination
    ExternalAppointmentResponseV3:
      type: object
      properties:
        id:
          type: string
          description: Appointment unique identifier
          example: apt_e5f6a7b8c9d04e1f2a3b4c5d6e7f8a9b
        scheduledStartDate:
          type: string
          description: Scheduled start date (ISO 8601)
          example: '2025-01-20T09:00:00.000Z'
        scheduledEndDate:
          type: string
          description: Scheduled end date (ISO 8601)
          nullable: true
          example: '2025-01-20T09:30:00.000Z'
        status:
          type: string
          description: Appointment status
          example: confirmed
        isNewPatient:
          type: boolean
          description: Whether the patient is new
          nullable: true
          example: false
        patientId:
          type: string
          description: Patient ID
          nullable: true
          example: pat_c56103bcd39c46d39f3138dd2b5e05f6
        patientFirstName:
          type: string
          description: Patient first name
          nullable: true
          example: Sarah
        patientLastName:
          type: string
          description: Patient last name
          nullable: true
          example: Johnson
        patientMrn:
          type: string
          description: Patient MRN
          nullable: true
          example: MRN-10042
        providerId:
          type: string
          description: Provider ID
          nullable: true
          example: prv_d4e5f6a7b8c94d0e1f2a3b4c5d6e7f8a
        providerFirstName:
          type: string
          description: Provider first name
          nullable: true
          example: James
        providerLastName:
          type: string
          description: Provider last name
          nullable: true
          example: Wilson
        facilityId:
          type: string
          description: Facility ID
          nullable: true
          example: fac_b2c3d4e5f6a74b8c9d0e1f2a3b4c5d6e
        createdAt:
          type: string
          description: Created timestamp
          example: '2025-01-15T09:30:00.000Z'
      required:
        - id
        - scheduledStartDate
        - scheduledEndDate
        - status
        - isNewPatient
        - patientId
        - patientFirstName
        - patientLastName
        - patientMrn
        - providerId
        - providerFirstName
        - providerLastName
        - facilityId
        - createdAt
    PaginationInfoResponse:
      type: object
      properties:
        page:
          type: number
          description: Current page number
          example: 1
        pageSize:
          type: number
          description: Items per page
          example: 100
        totalCount:
          type: number
          description: Total number of items
          example: 250
        totalPages:
          type: number
          description: Total number of pages
          example: 3
      required:
        - page
        - pageSize
        - totalCount
        - totalPages
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````