Skip to Content
Calls

Read one caller-turn audio clip

Permissioncalls:download-recordingAuthentication
GET
/calls/{id}/turn-audio

Reads a short-lived WAV clip for one archived caller turn. The server resolves the stored object key; client input is never used to construct a storage path. Access is audited and supports one byte range. For repeated warm consultations, select the segment_index returned in user_turn_audio; turn_index is local to each segment. Omitting segment_index selects zero.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Path Parameters

id*string
Formatuuid

Query Parameters

turn_index*integer
Range0 <= value <= 2147483647
leg?string
Default"caller"
Value in"caller""brief"
segment_index?integer

Zero-based consultation segment. For brief recordings this is the transfer attempt minus one. Legacy clips use zero.

Range0 <= value <= 2147483647
Default0
download?boolean

Use attachment rather than inline Content-Disposition.

Defaultfalse
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

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 WAV clip.

response?fileaudio/wav
Formatbinary
Example Request
curl -X GET 'https://api.kejue.co/v1/calls/497f6eca-6276-4993-bfeb-53cbbbba6f08/turn-audio?turn_index=0'
Example Response
"string"