Tenant webhooks
Configure webhook listeners, verify HMAC-SHA256 signatures, and handle retries gracefully.
Tenant Webhook Registration
Create a webhook in Dashboard → Webhooks or POST /v1/webhooks using your project key. Send url, events and enabled. Save the returned secret once; it is used only to verify callbacks.
Supported Webhook Event Types
Supported events: character.ready, character.failed, generation.completed and generation.failed. Registration is project-scoped. Existing jobs are not replayed automatically when a webhook is created.
Callback Payload & Signature Header
The callback JSON contains id, event, created_at and data. Character data includes characterId; generation data includes generationId. Verify X-Webhook-Signature against the original raw body before trusting it.
HMAC-SHA256 Signature Verification
The signature is t=UNIX_SECONDS,v1=HEX_HMAC_SHA256. The signed bytes are timestamp + a dot + raw body. Use constant-time comparison and reject old timestamps. X-Webhook-ID is stable across retries.
At-Least-Once Delivery & Retry Delays
Delivery is at least once, so duplicates are possible. Return 2xx after durably recording the event. Non-2xx responses and network failures retry up to five total attempts, with 10, 20, 40 and 80 second delays. A disabled/deleted endpoint does not receive events.
Delivery Diagnostics & Test Pings
GET /v1/webhooks/{id}/deliveries lists attempts. POST /v1/webhooks/{id}/test sends a signed ping. A ping is not a full generation lifecycle test. Poll resource state when reconciling a missing event. Webhooks are not an exactly-once guarantee.
Worker Scheduler & High Availability
Persisted-event recovery requires the operator’s delivery worker and periodic scheduler to run. A production outage can delay callbacks; inspect delivery history rather than assuming immediate receipt.
