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

# Get Recording

> Get recording URLs for a call

Retrieve recording URLs for a specific call. Returns all available recordings (e.g., main conversation, transfer segments). If recordings haven't been synced to permanent storage yet, the original provider URL is returned as a fallback.

## Request Body

<ParamField body="call_id" type="string" required>
  The unique identifier of the call to get recordings for.
</ParamField>

## Response

<ResponseField name="call_id" type="string">
  The call identifier.
</ResponseField>

<ResponseField name="recording_url" type="string">
  URL of the primary recording.
</ResponseField>

<ResponseField name="recordings" type="array">
  Array of all recording segments for this call.

  Each recording contains:

  * `url` — Direct URL to the audio file
  * `label` — Segment type: `main`, `transfer_conference`, `reconnect_to_agent`, etc.
  * `duration_seconds` — Length in seconds
  * `source` — Origin: `signalwire`, `livekit`, or `unknown`
  * `status` — `synced` (permanent URL) or `pending_sync` (provider URL, may expire)
  * `created_at` — ISO 8601 timestamp
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.magpipe.ai/functions/v1/get-signed-recording-url \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"call_id": "7f3d8e00-a1b2-4c3d-9e4f-567890abcdef"}'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.magpipe.ai/functions/v1/get-signed-recording-url',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        call_id: '7f3d8e00-a1b2-4c3d-9e4f-567890abcdef'
      }),
    }
  );

  const { recording_url, recordings } = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.magpipe.ai/functions/v1/get-signed-recording-url',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json',
      },
      json={'call_id': '7f3d8e00-a1b2-4c3d-9e4f-567890abcdef'}
  )

  data = response.json()
  print(f"Recording: {data['recording_url']}")
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "call_id": "7f3d8e00-a1b2-4c3d-9e4f-567890abcdef",
    "recording_url": "https://storage.supabase.co/v1/object/public/recordings/7f3d8e00.mp3",
    "recordings": [
      {
        "url": "https://storage.supabase.co/v1/object/public/recordings/7f3d8e00.mp3",
        "label": "main",
        "duration_seconds": 125,
        "source": "signalwire",
        "status": "synced",
        "created_at": "2024-01-15T10:32:20Z"
      }
    ]
  }
  ```

  ```json Pending Sync Response theme={null}
  {
    "call_id": "8a4f04da-860b-4321-abcd-1234567890ab",
    "recording_url": "https://erik.signalwire.com/api/laml/.../Recordings/abc123.mp3",
    "recordings": [
      {
        "url": "https://erik.signalwire.com/api/laml/.../Recordings/abc123.mp3",
        "label": "main",
        "duration_seconds": 90,
        "source": "signalwire",
        "status": "pending_sync",
        "created_at": "2024-01-15T11:00:00Z"
      }
    ]
  }
  ```

  ```json Error Response theme={null}
  {
    "error": {
      "code": "no_recording",
      "message": "No recording available for this call"
    }
  }
  ```
</ResponseExample>
