POSTs a signed JSON event to an HTTPS endpoint you register — so you can update
your own database, notify a player, or kick off the next step in your product’s
logic.
Each delivery is signed with an Alakazam-Signature header you verify against
the raw request body, so you can trust that the event came from Alakazam and was
not tampered with in flight.
Register an endpoint
Webhook endpoints belong to an app and are managed with your Alakazam user session (the same token you use for app and key management), not an API key.POST the HTTPS url you want events delivered to, and optionally the list of
events to subscribe to. Omit events to subscribe to all currently-delivered
events (world.generation.succeeded and world.generation.failed).
secret, prefixed whsec_. Use it to
verify every delivery from this endpoint.
List your endpoints
List the webhook endpoints registered for an app. The response is metadata-only — the signingsecret is never returned again after creation.
Delete an endpoint
Remove an endpoint to stop deliveries. Either verb works —DELETE, or POST
to the /delete sub-path for environments that can’t send DELETE.
Event types
Subscribe to any subset of these. Omittingevents subscribes you to every
event Alakazam currently delivers — world.generation.succeeded and
world.generation.failed. Subscribe to * to also auto-enroll in new event
types as they ship.
| Event | Fires when |
|---|---|
world.generation.succeeded | An async world generation job finishes and a playable world is ready. data carries worldId and jobId. |
world.generation.failed | An async generation job exhausts its retries. data carries jobId and error. |
session.ended | Reserved — not yet delivered. This event type is planned for a future release. You can subscribe to it today, but Alakazam does not currently emit it, so do not build logic that depends on receiving it. |
Generation events fire for async jobs — those you create with
async: true
on POST /v1/worlds and poll at GET /v1/jobs/{jobId}. A webhook lets you
skip the polling entirely.Event payload
Every delivery is aPOST with a JSON body in this envelope:
| Field | Description |
|---|---|
type | The event type, also mirrored in the Alakazam-Event request header. |
created | Unix timestamp (seconds) when the event was emitted. |
appId | The app the event belongs to. |
data | Event-specific payload (see the table above). |
2xx status to acknowledge receipt. Any non-2xx, or a
network failure, is treated as a failed delivery and retried.
Verify the signature
Every request carries anAlakazam-Signature header:
tis the Unix timestamp (seconds) of the delivery.v1is the hex HMAC-SHA256 of the string`${t}.${rawBody}`— the timestamp, a literal., then the exact raw request body — keyed by the endpoint’swhsec_signing secret.
v1 with a constant-time comparison. Also check that t is recent (within, say,
five minutes) to reject replays.
Retries and ordering
Each event is attempted up to 3 times with exponential backoff per
endpoint. A delivery succeeds on any
2xx; anything else is retried until the
attempts are exhausted.- No ordering guarantee. Events may arrive out of order, and an occasional
duplicate is possible. Make your handler idempotent — key off the event’s
dataids (for examplejobIdorworldId) rather than assuming arrival order. - Acknowledge fast. Return
2xxas soon as you’ve verified and stored the event, then do slower work asynchronously, so a slow handler doesn’t trigger retries. - Per-endpoint signing. Each endpoint has its own
whsec_secret, so verify with the secret for the endpoint that received the request.