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

# Get call recording

> Mint a short-TTL signed recording URL (opt-in recordings:read scope).

Requires **`recordings:read`** (opt-in at key approval).

Returns `{ url, expiresAt }` — the URL redirects to media without an API key until expiry. List/detail endpoints never return permanent storage URLs.


## OpenAPI

````yaml openapi.json GET /api/v1/calls/{id}/recording
openapi: 3.0.3
info:
  title: Ondial Public API
  version: 1.0.0
  description: >-
    Tenant API-key surface for lead ingest, contacts (including dial
    conversation + analysis), unified call analytics, credit ledger, tenant
    webhooks, events, inbound agents, company profiles, and knowledge-base
    documents.


    **Campaign definition is UI-only** — create and start an API-ingest campaign
    in the dashboard, then push leads here.


    **Auth:** `Authorization: Bearer ond_live_…` or `ond_test_…` (or
    `X-API-Key`). Keys are requested in **API Access** with a friendly **key
    name**, then approved by Super Admin (not self-serve). Tenants can rename
    keys later without rotating the secret.


    **Scopes:** Defaults include `calls:read`, `credits:read`, `webhooks:write`,
    plus lead/inbound. Opt-in at approval: `companies:*`, `knowledge:*`,
    `analytics:read`, `recordings:read`. Missing scope → `403 forbidden`.


    **Sandbox** keys never place PSTN dials or live WhatsApp/email and do not
    burn credits (KB upload skips debit).


    **Security:** Company responses never include SMTP/WhatsApp credentials. KB
    v1 is metadata-only — no file download. Recordings use short-TTL signed URLs
    only.


    **Kill switch:** Super Admin can disable all `/api/v1/*` (`503` /
    `api_globally_disabled`) without stopping UI CSV campaigns.


    **Compliance:** Call channel requires `consent.outboundCall: true` and phone
    not on tenant/platform DNC.
servers:
  - url: https://dashboard.ondial.ai
    description: Production
  - url: http://localhost:3001
    description: Local
security:
  - BearerAuth: []
tags:
  - name: Core
    description: Auth check and lead ingest
  - name: Contacts
    description: Status, dials/conversation/analysis, cancel, delete, follow-ups, list
  - name: Calls
    description: >-
      Unified inbound + outbound call feed, active calls, and signed recordings
      (scopes: calls:read, recordings:read)
  - name: Analytics
    description: 'Call aggregates by day/agent/campaign (scope: analytics:read)'
  - name: Credits
    description: 'Wallet balance and credit ledger (scope: credits:read)'
  - name: Webhooks
    description: 'Register HTTPS tenant webhooks (scope: webhooks:write)'
  - name: Events
    description: ERP event bus slice — eventType → campaign
  - name: Outbound
    description: >-
      Read-only campaign lookup for API / Custom CRM. Create and start campaigns
      in the dashboard.
  - name: Inbound agents
    description: Configure inbound agents; list/buy pool numbers; read credits
  - name: Companies
    description: >-
      Company profile CRUD (requires companies:read / companies:write scopes).
      Never returns SMTP or WhatsApp credentials.
  - name: Knowledge bases
    description: >-
      Knowledge document upload/list/delete (requires knowledge:read /
      knowledge:write scopes). Metadata only — no file download via API.
paths:
  /api/v1/calls/{id}/recording:
    get:
      tags:
        - Calls
      summary: Get signed recording URL
      description: >-
        With API key + recordings:read returns a short-TTL signed URL. The
        signed URL itself redirects to the media without an API key.
      operationId: getCallRecording
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: token
          in: query
          schema:
            type: string
          description: Signed token (redirect mode)
      responses:
        '200':
          description: Signed URL mint
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  expiresAt:
                    type: string
                    format: date-time
                  callId:
                    type: string
        '302':
          description: Redirect to media when token is valid
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Missing, invalid, or inactive API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error: Invalid or inactive API key
            reasonCode: unauthorized
    Forbidden:
      description: Missing required API key scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error: Insufficient scope
            reasonCode: forbidden
            missing:
              - calls:read
    NotFound:
      description: Not found or not owned
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error: Not found
            reasonCode: not_found
  schemas:
    ErrorBody:
      type: object
      properties:
        error:
          type: string
        reasonCode:
          type: string
        missing:
          type: array
          items:
            type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ond_live | ond_test
      description: >-
        Paste only your API key (`ond_live_…` or `ond_test_…`). Do not type the
        word Bearer — the playground adds it.

````