Test webhook delivery
Queue a simulated webhook and verify receiver acceptance
Use POST /v1/orders/simulate-webhook to exercise the real Svix delivery path with a compact payload that you choose. Simulation verifies signing, routing, durable acceptance, and duplicate handling. It does not create an applicant, invite, order, Beam input, monitoring report, or result.
Prerequisites
- A Cerebrum API key and an active organization available to that key.
- A publicly reachable HTTPS receiver URL with a valid TLD. The request validator does not accept an HTTP localhost URL; use your supported HTTPS development tunnel when testing locally.
- The receiving endpoint's Svix signing secret configured in your receiver. Simulation uses the same signing path as live notifications.
- A supported test environment and fixtures approved for your integration testing. No public sandbox or test identity is promised by this guide. Do not run simulation against customer production data.
Set your own values:
export CEREBRUM_BASE_URL="https://api.cerebrum.com"
export CEREBRUM_API_KEY="REPLACE_WITH_YOUR_API_KEY"
export CEREBRUM_WEBHOOK_URL="https://receiver.example.com/webhooks/cerebrum"CEREBRUM_BASE_URL must name the environment in which your key and organization are valid. CEREBRUM_WEBHOOK_URL is a placeholder for your reachable receiver, not a Cerebrum host.
Queue an order event
This example deliberately uses a non-resource ID so the test cannot be mistaken for an order lookup:
curl --request POST "$CEREBRUM_BASE_URL/v1/orders/simulate-webhook" \
--header "apikey: $CEREBRUM_API_KEY" \
--header 'content-type: application/json' \
--data '{
"id": "ORD-SIMULATED-NOT-REAL",
"event": "ORDER_STATUS_CHANGE",
"postbackWebhookUrl": "'"$CEREBRUM_WEBHOOK_URL"'",
"additionalMetadata": {
"testRun": "webhook-receiver-001"
}
}'The route returns 201 Created with:
{
"success": true
}That response means the notification was queued, not proof of receiver delivery. The queue is scheduled approximately one second later and has up to five Cortex submission attempts. Applicable global webhook destinations and CRA delegation rules can also affect routing; the supplied postback URL is not necessarily the only target.
Observe success
At your receiver, success is a verified POST whose payload you can store and inspect. id, additionalMetadata, and event come from the request, idType is derived from the event, organizationId comes from the active organization context, eventDate is generated at enqueue time, and svixAppId is appended for the selected Svix application:
{
"id": "ORD-SIMULATED-NOT-REAL",
"idType": "order",
"organizationId": "a3f1c9d2-6b4e-4c8a-b7e5-2d9f0e1a3c47",
"additionalMetadata": {
"testRun": "webhook-receiver-001"
},
"event": "ORDER_STATUS_CHANGE",
"eventDate": "2026-11-19T15:10:00.000Z",
"svixAppId": "app_2z7K9synthetic000000000001"
}The organization and Svix application values in this fixture are synthetic placeholders. No metadata.delta is generated for simulation. Verify the svix-id, svix-timestamp, and svix-signature headers and inspect the corresponding attempt in the Svix portal if needed.
Dummy IDs versus retrieval
The handler does not create or look up the supplied id; its request schema explicitly calls it a dummy ID. ORD-SIMULATED-NOT-REAL is therefore not retrievable, and a worker that tries GET /v1/orders/ORD-SIMULATED-NOT-REAL should report a retrieval failure rather than fabricate a result.
For a receiver-only test, stop after durable acceptance or quarantine the known dummy ID in your test worker. For a retrieval-path test, you may deliberately supply an existing order UUID that your API key can access. Simulation still does not mutate that order or generate fresh results; it only places the supplied ID in the notification.
Event and ID-type mapping
The optional event defaults to ORDER_STATUS_CHANGE. The supported values are the events in the catalog:
| Event | Payload idType |
|---|---|
ORDER_STATUS_CHANGE, ORDER_SCORE_CHANGE, ORDER_CUSTOM_SCORE_CHANGE, ORDER_DISPUTE_RESOLVED, ORDER_ERROR | order |
VOUCHER_REDEEMED, VOUCHER_ACCEPTED, VOUCHER_STARTED, VOUCHER_CANCELED, VOUCHER_EXPIRED, VOUCHER_OPTED_OUT | invite |
BEAM_INPUT_CREATED | beamInput |
MONITORING_REPORT_GENERATED | report |
Use the matching dummy ID form and do not assume that simulating an event proves a production emitter exists. In particular, the reviewed source exposes BEAM_INPUT_CREATED through this simulation route but does not establish its live production trigger.
Continue with Verify webhook signatures, Response requirements, and Delivery and retry policy.