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

# Download Call Recording

> Returns the call recording as an audio file download, converted on each request (it can take a few seconds for long calls). `mp3`: 64 kbps mono, sent in chunks. `wav`: 16-bit PCM, 16 kHz mono. Range requests are not supported.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/voice-agents/conversation/{conversationId}/recording
openapi: 3.0.1
info:
  title: Hamsa API
  description: >-
    The Hamsa API: voice agents and their calls, phone numbers, batch calls and
    knowledge bases; speech to text, text to speech, voices and AI content.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/voice-agents/conversation/{conversationId}/recording:
    get:
      summary: Download a call recording
      description: >-
        Returns the call recording as an audio file download, converted on each
        request (it can take a few seconds for long calls). `mp3`: 64 kbps mono,
        sent in chunks. `wav`: 16-bit PCM, 16 kHz mono. Range requests are not
        supported.
      parameters:
        - in: path
          name: conversationId
          required: true
          description: ID of the call.
          schema:
            type: string
            maxLength: 150
            example: 849e77c6-5cb3-479a-a985-7fab630e2c78
        - in: query
          name: format
          required: false
          description: Audio format of the file.
          schema:
            type: string
            enum:
              - mp3
              - wav
            default: mp3
            example: mp3
      responses:
        '200':
          description: The recording as a file attachment.
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
            audio/wav:
              schema:
                type: string
                format: binary
        '400':
          description: Invalid `format` (`RecordingFormatMustBeValid`) or call ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: 'Unauthorized: missing or invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '403':
          description: >-
            Your API key or role does not have the `call_history:read`
            permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: The call is not in your project, or it has no recording.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '422':
          description: The recording could not be decoded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '502':
          description: The recording could not be fetched from storage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '503':
          description: >-
            Too many conversions are running: retry after the `Retry-After`
            header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
          description: >-
            Service error code: the HTTP status with a service prefix (for
            example `8404`). Missing when the service has no code for that
            status.
          example: 8404
        message:
          type: string
          description: >-
            What went wrong. Some services (calls and recordings) put the error
            key here, for example `CallNotFoundOrUnavailable`, and send no
            `messageKey`.
          example: Policy not found!
        messageKey:
          type: string
          description: >-
            Stable key for the error, safe to match on in code. Not returned by
            every service.
          example: PolicyNotFound
        params:
          type: object
          additionalProperties: true
          description: >-
            Details for some errors (for example `reason`). Not returned by
            every service.
          example:
            reason: NO_DRAFT
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````

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