Webhooks are how Cativa notifies you when something happens — instead of you polling the API every minute. This page is the high-level view. For the step-by-step on subscribing, signature verification and retries, see Subscribing and verifying webhooks.Documentation Index
Fetch the complete documentation index at: https://docs.cativa.digital/llms.txt
Use this file to discover all available pages before exploring further.
How it works
When something relevant happens in a tenant (user receives a badge, post is created, payment confirmed), Cativa builds the event payload and POSTs to your public endpoint withContent-Type: application/json.
secret (format whsec_ + 64 hex), used to sign every delivery from that listener.
Delivery guarantees
At-least-once
Each event is delivered at least once. Always use
X-Cativa-Execution-Id for idempotency on your side, avoiding double-processing in case of duplicates.Order NOT guaranteed
Events can arrive out of the order in which they happened. Don’t write code that assumes
user_created arrives before user_received_badge — they can swap.Why no ordering?
Cativa delivers events in parallel to reach your endpoint quickly. Enforcing order would cut throughput by an order of magnitude. Instead, each event payload contains all the data you need to process it in isolation.HMAC signature (X-Cativa-Signature)
Every delivery is signed with HMAC-SHA256 using the listener’ssecret. You verify the signature before processing the event, ensuring the request really came from Cativa and the body was not tampered with in transit.
The signature ships in this header:
t— Unix timestamp (seconds) of the moment of delivery.v1— HMAC-SHA256 (hex) over the string"<t>.<rawBody>", using the listener’ssecretas the key.
Retries with backoff
If your endpoint doesn’t reply with2xx, Cativa retries on this curve:
Retry-After header you return (capped at the next backoff window’s max).
When we retry vs permanent failure
| Status | Behavior |
|---|---|
2xx | Success — no retry |
408 Request Timeout | Retry |
429 Too Many Requests | Retry (honors Retry-After) |
5xx (500, 502, 503, 504, …) | Retry |
| Network errors / TCP timeouts | Retry |
400 Bad Request | Permanent failure — no retry |
401 Unauthorized | Permanent failure — no retry |
403 Forbidden | Permanent failure — no retry |
404 Not Found | Permanent failure — no retry |
410 Gone | Permanent failure — no retry |
Payload format
Example (payload foruser_received_badge):
| Field | Description |
|---|---|
CustomerId | ID of the tenant that emitted the event. Use it to route when your endpoint receives webhooks from multiple tenants. |
| Event-specific fields | Each event adds its own fields (e.g. BadgeId, BadgeName, User, ReceivedAt for user_received_badge). See each event’s page for the exact shape. |
Event catalog
Cativa exposes events for the platform’s main actions. Start with the canonical event:user_received_badge
Fired when a badge is assigned to a user. Full reference page with payload and example receiver.
user_created
New user signed up.
user_joined_group
User joined a group (manual or via badge).
post_created
New post published in a group.
paywall_payment_completed
Paywall payment completed successfully.
comment_created, course_completed, lesson_completed and user_received_private_message) lives in Subscribing and verifying webhooks.
Anti-pattern: processing events synchronously in the endpoint
Idempotency on your side
Since delivery is at-least-once, you need to detect duplicates. Use theX-Cativa-Execution-Id header (always sent and stable across retries of the same event) as a deduplication key:
Next steps
Subscribing and verifying webhooks
How to register a listener, verify HMAC, handle retries.
user_received_badge
Full reference page for an event — concrete example of payload and receiver.
