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

# Get recording

> Create a temporary download URL for a completed call recording.

## When to use this endpoint

Use the `callId` from a `call.completed` webhook or CALL event to download a completed call recording. This endpoint returns a temporary URL for one recording; it does not return a list of calls or recordings.

## Recording availability

Call completion and recording availability are separate. If the recording is still being prepared, the endpoint returns `409 Recording is not ready yet.` Retry only after a `409`, using backoff and an application-defined attempt or time limit. Stop retrying and handle every other response according to its documented status.

## Downloading recordings

The `url` expires after 15 minutes. Download the MP3 immediately and store the file in your own retention system. Do not save the URL; request a new one when it expires.


## OpenAPI

````yaml get /calls/{callId}/recording
openapi: 3.0.1
info:
  title: AttentPublicAPI
  version: '2024-05-17T21:09:13Z'
servers:
  - url: https://api.attent.app/v1
security: []
paths:
  /calls/{callId}/recording:
    get:
      tags:
        - Calls
      description: Create a temporary download URL for a completed call recording.
      operationId: getCallRecording
      parameters:
        - name: callId
          in: path
          required: true
          schema:
            type: string
          description: >-
            Call ID from `data.callId` in a call webhook or the event `id` in a
            CALL event.
      responses:
        '200':
          description: A temporary recording download URL was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recordingDownload'
              example:
                url: https://recording-download.example.com/temporary-url
                expiresAt: '2026-06-15T14:45:00.000Z'
                contentType: audio/mpeg
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          description: Call not found, or the call belongs to another organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                example:
                  message: 'Resource not found: Call'
        '409':
          description: The recording is not available yet. Retry this request later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                example:
                  message: Recording is not ready yet.
        '500':
          $ref: '#/components/responses/500'
      security:
        - api_key: []
components:
  schemas:
    recordingDownload:
      type: object
      description: A short-lived URL for downloading a call recording.
      properties:
        url:
          type: string
          format: uri
          description: >-
            Temporary URL for downloading the recording. Download the file
            immediately; do not store this URL.
        expiresAt:
          type: string
          format: date-time
          description: When the temporary URL expires. Request a new URL after this time.
        contentType:
          type: string
          enum:
            - audio/mpeg
          description: MIME type of the downloaded recording.
      required:
        - url
        - expiresAt
        - contentType
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: 'Invalid format for field: phone'
    '401':
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Unauthorized
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Internal Server Error
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````