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

# Obtiene una llamada con su transcripción



## OpenAPI

````yaml /openapi/openapi-olivia.yaml get /v1/calls/{callId}
openapi: 3.1.0
info:
  title: OlivIA API
  version: 0.1.0
  description: >
    API externa de OlivIA, la plataforma de seguimiento clínico por voz de
    Omniloy. Permite a un sistema externo (EHR/HIS, CRM o backend propio):

    - Seguimiento (llamadas salientes): inscribir pacientes en un protocolo para
    que OlivIA los llame y complete un cuestionario.

    - Triaje (llamadas entrantes): los resultados de las llamadas de triaje se
    consultan por estos mismos endpoints de lectura.

    - Lectura de resultados: cuestionarios (protocol runs), respuestas, score,
    llamadas, transcripción y grabación.

    Autenticación por API key personal como bearer token (`Authorization: Bearer
    oc_sk_...`). Todas las rutas cuelgan del prefijo `/v1` y las respuestas
    envuelven el contenido en `data`.
servers:
  - url: https://{your-prod-endpoint}
    description: Producción
    variables:
      your-prod-endpoint:
        default: your-prod-endpoint
        description: Sustituye este valor por el host real antes de probar la petición.
  - url: https://{your-dev-endpoint}
    description: Staging
    variables:
      your-dev-endpoint:
        default: your-dev-endpoint
        description: Sustituye este valor por el host de staging.
security:
  - bearerAuth: []
tags:
  - name: Protocolos
    description: Consulta y archivado de protocolos.
  - name: Inscripciones
    description: Inscribir pacientes y consultar inscripciones (seguimiento saliente).
  - name: Cuestionarios
    description: Ejecuciones de protocolo (protocol runs) y sus resultados.
  - name: Llamadas
    description: Detalle de llamadas, transcripción y grabación.
paths:
  /v1/calls/{callId}:
    get:
      tags:
        - Llamadas
      summary: Obtiene una llamada con su transcripción
      operationId: get-call
      parameters:
        - name: callId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Llamada con transcripción (timeline_events)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallResponse'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    CallResponse:
      type: object
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/Call'
            - type: object
              properties:
                timeline_events:
                  type: array
                  items:
                    type: object
                    properties:
                      speaker:
                        type: string
                      content:
                        type: string
                      occurred_at:
                        type: string
                        format: date-time
    Call:
      type: object
      properties:
        id:
          type: string
          format: uuid
        org_id:
          type: string
          format: uuid
        protocol_run_id:
          type: string
          format: uuid
          nullable: true
        patient_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
            - dialing
            - in_progress
            - completed
            - failed
            - no_answer
            - cancelled
            - transferred
        disconnect_reason:
          type: string
          nullable: true
        call_direction:
          type: string
          enum:
            - inbound
            - outbound
        language:
          type: string
        has_recording:
          type: boolean
        scheduled_at:
          type: string
          format: date-time
          nullable: true
        started_at:
          type: string
          format: date-time
          nullable: true
        ended_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
  responses:
    NotFound:
      description: Recurso no encontrado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: oc_sk_ API key

````