Skip to main content

Recordings

List and download call recordings for the campaigns a key may read.

List a call's recordings

GET/v1/integrations/calls/{callId}/recordings

Scope recordings.read

Lists the recordings of a human call that are ready to download. Needs the recordings.read scope with the call's campaign selected on the key. Calls in other campaigns return 404, so the response never reveals whether they exist. Subscribe to recording.available to learn when to call this.

Path parameters

  • callIdstring (uuid)required

    Call ID (from a call event).

Responses

Downloadable recordings.

  • itemsarray of objectrequired

    The records in this response, in the documented order.

Errors

  • 403 ForbiddenPARTNER_SCOPE_FORBIDDENThe key lacks the recordings.read scope.
  • 404 Not FoundRECORDING_NOT_FOUNDThe call or recording does not exist or the key cannot see it.
  • 502 Bad GatewayTelephony returned an error; error.code names it. Retry shortly.
  • 503 Service UnavailableA service this operation depends on is temporarily unavailable; retry with backoff.

Also, like every operation: 401 invalid key, 429 rate limited and 500 unexpected error. Errors and retries

Request
BASE="https://lms.iotindia.ai/v1/integrations"CALL_ID="6f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f"curl "$BASE/calls/$CALL_ID/recordings" \  -H "Authorization: Bearer $LMS_API_KEY"
Example response (200 OK) (200 OK)
{  "items": [    {      "id": "rec_01HZX4",      "type": "STEREO_MASTER",      "format": "wav"    }  ]}

Download a recording

GET/v1/integrations/calls/{callId}/recordings/{recordingId}/content

Scope recordings.read

Streams the audio of a listed recording. Send a single Range: bytes=… header to resume a download or seek; the response is then 206 Partial Content. Needs the recordings.read scope with the call's campaign selected.

Path parameters

  • callIdstring (uuid)required

    Call ID.

  • recordingIdstringrequired

    Recording ID from the recording list.

    pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$

Headers

  • Rangestringoptional

    One byte range, for example bytes=0-1048575.

Responses

The whole recording.

Headers

  • Accept-Ranges Always bytes.
  • Content-Length Size of the audio in bytes.

Errors

  • 403 ForbiddenPARTNER_SCOPE_FORBIDDENThe key lacks the recordings.read scope.
  • 404 Not FoundRECORDING_NOT_FOUNDThe call or recording does not exist or the key cannot see it.
  • 502 Bad GatewayTelephony returned an error; error.code names it. Retry shortly.
  • 503 Service UnavailableA service this operation depends on is temporarily unavailable; retry with backoff.

Also, like every operation: 401 invalid key, 429 rate limited and 500 unexpected error. Errors and retries

Request
BASE="https://lms.iotindia.ai/v1/integrations"CALL_ID="6f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f"RECORDING_ID="rec_01HZX4"curl "$BASE/calls/$CALL_ID/recordings/$RECORDING_ID/content" \  -H "Authorization: Bearer $LMS_API_KEY" \  --fail -o recording.wav# Resume or seek: ask for one byte range (206 Partial Content).curl "$BASE/calls/$CALL_ID/recordings/$RECORDING_ID/content" \  -H "Authorization: Bearer $LMS_API_KEY" \  -H "Range: bytes=0-1048575" \  --fail -o recording-part.wav
    Recordings API · IoTIndia developers