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

# Get a call recording

> Read Nixflex call recording status and obtain a fresh signed download link when available. Handle unavailable, pending and deleted recordings.

**FIXED · account** `DELETE /v1/calls` covers the owning account’s calls and related recordings. It takes no number or campaign filter. Its result reports sms\_deleted=0.

**NOT OFFERED → do this instead · number** There is no bulk erase for just one customer’s number in a shared account. Resolve and verify each tenant-owned call ID, then use single-call deletion.

**YOU CAN CHANGE · agent** New agents inherit account retention on creation. Use the agent update to change its saved call-retention policy.

**SCOPE · call** Read availability first. Stored links expire. Distinguish pending, expired, unavailable and customer storage.

[Read the compact AI rules](https://docs.nixflex.com/ai-rules.md#recordings-retention)

Read recording status and obtain a fresh signed download link when the managed recording is available. This operation does not read or verify an account-connected storage object.

Method: **GET** · Success: **200** · Scope: **Owning account**

**The important part**

* Fetch a fresh link when the user asks to play the recording.
* A missing URL does not confirm deletion; show the returned recording state.

[Business guide](https://docs.nixflex.com/guides/business/call-history.md) · [Developer guide](https://docs.nixflex.com/guides/developer/call-history.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

## Authentication

Send `Authorization: Bearer KEY_ID:KEY_SECRET` using the owning account’s server-side credential.

## Request fields

| Field | Type | Required | Default | Limits and meaning |
| - | - | - | - | - |
| `id` (path) | string | Yes | None | Owned call ID, including a failed-start ID if applicable. Maximum 200 characters. Minimum 1 characters. |

Do not send a request body.

Private recording access uses a 600-second link lifetime; the older path uses 300 seconds. Always follow expires\_at. Signing an existing public object does not make its underlying public URL private. An issued link can stop working early if the content is deleted.

Status meanings: pending means explicit processing; expired means content was removed by retention; customer\_bucket identifies account-connected storage without asserting availability; not\_recorded is a proven never-started call; pending\_deletion hides content while deletion finishes; unavailable is explicit processing failure; unknown means the record cannot prove availability. Missing historical data does not prove recording was switched off.

## Response fields

`200 OK` returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false.

| Field | Type | Meaning |
| - | - | - |
| `call_id` | string | The requested call ID. |
| `status` | string | available has a signed URL; other states do not. Allowed: `"available"`, `"pending"`, `"expired"`, `"customer_bucket"`, `"not_recorded"`, `"pending_deletion"`, `"unavailable"`, `"unknown"`. |
| `url` | string or null | Short-lived download URL only when available. Treat it as a bearer credential and do not log it. |
| `expires_at` | string or null | Expiry of the returned signed URL, or null. Format: date-time. |

## Example request

Raw HTTP base URL: `https://api.nixflex.com/v1`. Node and Python SDK base URL: `https://api.nixflex.com`. The SDK adds `/v1`. Keep `NIXFLEX_API_KEY` in your private process environment. The shell examples use Bash syntax. SDK and CLI examples require Node/CLI 0.11.0 or later and Python 0.4.0 or later. Set `NXF_CALL_ID` to the intended account-owned identifiers or approved recipient before running.

```bash cURL theme={"dark"}
curl --request GET \
  --url "https://api.nixflex.com/v1/calls/$NXF_CALL_ID/recording" \
  --header "Authorization: Bearer $NIXFLEX_API_KEY"
```

```javascript Node theme={"dark"}
import Nixflex from 'nixflex';
const baseUrl = 'https://api.nixflex.com';
const client = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl,maxRetries:0});
const result = await client.calls.recording(process.env.NXF_CALL_ID);
// Handle result privately; do not log secrets or call content.
```

```python Python theme={"dark"}
import os, json
from pathlib import Path
from nixflex import Nixflex
base_url = "https://api.nixflex.com"
with Nixflex(os.environ["NIXFLEX_API_KEY"], base_url=base_url,max_retries=0) as client:
    result = client.calls.recording(os.environ["NXF_CALL_ID"])
# AsyncNixflex supports the same calls with await (and async with).
```

```bash CLI theme={"dark"}
nixflex calls recording "$NXF_CALL_ID" --base-url https://api.nixflex.com --json
```

## Example response

Illustrative `200` response. Identifiers and values are examples; some optional or compatibility fields are omitted.

```json Response theme={"dark"}
{
  "call_id": "call_example",
  "status": "unknown",
  "url": null,
  "expires_at": null
}
```

## Errors

Failures return an `error` object with `code`, `message`, `doc_url` and optional details. Each code links to the shared error catalog. Read the message and details before deciding whether to resend.

| Status | Code | Meaning | What to do |
| - | - | - | - |
| 400 | [`invalid_call_id`](https://docs.nixflex.com/api-reference/errors#invalid_call_id) | The call ID is invalid or exceeds 200 characters. | Use the exact ID returned by a call read. |
| 404 | [`not_found`](https://docs.nixflex.com/api-reference/errors#not_found) | The call is not available to this account. | Check the ID and owning account. |
| 503 | [`call_data_unavailable`](https://docs.nixflex.com/api-reference/errors#call_data_unavailable) | The recording state or signed link could not be verified. | Retry the read; do not label this as not recorded. |
| 401 | [`unauthorized`](https://docs.nixflex.com/api-reference/errors#unauthorized) | The credential is missing or invalid. | Check the full account credential. |
| 429 | [`rate_limit_exceeded`](https://docs.nixflex.com/api-reference/errors#rate_limit_exceeded) | The account request limit was reached. | Wait for Retry-After. Reconcile uncertain writes before resending. |

## Retry and idempotency

This is a read-only request. Retry transient connection or server failures with bounded backoff; respect Retry-After for 429. Do not retry validation or ownership errors unchanged. A later read can return newer state.

## Related endpoints

* [List calls](https://docs.nixflex.com/api-reference/calls/list.md)
* [Get call history](https://docs.nixflex.com/api-reference/calls/get-calls-history.md)
* [Errors and recovery](https://docs.nixflex.com/api-reference/errors.md#error-envelope)


## OpenAPI

````yaml api-reference/public.openapi.json GET /calls/{id}/recording
openapi: 3.1.0
info:
  title: Nixflex public API
  version: 1.0.0
  description: >-
    Nixflex API reference for agents, calls, messaging, knowledge, organisations
    and integrations. Authenticate with the owning account and follow each
    operation’s permissions, response and retry contract.
servers:
  - url: https://api.nixflex.com/v1
security:
  - bearerAuth: []
paths:
  /calls/{id}/recording:
    get:
      tags:
        - Calls
      summary: Get a call recording
      description: >-
        Read recording status and obtain a fresh signed download link when the
        managed recording is available. This operation does not read or verify
        an account-connected storage object. Private recording access uses a
        600-second link lifetime; the older path uses 300 seconds. Always follow
        expires_at. Signing an existing public object does not make its
        underlying public URL private. An issued link can stop working early if
        the content is deleted.


        Status meanings: pending means explicit processing; expired means
        content was removed by retention; customer_bucket identifies
        account-connected storage without asserting availability; not_recorded
        is a proven never-started call; pending_deletion hides content while
        deletion finishes; unavailable is explicit processing failure; unknown
        means the record cannot prove availability. Missing historical data does
        not prove recording was switched off.
      operationId: callRecording
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Owned call ID, including a failed-start ID if applicable.
            minLength: 1
            maxLength: 200
          description: Owned call ID, including a failed-start ID if applicable.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  call_id:
                    type: string
                    description: The requested call ID.
                  status:
                    type: string
                    description: available has a signed URL; other states do not.
                    enum:
                      - available
                      - pending
                      - expired
                      - customer_bucket
                      - not_recorded
                      - pending_deletion
                      - unavailable
                      - unknown
                  url:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Short-lived download URL only when available. Treat it as
                      a bearer credential and do not log it.
                  expires_at:
                    type:
                      - string
                      - 'null'
                    description: Expiry of the returned signed URL, or null.
                    format: date-time
                required:
                  - call_id
                  - status
                  - url
                  - expires_at
                description: ''
                additionalProperties: false
              example:
                call_id: call_example
                status: unknown
                url: null
                expires_at: null
        '400':
          description: >-
            invalid_call_id: The call ID is invalid or exceeds 200 characters.
            Use the exact ID returned by a call read.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '401':
          description: >-
            unauthorized: The credential is missing or invalid. Check the full
            account credential.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '404':
          description: >-
            not_found: The call is not available to this account. Check the ID
            and owning account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '429':
          description: >-
            rate_limit_exceeded: The account request limit was reached. Wait for
            Retry-After. Reconcile uncertain writes before resending.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
        '503':
          description: >-
            call_data_unavailable: The recording state or signed link could not
            be verified. Retry the read; do not label this as not recorded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Error class.
                      code:
                        type: string
                        description: Stable machine-readable code.
                      message:
                        type: string
                        description: Readable refusal or failure reason.
                      doc_url:
                        type: string
                        description: Error documentation URL.
                        format: uri
                      details:
                        type: object
                        properties: {}
                        description: Additional field, operation or outcome details.
                        additionalProperties: true
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                    description: ''
                    additionalProperties: false
                required:
                  - error
                description: ''
                additionalProperties: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A
        verified personal dashboard Bearer session may be used where the
        operation documents role-based access.

````

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