Skip to content

end_session message

The last message: the server closes the WebSocket after it (receive_lifecycle_events).

Delivery

On the WebSocket with messages_config.receive_lifecycle_events; to your callback as live.end_session with callback_config.receive_lifecycle_events.

Fields

  • session_id string required

    Identifier of the session.

  • created_at string required

    When the message was sent (ISO 8601, UTC).

  • type "end_session" required
  • data object

    Why the server ended the session itself; absent when the client stopped it.

    default: null

    1 fields
    • reason "max_session_duration" required

      The session reached its maximum duration (max_session_duration_s).

Example

{
"session_id": "string",
"created_at": "string",
"type": "end_session",
"data": {
"reason": "max_session_duration"
}
}