End a realtime session
POST/v1/realtime/sessions/:session_id/end
Ends one of the caller's voice sessions: a connection holding it closes (1000) and its brief is built; the session stays readable. Ending a session that has already ended returns it unchanged.
Request
Responses
- 200
- 401
- 404
- 409
- 422
- 429
- 500
Successful Response
Authentication failed: the credential is missing, malformed, expired, or revoked.
invalid_token— The access token is invalid.project_disabled— This project is not active.token_expired— The access token has expired.user_disabled— This user is not active.
The requested resource does not exist, or is not visible to the caller.
session_not_found— Session not found
The request conflicts with the current state of the resource.
session_not_realtime— This session is not a voice session.
A request value failed validation; the details array names each offending field.
validation_failed— The request payload failed validation.
Either too many requests (a Retry-After header says when to retry) or the billing account is out of credits (no Retry-After — top up to continue); the code field tells the two apart.
rate_limited— Too many requests. Please slow down.
An unexpected server-side error occurred.
internal— An unexpected error occurred.