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

# Listar programaciones

> Obtiene una lista paginada de programaciones de envío de formularios.

## Query Parameters

<ParamField query="patientId" type="string">
  Filtra por paciente.
</ParamField>

<ParamField query="status" type="string">
  Filtra por estado. Valores: `pending`, `sent`, `failed`.
</ParamField>

<ParamField query="limit" type="integer" default="20">
  Número de resultados por página (máximo 100).
</ParamField>

<ParamField query="cursor" type="string">
  Cursor de paginación.
</ParamField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "sch_def456",
        "formId": "form_abc123",
        "patientId": "pat_xyz789",
        "channel": "whatsapp",
        "status": "pending",
        "scheduledAt": "2026-05-15T09:00:00Z",
        "message": "Hola María, te enviamos tu cuestionario de seguimiento semanal.",
        "creditsConsumed": 3,
        "createdAt": "2026-05-14T10:00:00Z"
      },
      {
        "id": "sch_ghi789",
        "formId": "form_def456",
        "patientId": "pat_abc123",
        "channel": "email",
        "status": "sent",
        "scheduledAt": "2026-05-14T08:00:00Z",
        "sentAt": "2026-05-14T08:00:12Z",
        "creditsConsumed": 1,
        "createdAt": "2026-05-13T16:00:00Z"
      }
    ],
    "pagination": {
      "cursor": "eyJpZCI6InNjaF9naGk3ODkifQ==",
      "hasMore": false,
      "limit": 20
    }
  }
  ```
</ResponseExample>

<ResponseField name="data[].sentAt" type="string">
  Fecha y hora en que se envió el formulario (solo si `status` es `sent`).
</ResponseField>


## OpenAPI

````yaml openapi.yml GET /form-schedules
openapi: 3.1.0
info:
  title: LINA Healthcare Platform API
  version: 1.0.0
  description: |
    API de integración para la plataforma LINA Healthcare.
    Todas las rutas requieren un token JWT obtenido intercambiando una API Key.
servers:
  - url: https://api.linahealthcareplatform.com/api/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /form-schedules:
    get:
      tags:
        - Programaciones
      summary: Listar programaciones
      operationId: listFormSchedules
      parameters:
        - name: patientId
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
            enum:
              - pending
              - sent
              - failed
              - completed
              - cancelled
        - name: limit
          in: query
          schema:
            type: integer
        - name: cursor
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Programaciones
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/FormSchedule'
components:
  schemas:
    FormSchedule:
      type: object
      properties:
        id:
          type: string
        formId:
          type: string
        patientId:
          type: string
        channel:
          type: string
        scheduledAt:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - pending
            - sent
            - failed
            - cancelled
            - completed
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Token JWT obtenido via POST /auth/token

````