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

# List appointments (agenda)

> Copy into Cursor/Claude/Copilot to scaffold a GET /v1/appointments integration.

Drop this prompt into your AI coding assistant. It already includes the contract, auth, and error envelope so the generated code matches the production API.

<CodeGroup>
  ```text Prompt theme={null}
  You are integrating Telepatia Synapse Public API.

  Endpoint: GET /v1/appointments
  Base URL: https://scribe-api.telepatia.ai
  Auth: Authorization: Bearer ${SYNAPSE_API_KEY}

  Request:
  - startFrom [query]: string (optional) — ISO-8601 lower bound on start (inclusive).
  - startTo [query]: string (optional) — ISO-8601 upper bound on start (inclusive).
  - status [query]: array<AppointmentStatus> (optional) — Filter by one or more statuses (repeatable).
  - consultationInternalId [query]: string (optional) — Filter to the booking that carries this consultation id.
  - page [query]: integer (optional, min=1) — Page number (1-based).
  - limit [query]: integer (optional, min=1, max=50) — Number of items per page.

  Success 200:
  - items: array<AppointmentResponse>
  - total?: integer
  - page: integer
  - limit: integer
  - totalPages?: integer
  - hasMore: boolean

  Errors (envelope: { error: { type, code, message, param? } }):
  - 400: parameter_missing, parameter_invalid, account_invalid
  - 401: authentication_required
  - 503: service_unavailable

  Generate code in the language of the current file that:
  1. Reads SYNAPSE_API_KEY from env (do not hardcode it).
  2. Calls the endpoint with typed request and response.
  3. Maps the error envelope to typed exceptions per status code.
  4. Adds one happy-path test using the Bearer token.
  ```

  ```bash curl theme={null}
  curl -X GET https://scribe-api.telepatia.ai/v1/appointments \
    -H "Authorization: Bearer $SYNAPSE_API_KEY"
  ```
</CodeGroup>
