> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vivix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# session.closed

When a session closes, the service attempts to send this event before disconnecting the remaining control connections. When received, stop sending controls and clean up local media. Do not rely on this event alone: it may be missed if the connection has already closed. It means realtime interaction has ended, but asynchronous resource cleanup may still be in progress. Use Get Session for authoritative lifecycle state.

## Event fields

<ResponseField name="event_id" type="string" required />

<ResponseField name="type" type="string" required />

<ResponseField name="session_id" type="string" required />

<ResponseField name="reason" type="string" required />

<ResponseExample>
  ```json session.closed theme={null}
  {
    "type": "session.closed",
    "event_id": "evt_123",
    "session_id": "d411368c-714e-4951-9a28-c11c083d07d8",
    "reason": "interaction_idle_timeout"
  }
  ```
</ResponseExample>
