Skip to main content
POST
End a session
Requests termination. Two outcomes:
  • 200 - the session is fully ended (pending: false, session.status ENDED, durationSeconds set).
  • 202 - termination was accepted and session cleanup is still in flight (pending: true, session.workerStatus ENDING). Poll session status until ENDED.
reason is an optional free-form string stored with the session. Repeating the call while cleanup runs is safe; once ended it returns 400 SESSION_ALREADY_ENDED. The session’s workerAssignment carries terminationReason (for example user_requested, worker_requested, no_audio_timeout, beta_max_duration) alongside terminationRequestedAt. A new session can be started while the previous one is still ENDING - the concurrency slot is freed when termination is requested.

Authorizations

x-api-key
string
header
required

FaceMode API key (fm_...).

Path Parameters

id
string<uuid>
required

Session ID (UUID).

Body

application/json
reason
string

Optional free-form termination reason recorded with the session.

Response

Session ended.

message
string
Example:

"Session ended successfully"

pending
boolean
Example:

false

session
object