> ## 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.

# Listar citas (agenda)

> Lista las citas visibles para tu API key (el alcance depende del rol de la cuenta), ordenadas por hora de inicio. Filtra por un rango de hora de inicio y por estado; la respuesta es paginada.



## OpenAPI

````yaml /es/scribe-api/openapi.json get /v1/appointments
openapi: 3.1.0
info:
  title: Scribe Public API
  description: >-
    API REST externa para integrarte con la plataforma Telepatia. Autentícate
    con API keys, establece el contexto de consulta y obtén las sesiones de
    scribe.
  version: 0.1.0
servers:
  - url: https://scribe-api.telepatia.ai
    description: Production
security:
  - BearerAuth: []
paths:
  /v1/appointments:
    get:
      tags:
        - Appointments
      summary: Listar citas (agenda)
      description: >-
        Lista las citas visibles para tu API key (el alcance depende del rol de
        la cuenta), ordenadas por hora de inicio. Filtra por un rango de hora de
        inicio y por estado; la respuesta es paginada.
      operationId: api_appointment_list_v1_appointments_get
      parameters:
        - name: startFrom
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Límite inferior de `start` en ISO-8601 (inclusivo).
            title: Startfrom
          description: Límite inferior de `start` en ISO-8601 (inclusivo).
        - name: startTo
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Límite superior de `start` en ISO-8601 (inclusivo).
            title: Startto
          description: Límite superior de `start` en ISO-8601 (inclusivo).
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/AppointmentStatus'
              - type: 'null'
            description: Filtra por uno o más estados (repetible).
            title: Status
          description: Filtra por uno o más estados (repetible).
        - name: consultationInternalId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filtra la reserva que lleva este id de consulta.
            title: Consultationinternalid
          description: Filtra la reserva que lleva este id de consulta.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Número de página (empieza en 1).
            default: 1
            title: Page
          description: Número de página (empieza en 1).
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 1
            description: Número de elementos por página.
            default: 20
            title: Limit
          description: Número de elementos por página.
      responses:
        '200':
          description: Respuesta exitosa
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppointmentListResponse'
        '400':
          description: >-
            Solicitud incorrecta — parámetros inválidos, fallos de validación o
            campos faltantes.
          content:
            application/json:
              examples:
                parameter_missing:
                  summary: Falta un campo obligatorio
                  value:
                    error:
                      type: invalid_request_error
                      code: parameter_missing
                      message: name is required.
                      param: name
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
                parameter_invalid:
                  summary: Valor de campo inválido
                  value:
                    error:
                      type: invalid_request_error
                      code: parameter_invalid
                      message: >-
                        idCountry must be a valid country name, ISO alpha-2, or
                        ISO alpha-3 code.
                      param: idCountry
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
                account_invalid:
                  summary: Cuenta inválida
                  value:
                    error:
                      type: invalid_request_error
                      code: account_invalid
                      message: Account has no valid authId.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: No autorizado — falta la API key o no es válida.
          content:
            application/json:
              examples:
                authentication_required:
                  summary: API key inválida o faltante
                  value:
                    error:
                      type: authentication_error
                      code: authentication_required
                      message: Invalid API key.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Servicio no disponible — una dependencia externa no está disponible.
          content:
            application/json:
              examples:
                service_unavailable:
                  summary: Servicio externo no disponible
                  value:
                    error:
                      type: api_error
                      code: service_unavailable
                      message: >-
                        The service is temporarily unavailable. Please try again
                        later.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    AppointmentStatus:
      type: string
      enum:
        - proposed
        - pending
        - booked
        - arrived
        - checkedIn
        - fulfilled
        - cancelled
        - noshow
        - waitlist
        - enteredInError
      title: AppointmentStatus
      description: >-
        Conjunto de estados de cita de FHIR (refleja AppointmentStatus del
        datalayer). Se usa para validar el filtro `status` de la agenda, de modo
        que un error de escritura devuelva un 400 claro y no un 5xx.
    AppointmentListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AppointmentResponse'
          type: array
          title: Items
          description: Página de citas.
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
          description: >-
            Total de citas que coinciden con el filtro (null en las páginas
            siguientes).
        page:
          type: integer
          title: Page
          description: Número de la página actual (empieza en 1).
        limit:
          type: integer
          title: Limit
          description: Número de elementos por página.
        totalPages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalpages
          description: Número total de páginas (null cuando no se conoce el total).
        hasMore:
          type: boolean
          title: Hasmore
          description: >-
            Si probablemente existe otra página (es preciso en todas las
            páginas).
      type: object
      required:
        - items
        - page
        - limit
        - hasMore
      title: AppointmentListResponse
      description: Lista paginada de citas (la agenda).
    ErrorResponse:
      description: Sobre estandarizado de respuesta de error.
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetailWithRequestId'
      required:
        - error
      title: ErrorResponse
      type: object
    AppointmentResponse:
      properties:
        id:
          type: string
          title: Id
          description: Identificador público estable.
          examples:
            - apt_a1b2c3d4e5f6g7h8
        consultationInternalId:
          anyOf:
            - type: string
            - type: 'null'
          title: Consultationinternalid
          examples:
            - CONSULT-12345
        status:
          type: string
          title: Status
          examples:
            - booked
        start:
          anyOf:
            - type: string
            - type: 'null'
          title: Start
          examples:
            - '2026-09-01T14:00:00.000Z'
        end:
          anyOf:
            - type: string
            - type: 'null'
          title: End
          examples:
            - '2026-09-01T14:30:00.000Z'
        minutesDuration:
          anyOf:
            - type: integer
            - type: 'null'
          title: Minutesduration
          examples:
            - 30
        serviceType:
          anyOf:
            - type: string
            - type: 'null'
          title: Servicetype
          examples:
            - cardiology
        appointmentType:
          anyOf:
            - type: string
            - type: 'null'
          title: Appointmenttype
          examples:
            - follow-up
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          examples:
            - Follow-up
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          examples:
            - Routine check
        scribeSessionModality:
          anyOf:
            - $ref: '#/components/schemas/ScribeSessionModality'
            - type: 'null'
          description: >-
            Cómo se realiza la consulta. Null en una reserva creada antes de que
            existiera este campo, que la app de Scribe trata como presencial.
          examples:
            - TELEMEDICINE
        medicalRecordConfigurationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Medicalrecordconfigurationid
          description: >-
            La plantilla con la que se abre la reserva. Null cuando la reserva
            no indica ninguna o cuando la plantilla se eliminó después.
          examples:
            - mrc_a1b2c3d4e5f6g7h8
        createdAt:
          type: string
          title: Createdat
          description: Fecha y hora ISO-8601 en que se creó la cita.
      type: object
      required:
        - id
        - status
        - createdAt
      title: AppointmentResponse
      description: Una cita. `id` es el id público estable (apt_...).
      examples:
        - appointmentType: follow-up
          consultationInternalId: CONSULT-12345
          createdAt: '2026-08-28T12:00:00.000Z'
          end: '2026-09-01T14:30:00.000Z'
          id: apt_a1b2c3d4e5f6g7h8
          medicalRecordConfigurationId: mrc_a1b2c3d4e5f6g7h8
          minutesDuration: 30
          reason: Follow-up
          scribeSessionModality: TELEMEDICINE
          serviceType: cardiology
          start: '2026-09-01T14:00:00.000Z'
          status: booked
    ErrorDetailWithRequestId:
      description: >-
        Objeto de error de nivel superior: `ErrorDetail` más el id de
        correlación de la solicitud.


        Se mantiene como subclase y no como campo de `ErrorDetail` porque
        `ErrorDetail` también es la forma del error por elemento dentro de la
        respuesta de creación de cuentas en lote (`BatchAccountResult.error`),
        que se serializa incluyendo los nulls. Agregar el campo allí publicaría
        `"requestId": null` en un HTTP 200, y de todos modos solo hay un id de
        solicitud por lote: quien llama en lote lee el encabezado de respuesta
        `X-Request-ID`.
      properties:
        type:
          description: Categoría general del error, para un manejo de alto nivel.
          examples:
            - invalid_request_error
          title: Type
          type: string
        code:
          description: >-
            Código de error legible por máquina. Tu código debe decidir según
            este valor.
          examples:
            - parameter_invalid
          title: Code
          type: string
        message:
          description: Mensaje de error legible por humanos que termina en punto.
          examples:
            - >-
              idCountry must be a valid country name, ISO alpha-2, or ISO
              alpha-3 code.
          title: Message
          type: string
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: El campo de la solicitud que causó el error, si aplica.
          examples:
            - idCountry
          title: Param
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: Contexto opcional, estructurado y legible por máquina, del error.
          examples:
            - pendingConsultations:
                - sessionId: abc123
                  url: https://...
          title: Details
        requestId:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Id único de esta solicitud, idéntico al encabezado de respuesta
            X-Request-ID. Inclúyelo cuando contactes a soporte.
          examples:
            - 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
          title: Requestid
      required:
        - type
        - code
        - message
      title: ErrorDetailWithRequestId
      type: object
    ScribeSessionModality:
      type: string
      enum:
        - IN_PERSON
        - TELEMEDICINE
        - DICTATION
      title: ScribeSessionModality
      description: Modalidades de sesión de scribe admitidas.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key enviada como token Bearer

````

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