WebhooksEvent types
Session.Delete
Emitted when a session ends. After this event the session no longer exists: /session/get returns HTTP 400 with NOT_FOUND, and the user must complete the age gate again to regain access.
To handle each way a session can end, as part of the full session lifecycle, see Managing sessions and permissions.
A session can end for several reasons. The revocation object says who ended it and why:
actor | reason | When |
|---|---|---|
parent | access-revoked-by-parent | A parent removed all access to your product in Family Connect |
developer | deleted-by-developer | Your integration deleted the session with /session/delete |
developer | erased-by-developer | Your integration deleted the session with hardDelete: true |
developer | essential-product-deleted | The session of the essential product it depends on was deleted with essentialDependencies: cascade |
These values are open sets
k-ID can add new actors, reasons and evidence keys at any time. Treat every Session.Delete as "this user has no session", whatever its revocation says. Branch on actor and reason only for values you know, and ignore the rest.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
eventType | string | yes | Always "Session.Delete" |
data | object | yes | Session deletion data |
data.id | string (UUID) | yes | Session ID |
data.productId | number | yes | Product ID |
data.revocation | object | no | Who ended the session and why |
data.revocation.actor | string | yes | Who ended the session, for example parent or developer |
data.revocation.reason | string | yes | Why the session ended, for example access-revoked-by-parent |
data.revocation.evidence | object | no | Details for the reason, as string values. See below |
Evidence
reason | Evidence keys |
|---|---|
essential-product-deleted | causeSessionId: the deleted session it depended on. causeProductId: that session's product |
Other reasons carry no evidence today.
Examples
{
"eventType": "Session.Delete",
"data": {
"id": "2d064cf7-0726-4193-b19a-8bd387937e60",
"productId": 42,
"revocation": {
"actor": "parent",
"reason": "access-revoked-by-parent"
}
}
}