Skip to content

Recordings

Stream a call recording through Foan. Needs recordings:read.

GET /voice-sessions/{sessionId}/recording

Streams the call’s audio recording (usually audio/ogg). Supports HTTP Range requests for seeking (206 Partial Content). The call must belong to the API key’s organisation. This is the URL every recordingUrl in call responses points to.

Scope: recordings:read

Parameters

Name In Type Required Description
sessionId path string yes Call (voice session) ID.
Range header string no Optional byte range, for example bytes=0-65535.

Example request

Terminal window
curl -X GET "https://api.foan.ai/api/v1/voice-sessions/{sessionId}/recording" \
-H "Authorization: Bearer $FOAN_API_KEY"

Response 200

Errors

Code When
401 Missing, invalid or revoked API key, or the key’s owner is deactivated or no longer in the organisation.
403 Missing recordings:read scope, the call belongs to another organisation, or the call does not exist.
404 The call has no recording yet.
429 Rate limited
500 Recording could not be fetched, or sessionId is not a valid 24-character hex ID.