VideohatiDocs
API referencePlayback

End a playback session

End a playback session

POST/v1/playback/sessions/{sid}/end

Marks the session ended with end_reason = client_end. Idempotent: an already-ended or unknown session still returns 204. When the foreground close-drain budget is exhausted the close finishes in the background and the request returns 503 session_close_retryable; retrying the same end returns 204 once the close is durable. Auth: the videohati-session-token header.

Error codes: session_close_retryable (503).

Authentication

  • playbackSessionToken — Playback session ownership token (<sessionId>.<expiryUnix>.<mac>) returned by POST /v1/playback/sessions.

Parameters

NameInTypeRequiredDescription
sidpathstring (Ulid)YesPlayback session id.

Request body

This operation takes no request body.

Responses

StatusMeaning
204Session ended (or was already ended).
503The session close is finishing in the background; retry after the Retry-After interval. The retry is idempotent and returns 204 once the close is durable.