Skip to content

APIKey.revoked

Emitted each time an API Key is revoked.

APIKey.revoke emits APIKey.revoked when it completes on an API Key.

PropertyValue
Emitted byAPIKey.revoke
NounAPI Key
WakesNone.

Payload

Each delivery is an Event record. data holds what APIKey.revoke returns.

FieldTypeRequiredDescription
namestringrequiredAPIKey.revoked.
atdatetimerequiredWhen it happened.
seqintegerIts position in the namespace, one more than the Event before; any seq is a cursor into the history.
datajsonrequiredThe Thing as the Action left it.
data.apiKeyAPI KeyrequiredThe API Key, with revokedAt set.
data.apiKey.namestringrequiredWhat the Customer calls it, so a list of keys reads by purpose.
data.apiKey.environmentstringrequiredOne of test or live: a test key reaches test records and moves no money.
data.apiKey.verbslist of VerbThe Verbs it may call. Unset: every Verb the Customer’s Entitlements grant.
data.apiKey.prefixstringThe first characters of the secret, shown in place of it everywhere after issue.
data.apiKey.lastUsedAtdatetimeWhen it last signed a call.
data.apiKey.expiresAtdatetimeWhen it stops working on its own. Unset: it works until rolled or revoked.
data.apiKey.revokedAtdatetimeWhen it was revoked. A revoked key fails its next call.

Example

JSON
{
  "$id": "https://api.sb/petpantry.shop/events/event_1",
  "$type": "Event",
  "name": "APIKey.revoked",
  "at": "2026-10-22T12:00:00Z",
  "data": {
    "apiKey": {
      "$id": "https://api.sb/petpantry.shop/api-keys/api_key_1",
      "$type": "APIKey",
      "name": "Nightly sync",
      "environment": "test",
      "verbs": [
        "verb_1"
      ],
      "prefix": "sk_live_4f2a",
      "lastUsedAt": "2026-10-22T12:00:00Z",
      "expiresAt": "2026-10-22T12:00:00Z",
      "revokedAt": "2026-10-22T12:00:00Z"
    }
  },
  "seq": 1
}