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:

actorreasonWhen
parentaccess-revoked-by-parentA parent removed all access to your product in Family Connect
developerdeleted-by-developerYour integration deleted the session with /session/delete
developererased-by-developerYour integration deleted the session with hardDelete: true
developeressential-product-deletedThe 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

FieldTypeRequiredDescription
eventTypestringyesAlways "Session.Delete"
dataobjectyesSession deletion data
data.idstring (UUID)yesSession ID
data.productIdnumberyesProduct ID
data.revocationobjectnoWho ended the session and why
data.revocation.actorstringyesWho ended the session, for example parent or developer
data.revocation.reasonstringyesWhy the session ended, for example access-revoked-by-parent
data.revocation.evidenceobjectnoDetails for the reason, as string values. See below

Evidence

reasonEvidence keys
essential-product-deletedcauseSessionId: 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"
    }
  }
}

On this page