Skip to Content
Calls

Download a call recording

Permissioncalls:download-recordingAuthentication
GET
/calls/{id}/recording

Break-glass read of a KMS-encrypted recording. reason, when sent, is written to the audit log; see the parameter for when it is required. Select either one exact recording_id, or a role/leg/segment tuple; mixing these selectors returns 400. Supports exactly one HTTP byte range and always returns the canonical JSON error envelope on failure.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Query Parameters

reason?string

Human audit justification, recorded on the access audit row whenever it is sent. Whether it is required depends on the workspace's sensitive-data access mode. In reason mode it is required (at least 8 characters) on the transcript, recording and tool-I/O reads, and omitting it returns 400. In approval mode a user reads under an approved access request instead (the approved request's reason is recorded), while an API key keeps the reason rule. In open mode it is optional. Per-turn audio never requires it in any mode. Control characters are rejected.

Length1 <= length <= 500
recording_id?string

Exact recording row. Mutually exclusive with role, leg, and segment_index.

Formatuuid
role?string
Default"agent"
Value in"agent""caller""mixed"
leg?string
Default"caller"
Value in"caller""brief"
segment_index?integer
Range0 <= value <= 2147483647
Default0
download?boolean

Use attachment rather than inline Content-Disposition.

Defaultfalse

Header Parameters

Range?string

One RFC 9110 byte interval. Multiple ranges are rejected with 416 and a JSON error envelope.

Match^bytes=(?:[0-9]+-[0-9]*|-[0-9]+)$

Response Body

Complete decrypted Ogg/Opus recording.

response?fileaudio/ogg
Formatbinary
Example Request
curl -X GET 'https://api.kejue.co/v1/calls/497f6eca-6276-4993-bfeb-53cbbbba6f08/recording'
Example Response
"string"