Skip to content

APIKey.issued

Emitted each time an API Key is issued.

APIKey.issue emits APIKey.issued when it completes on an API Key.

PropertyValue
Emitted byAPIKey.issue
NounAPI Key
WakesNone.

Payload

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

FieldTypeRequiredDescription
namestringrequiredAPIKey.issued.
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 its prefix.
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.
data.secretstringrequiredThe full secret. It is returned here once and never again.

Example

JSON
{
  "$id": "https://api.sb/petpantry.shop/events/event_1",
  "$type": "Event",
  "name": "APIKey.issued",
  "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"
    },
    "secret": "sk_live_4f2a…"
  },
  "seq": 1
}