Skip to content

Event

Webhook subscriptions let external systems receive platform events as signed HTTP POST requests. Register a URL, choose which event to receive, and the platform delivers a payload each time that event fires for the owning organization.

For the create call see Subscribe to Events via Webhook.

Webhook subscription

A subscription carries:

FieldPurpose
urlEndpoint that receives event deliveries
event_nameThe event to subscribe to. Null receives every event the owner can see.
secretShared HMAC key. Returned only on creation. Rotate by replacing the subscription.
activeWhether the subscription currently receives deliveries
owner_idOwning organization

Events

Every delivery uses the same envelope:

json
{
  "id": "<event id>",
  "event_name": "<event>",
  "timestamp": "<rfc3339>",
  "context": { }
}

The context block carries the entities involved in the event. Optional entities are omitted when not resolvable.

EventFires whenContext entities
booking_createdA booking is confirmed and savedbooking, bookable, bookable_type, location, organization, user
booking_updatedA booking is modifiedbooking, bookable, bookable_type, location, organization, user
booking_canceledA booking is canceledbooking, bookable, bookable_type, location, organization, user
booking_deletedA booking is removedbooking, bookable, bookable_type, location, organization, user
booking_endedA booking's time window has endedbooking, bookable, bookable_type, location, organization, user
checkin_createdA checkin is registeredcheckin, booking when linked, bookable, bookable_type, location, organization, user
checkin_startedThe user checks incheckin, booking when linked, bookable, bookable_type, location, organization, user
checkin_updatedA checkin is modifiedcheckin, booking when linked, bookable, bookable_type, location, organization, user
checkin_failedA checkin attempt was rejectedcheckin, booking when linked, bookable, bookable_type, location, organization, user
checkout_startedThe user initiates checkoutcheckin, booking when linked, bookable, bookable_type, location, organization, user
checkout_completedThe checkout is finalizedcheckin, booking when linked, bookable, bookable_type, location, organization, user
code_scannedA code is resolved through GET /api/resolve/{code}code, plus the object the code points at when one is set

Delivery and signing

Each delivery is an HTTP POST with the envelope above as the JSON body. The signature and a timestamp arrive in the X-Samna-Signature header using a timestamped HMAC-SHA256 scheme. Verify the signature against the shared secret with a 5 minute replay window to reject replayed requests.

Failed deliveries are retried with backoff up to three attempts before being dropped.

API

The Event tag covers webhook subscription CRUD.