SessionKit DOCS
Get Started
API Reference Session Terminated
EVENTsessions.terminatedkafka

sessions.terminated

Published to Kafka when a session is terminated (either by the user, TTL expiry, or system cleanup).

The terminated session ID. Organization that owned the session. Termination reason: `user_request`, `ttl_expired`, `error`, `system_cleanup`. Total session duration in seconds. Total pages navigated during the session. ISO 8601 timestamp of termination.

Message Schema

{
  "key": "ses_k8m2n4p6",
  "headers": {
    "event-type": "sessions.terminated",
    "content-type": "application/json"
  },
  "value": {
    "session_id": "ses_k8m2n4p6",
    "org_id": "org_x1y2z3",
    "reason": "ttl_expired",
    "duration_seconds": 1800,
    "pages_visited": 23,
    "terminated_at": "2026-06-23T15:30:00Z"
  }
}
⌘I
AI Assistant

Ask me anything about the documentation.

ESC