Start recording
Rate limit: Per command · Burst: 4 · Refill: 1 req/s
Start a Recording of the call.
The 202 Accepted response confirms that the command was admitted. It does not confirm that recording has started or that recorded audio is available. Retain the returned recording_uuid to address this recording, and use the returned operation_uuid to correlate the recording lifecycle webhooks below.
Send POST /v1/sessions/{uuid}/recordings as soon as you receive the Session’s session_uuid. Choose the capture boundary with start_only_after_answer:
- By default, inbound and outbound phone Sessions start recording as soon as the current media path permits, including available early media.
- Set
start_only_after_answertotrueto durably wait for the canonical answer instead. If a waiting Session ends first,recording.failedis emitted.
Choose independently for each recording whether to include redacted periods and periods without recordable audio. Omit include_gaps or set it to false to remove those gaps from the artifact. Set it to true to include the gaps as silence.
Each Session independently allows up to four concurrent recordings, including duplicate both + mono recordings. Recordings waiting to start or finish count; recordings for another Session or a Room do not. A Room separately allows one active Room Recording at a time. A fifth request returns HTTP 409 with code concurrent_recording_limit_reached and reserves nothing. Stop one recording and wait for its terminal event before retrying with a new idempotency key. If the response remains 409 briefly, retry after release completes. Voice activity events and their detector configuration are optional and independent for every recording.
Output is 8 kHz mono mixed WAV (both legs combined). Format is not configurable.
Triggered webhooks:
recording.became_availablecarries signedmedia_urlandlive_urlcapabilities;recording.failedis emitted instead if the recording does not become available.- When
enable_voice_activity_eventsis true,recording.speech.startedandrecording.speech.endedreport customer speech transitions for the lifetime of this recording. Sensitivity and speech/silence confirmation durations are configurable.
Use media_url to start at byte zero and follow the growing Recording until
EOF. After finalization, the same URL serves a finite, range-capable WAV. Use
live_url to join near the current position.
Anyone with either URL can access its capability until it expires.
By default, it expires 24 hours after the lifecycle event is emitted.
Tip: Minimize confirmation playback delay. If you plan to play a recording back to the caller for confirmation, start streaming the
media_urlfrom the beginning into an S3 multipart upload as soon asrecording.became_availableprovides it. Afterrecording.ended, let the source stream reach EOF, then complete the multipart upload. Because most of the audio is already in S3, you can start playback without first transferring the entire recording after it ends.Use
media_urlfor this workflow. Thelive_urlstarts at the live edge and does not include audio recorded before you connect.
See Recording lifecycle events for complete payload schemas and examples.
Authentication
Send Authorization: Bearer <app_uuid>:<api_key> using an active API key. See Authentication for details.
Path parameters
Session identifier.
Headers
Optional key for safely retrying mutating requests. An explicitly empty header is treated like omission and does not enable replay protection. See Idempotency for details.
optional client-supplied lowercase RFC-4122 v4 UUID returned as operation_uuid; platform generates one when omitted; correlation metadata distinct from Idempotency-Key.
Request
Output channel layout. Must be mono.
Audio direction relative to the Session. Must be both.
When true, emit recording.speech.started and
recording.speech.ended while this session recording is
active. Detection is passive and does not alter recorded audio.
Omit this field or set it to false to disable these events.
Not supported for type: ws sessions or room recordings.
Controls whether redacted periods and periods without recordable audio are included in the recording’s duration. Omit this field or set it to false to remove those gaps from the artifact. Set it to true to include the gaps as silence.
When true on an inbound or outbound phone Session that has
not answered, durably admit the request and wait for the canonical
answer before starting. Omit this field or set it to false to start
as soon as the current media path permits, including available early
media. Already-answered and type: ws Sessions keep their
immediate behavior.
Required tuning when voice activity events are enabled. Supplying
this object requires
enable_voice_activity_events: true; otherwise the request is
rejected.
Response headers
Server-owned W3C Trace Context for correlating this response with support and observability data. It is present on successful and error responses. A valid incoming traceparent is linked to, but never becomes, the server-owned trace identifier.
Response
Recording identifier starting with rec_.