GuideEvent Catalog

Event Catalog

Reference documentation for SmartphoneKey EventBridge events available to partners.

This catalog describes the highest-value events published by SmartphoneKey. For each event you'll find the source, when it fires, and the key fields in its payload.

For the complete list of every emitted detail-type, see Partner Webhooks.

All spk.api events share the same envelope structure. The domain payload is wrapped in a detail object that carries projection metadata plus the original event under data:

{
  "source": "spk.api",
  "detail-type": "<EventName>",
  "detail": {
    "partnerId": "<your-orgId>",
    "aggregateType": "<lock|user|hub|...>",
    "aggregateId": "<aggregate uuid>",
    "version": 7,
    "timestamp": 1745922600123,
    "data": { /* event-specific payload — see below */ }
  }
}

detail.timestamp is the projection time as epoch milliseconds (a number). The ISO-8601 timestamp inside detail.data.timestamp is the domain-event time. The fields documented below describe detail.data — the actual domain event.


Lock Events

LockCreated

Sourcespk.api
detail-typeLockCreated
aggregateTypelock

Fires when a new lock is created in the system.

Payload fields (detail.data):

FieldTypeDescription
lockIdnumberNumeric lock ID
uuidstringLock UUID
serialNumberstring|nullHardware serial number
ownerIdstring|nullOwning user ID
keysarray|nullInitial key list { uuid, indexNumber?, userId? }
thingNamestring|nullAWS IoT thing name
thingArnstring|nullAWS IoT thing ARN
timestampstringISO timestamp

Sample:

{
  "type": "LockCreated",
  "lockId": 4321,
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "serialNumber": "SPK-1234",
  "ownerId": "user-uuid",
  "keys": [],
  "timestamp": "2026-04-30T10:30:00.123Z"
}

OwnerSet

Sourcespk.api
detail-typeOwnerSet

Fires when a lock's owner is assigned or changed.

FieldTypeDescription
lockIdnumberNumeric lock ID
uuidstringLock UUID
userIdstringNew owner user ID
timestampstringISO timestamp

KeyAdded

Sourcespk.api
detail-typeKeyAdded

Fires when a physical key is added to a lock.

FieldTypeDescription
lockIdnumberNumeric lock ID
uuidstringLock UUID
keyUuidstringUUID of the key
keyIndexNumbernumber|nullKey slot index
userIdstring|nullUser the key is assigned to
timestampstringISO timestamp

Sample:

{
  "type": "KeyAdded",
  "lockId": 4321,
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "keyUuid": "0f5b84e0-1d56-4d2f-8d6c-1f2e3a4b5c6d",
  "keyIndexNumber": 3,
  "userId": "9b3e1d5e-7c6a-4d4d-8b1a-2e4f6a8c0d1e",
  "timestamp": "2026-04-30T10:30:00.123Z"
}

KeyRemoved

Sourcespk.api
detail-typeKeyRemoved

Fires when a physical key is removed from a lock.

FieldTypeDescription
lockIdnumberNumeric lock ID
uuidstringLock UUID
keyUuidstringUUID of the removed key
keyIndexNumbernumber|nullKey slot index
timestampstringISO timestamp

ResidentAdded

Sourcespk.api
detail-typeResidentAdded

Fires when a resident is granted access to a lock.

FieldTypeDescription
lockIdnumberNumeric lock ID
uuidstringLock UUID
userIdstringResident user ID (resolved from the email)
namestringResident display name
emailstring|nullResident email (optional)
timestampstringISO timestamp

Sample:

{
  "type": "ResidentAdded",
  "lockId": 4321,
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "userId": "9b3e1d5e-7c6a-4d4d-8b1a-2e4f6a8c0d1e",
  "name": "Jane Resident",
  "email": "resident@example.com",
  "timestamp": "2026-04-30T10:30:00.123Z"
}

ResidentRemoved

Sourcespk.api
detail-typeResidentRemoved

Fires when a resident's lock access is revoked.

FieldTypeDescription
lockIdnumberNumeric lock ID
uuidstringLock UUID
userIdstringResident user ID
emailstring|nullResident email (optional)
timestampstringISO timestamp

User Events

PhysicalKeyAdded

Sourcespk.api
detail-typePhysicalKeyAdded
aggregateTypeuser

Fires when a physical key is issued to a user.

FieldTypeDescription
userIdstringUser ID
numbernumberKey number
orgIdstringIssuing organization
orgNamestring|nullOrganization display name
notestring|nullFree-form note
addedAtnumberUnix epoch ms

PhysicalKeyRemoved

Sourcespk.api
detail-typePhysicalKeyRemoved

Fires when a physical key is removed from a user.

FieldTypeDescription
userIdstringUser ID
numbernumberKey number
removedAtnumberUnix epoch ms

AccessibleLockAdded

Sourcespk.api
detail-typeAccessibleLockAdded

Fires when a user is granted access to a lock.

FieldTypeDescription
userIdstringUser ID
lockIdstringLock UUID
lockNamestringLock display name
accessLevelenumOWNER | ADMIN | USER | GUEST
grantedBystringUser ID who granted access

Sample:

{
  "type": "AccessibleLockAdded",
  "userId": "9b3e1d5e-7c6a-4d4d-8b1a-2e4f6a8c0d1e",
  "lockId": "550e8400-e29b-41d4-a716-446655440000",
  "lockName": "Front Door",
  "accessLevel": "USER",
  "grantedBy": "1c1c1c1c-1c1c-1c1c-1c1c-1c1c1c1c1c1c"
}

LicensePlateAdded

Sourcespk.api
detail-typeLicensePlateAdded

Fires when a license plate is registered to a user (used by ALPR / camera-driven access flows).

FieldTypeDescription
userIdstringUser ID
platestringLicense plate string
labelstringFriendly label
addedAtnumberUnix epoch ms

Hub Events

HubProvisioned

Sourcespk.api
detail-typeHubProvisioned
aggregateTypehub

Fires when a hub is registered with the system (typically at manufacturing time).

FieldTypeDescription
hubIdstringHub UUID
serialstringHardware serial
modelstringHardware model
thingNamestringAWS IoT thing name
vendorNamestring|nullVendor name
provisionedAtnumberUnix epoch ms

HubClaimed

Sourcespk.api
detail-typeHubClaimed

Fires when a hub is claimed by an organization and assigned to a site.

FieldTypeDescription
hubIdstringHub UUID
orgIdstringClaiming organization
siteIdstringSite the hub is installed at
claimedBystringUser ID who claimed it
claimedAtnumberUnix epoch ms

Camera Events

CameraRegistered

Sourcespk.api
detail-typeCameraRegistered
aggregateTypecamera

Fires when a camera is registered for a tenant.

FieldTypeDescription
cameraIdstringCamera UUID
threeDeyeCameraIdstring3dEye-side camera ID
cameraTypeenumgeneric | onvif | pnp
namestringCamera display name
orgIdstringOwning organization
ownerIdstringOwning user ID
httpUrlstringHTTP stream URL
rtspUrlstringRTSP stream URL
registrationCodestringRegistration code used
registeredAtnumberUnix epoch ms

IoT Events

Shadow Update

Sourcespk.iot.shadow
detail-typeShadow Update

Fires when an IoT hub device updates its AWS IoT Device Shadow. Contains the full shadow state snapshot including desired state, reported state, and the delta.

This event has a different envelope from spk.api events — there is no detail.data wrapper. The shadow fields live directly on detail.

Payload fields (top-level detail):

FieldTypeDescription
thingNamestringAWS IoT thing name of the device
partnerIdstring|nullPartner associated with this device
versionnumberShadow document version
desiredStatestringTarget state set by the application (JSON string)
reportedStatestringState the device reported back (JSON string)
deltaStatestringDifference between desired and reported state (JSON string); non-empty when the device hasn't applied all changes
metadatastringAWS IoT shadow metadata with timestamps per field (JSON string)

Example payload:

{
  "source": "spk.iot.shadow",
  "detail-type": "Shadow Update",
  "detail": {
    "partnerId": "<tenant-org-id>",
    "thingName": "<device-uuid>",
    "reportedState": "<stringified JSON of reported state>",
    "desiredState": "<stringified JSON of desired state>",
    "deltaState": "{}",
    "metadata": "<stringified IoT shadow metadata>",
    "version": 42
  }
}

Note: reportedState, desiredState, deltaState, and metadata are stringified JSON embedded inside the outer JSON object. Partners must call JSON.parse() on each of these fields before accessing their contents.