This event fires every time a badge is assigned to a user, whether by purchase, manual admin assignment, or via API.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.
The internal event name (used when subscribing webhooks in the Console) is
user_received_badge.When it fires
- Admin assigns a badge manually in the dashboard
- External purchase via Hotmart/Kiwify webhook triggers a badge assignment
- User completes a course and earns an automatic badge
- You call the API yourself to assign one
When it does NOT fire
- Assignment fails (e.g. badge doesn’t exist on the tenant)
- User has been soft-deleted
Payload
The payload is serialized in PascalCase and delivered in the body of thePOST with Content-Type: application/json:
Payload fields
| Field | Type | Description |
|---|---|---|
CustomerId | GUID | ID of the tenant that emitted the event. Use it to route when your endpoint receives webhooks from multiple tenants. |
BadgeId | GUID | ID of the badge that was assigned. |
BadgeName | string | Configured name of the badge (e.g. Premium). |
User.Id | GUID | ID of the user who received the badge. |
User.Email | string | User email. |
User.FirstName | string | First name. |
User.LastName | string | Last name. |
User.DisplayName | string | Display name. |
User.Username | string | Username (no spaces). |
User.PhoneNumber | string | Phone, when provided. |
User.CreatedAt | ISO 8601 | When the user was created in the tenant. |
User.BadgeId | GUID | null | User’s primary badge (compatibility — may equal the top-level BadgeId). |
User.Badges | GUID[] | Full list of badges assigned to the user at the time of the event. |
ReceivedAt | ISO 8601 | When the assignment happened in the tenant. |
Request headers
| Header | Description |
|---|---|
X-Cativa-Signature | HMAC-SHA256 signature of the delivery, in the format t=<unixTs>,v1=<hex>. Verify it before processing the event. |
X-Cativa-Execution-Id | Unique ID of this event. Stable across retries — use it as your idempotency key. |
X-Cativa-Automation-Id | ID of the listener configured in the Console (same value across all deliveries from the same subscription). |
X-Cativa-Signature (with examples in Node, Python, Go and C#) lives in Subscribing and verifying webhooks.
Sample receiver (Express)
This example verifies the HMAC signature, drops requests outside the 5-minute anti-replay window, and only processes authenticated events:Idempotency
Use theX-Cativa-Execution-Id header received with the request to detect duplicates (the same executionId is sent across all retries of a given event):
Retries
If your endpoint fails, Cativa retries on the curve30s → 5min → 30min → 2h → 6h → 24h (6 retries, 7 deliveries total, ~33h of coverage). Status 400/401/403/404/410 are treated as permanent failures — no retry. Full table at Subscribing and verifying webhooks.
Related events
user_joined_group
Fired when the user joins a group (potentially via badge).
Subscribing to webhooks
How to register listeners, verify HMAC and handle retries.
