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

# Retrieve a call

> Includes the transcript.



## OpenAPI

````yaml /openapi.yaml get /calls/{call_id}
openapi: 3.1.0
info:
  title: NewLead API
  version: 1.0.0
  description: >-
    The NewLead public API. Each API key belongs to one subaccount and can read
    and change only that subaccount's data. Errors, pagination, idempotency and
    rate limits are documented at https://docs.newlead.ai.
servers:
  - url: https://rest.newlead.ai/v1
security:
  - BearerAuth: []
  - ApiKeyHeader: []
tags:
  - name: Specification
    description: This document.
paths:
  /calls/{call_id}:
    parameters:
      - $ref: '#/components/parameters/CallId'
    get:
      tags:
        - Calls
      summary: Retrieve a call
      description: Includes the transcript.
      operationId: getCall
      responses:
        '200':
          description: The call, with transcript.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallDetail'
        '429':
          $ref: '#/components/responses/RateLimited'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
components:
  parameters:
    CallId:
      name: call_id
      in: path
      required: true
      description: The call id.
      schema:
        type: string
        format: uuid
  headers:
    X-Request-ID:
      description: The id of this request. Quote it when you contact support.
      schema:
        type: string
    RateLimit-Limit:
      description: Requests allowed per minute for this API key.
      schema:
        type: integer
    RateLimit-Remaining:
      description: Requests left in the current minute.
      schema:
        type: integer
    RateLimit-Reset:
      description: Seconds until the counter resets.
      schema:
        type: integer
    Retry-After:
      description: Seconds to wait before repeating the request.
      schema:
        type: integer
    Idempotent-Replayed:
      description: true when the response is the stored one for a repeated Idempotency-Key.
      schema:
        type: string
        const: 'true'
  schemas:
    CallDetail:
      description: The call, with its transcript.
      allOf:
        - $ref: '#/components/schemas/Call'
        - type: object
          required:
            - transcript
          properties:
            transcript:
              type: array
              items:
                $ref: '#/components/schemas/CallTranscriptSegment'
    Call:
      type: object
      additionalProperties: false
      required:
        - object
        - id
        - voice_agent_id
        - lead_id
        - direction
        - from
        - to
        - status
        - end_reason
        - outcome
        - summary
        - variables
        - started_at
        - ended_at
        - duration_sec
        - recording_url
        - transcript_ready
      properties:
        object:
          type: string
          const: call
        id:
          type: string
          format: uuid
        voice_agent_id:
          type: string
          format: uuid
        lead_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            The call's lead; null if it could not be matched to one, for example
            with a hidden number, or if the lead was deleted.
        direction:
          $ref: '#/components/schemas/CallDirection'
        from:
          type:
            - string
            - 'null'
          description: >-
            The caller, in E.164: the lead on an inbound call, your number on an
            outbound one. null if unknown.
        to:
          type:
            - string
            - 'null'
          description: >-
            The callee, in E.164: your number on an inbound call, the lead on an
            outbound one.
        status:
          $ref: '#/components/schemas/CallStatus'
        end_reason:
          type:
            - string
            - 'null'
          description: >-
            Why it ended: agent_ended, caller_hangup, caller_silent,
            max_duration, no_answer, busy, voicemail_detected, error...; on
            rejected calls, rejected_balance, rejected_plan... The list can
            grow.
        outcome:
          type:
            - string
            - 'null'
          description: >-
            How the call ended for the business (booked, qualified,
            not_interested...), if the agent set it.
        summary:
          type:
            - string
            - 'null'
          description: >-
            What happened on this call, written by the AI at hang-up. Not the
            lead summary.
        variables:
          type: object
          description: >-
            The agent fields the AI extracted from the call at hang-up, each
            with its confidence from 0 to 1: the same as the call.analyzed
            webhook. Only fields with enough confidence are copied to the lead.
            Empty until the analysis finishes.
          additionalProperties:
            type: object
            additionalProperties: false
            required:
              - value
              - confidence
            properties:
              value:
                type:
                  - string
                  - number
                  - boolean
                  - 'null'
              confidence:
                type: number
        started_at:
          type: string
          format: date-time
        ended_at:
          type:
            - string
            - 'null'
          format: date-time
        duration_sec:
          type:
            - integer
            - 'null'
        recording_url:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            GET /calls/{call_id}/recording on this API, which redirects to the
            audio. null if there is no recording.
        transcript_ready:
          type: boolean
          description: >-
            Whether the transcript is ready. The text is in GET
            /calls/{call_id}.
        transcript:
          type: array
          description: 'Only in GET /calls/{call_id}: what was said, in order.'
          items:
            $ref: '#/components/schemas/CallTranscriptSegment'
    CallTranscriptSegment:
      type: object
      additionalProperties: false
      required:
        - role
        - text
        - start_ms
        - end_ms
      properties:
        role:
          type: string
          enum:
            - lead
            - agent
          description: 'lead: the person. agent: the voice agent.'
        text:
          type: string
        start_ms:
          type: integer
          description: Milliseconds from the start of the recording.
        end_ms:
          type:
            - integer
            - 'null'
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - type
            - code
            - message
            - param
            - request_id
            - doc_url
          properties:
            type:
              $ref: '#/components/schemas/ErrorType'
            code:
              $ref: '#/components/schemas/ErrorCode'
            message:
              type: string
              description: 'A human-readable explanation. It can change: never match on it.'
            param:
              type:
                - string
                - 'null'
              description: The offending field, dot-separated (variables.city), or null.
            request_id:
              type: string
              description: The same value as the x-request-id header.
            doc_url:
              type: string
              format: uri
            details:
              type: object
              additionalProperties: true
              description: >-
                On agent_not_ready, carries blockers. On send_outcome_unknown
                from POST /calls, carries call_id if the call is known.
      examples:
        - error:
            type: invalid_request_error
            code: parameter_invalid
            message: phone must match pattern "^\+[1-9]\d{6,14}$".
            param: phone
            request_id: req_m3k2a9_4f1c2b7e
            doc_url: https://docs.newlead.ai/errors#parameter_invalid
    CallDirection:
      type: string
      enum:
        - inbound
        - outbound
        - web
      description: >-
        inbound: someone called you by phone. outbound: the agent placed the
        call. web: from the web chat.
    CallStatus:
      type: string
      enum:
        - in_progress
        - completed
        - failed
        - dropped
        - no_answer
        - rejected
      description: >-
        in_progress: ongoing. completed: finished. failed: failed while dialing,
        opening the room or during the call. dropped: cut off without the agent
        ending it. no_answer: nobody picked up. rejected: never handled (no
        balance, plan without calls, unknown number); end_reason says why.
    ErrorType:
      type: string
      enum:
        - invalid_request_error
        - authentication_error
        - billing_error
        - permission_error
        - not_found_error
        - conflict_error
        - rate_limit_error
        - api_error
        - provider_error
    ErrorCode:
      type: string
      description: >-
        The closed list of error causes. The table is at
        https://docs.newlead.ai/errors.
      enum:
        - parameter_missing
        - parameter_invalid
        - parameter_unknown
        - body_invalid_json
        - recipient_invalid
        - api_key_missing
        - api_key_invalid
        - insufficient_balance
        - subscription_inactive
        - api_key_forbidden
        - feature_disabled
        - resource_not_found
        - route_not_found
        - agent_not_ready
        - lead_do_not_contact
        - lead_ai_paused
        - lead_ai_not_paused
        - messaging_window_closed
        - template_not_approved
        - outside_initiation_hours
        - voice_number_missing
        - webhook_endpoint_limit_reached
        - webhook_endpoint_disabled
        - idempotency_key_reused
        - idempotency_key_in_use
        - rate_limit_exceeded
        - internal_error
        - provider_unavailable
        - send_outcome_unknown
  responses:
    RateLimited:
      description: Too many requests for this API key. Wait for Retry-After and repeat.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error:
      description: An error. type is the family and code is the cause.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        Idempotent-Replayed:
          $ref: '#/components/headers/Idempotent-Replayed'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        The API key, created in Settings › API, in the header Authorization:
        Bearer <key>. The default.
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: The same key, in the x-api-key header. Still accepted.

````

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