What you will do
Register an HTTPS endpoint, receive a test delivery on it, verify the signature, and then watch a real referral event arrive. Budget about thirty minutes. You need a firm-scopedcxp_ API key at the standard tier or above, and your firm’s account must have the Public API integration enabled. See Webhooks for the full prerequisites.
1
Get a standard-tier API key
Generate the key from Settings > API Keys in the CaseXchange dashboard, or programmatically with a JWT session — the Quickstart and the JWT guide both cover it.A
read_only key can list subscriptions and read the delivery log, but it cannot create, change, test or delete a subscription. Those calls return 403 insufficient_tier.2
Stand up an endpoint
Your endpoint must:
- be reachable at
https://on port 443, with a hostname that resolves to a public address; - read the raw request body, because that is what the signature covers;
- answer
2xxquickly, and do the real work afterwards.
verify function is the reference implementation from Verify signatures — copy it from there.3
Create the subscription
201events field: every active subscription receives every event for your firm. Your firm may hold five active subscriptions at once.4
Send a test event
200webhook.test is a synthetic delivery with its own flat shape, and its eventId travels only in the X-CaseXchange-Event-Id header:FAILED or EXHAUSTED instead, lastStatusCode and lastError say why — see Troubleshooting.5
Receive a real event
A test delivery proves your transport and your signature check. To exercise your event handling, create a case through the API and move it through a status change:
POST /sent-cases then POST /sent-cases/{id}/refer produces referral.sent for your firm. See Sent Cases examples.Every firm event envelope carries isTestCase, so your handler can route or ignore test traffic — the synthetic webhook.test body is not an envelope and has no isTestCase. An ordinary referral arrives with isTestCase: false. If you would rather not exercise this against live referral traffic, drive a test case through a status change instead — every delivery for it carries isTestCase: true, so your handler can route or ignore it. This is an abbreviated envelope — the event catalog has the full field list and the data shape for each event:Before you go live
Handler checklist
Handler checklist
- Verify
X-CaseXchange-Signaturebefore parsing the body, using the raw bytes. - Deduplicate on
X-CaseXchange-Delivery. Retries reuse it;eventIdis shared across firms and subscriptions and is not unique per delivery. - Answer
2xxas soon as the body is stored. Anything else is a failed attempt. - Ignore event names your handler does not recognise rather than erroring on them.
- Filter on
isTestCaseso test traffic never reaches production records. - Check
piiMaskedbefore reading client fields; a masked snapshot omits them entirely rather than sending nulls. See Client data and masking. - Apply the delivery with the greatest
occurredAt; there is no ordering guarantee.
Operational checklist
Operational checklist
- Store the secret in a secrets manager. Never log it.
- Plan for rotation:
POST /webhooks/{id}/rotate-secrettakes effect immediately, with no dual-signing window. Deploy a verifier that accepts both secrets, rotate, then drop the old one. - Reconcile periodically against
GET /status-updatesand the case read endpoints. Webhooks are a signal, not a complete change feed — see Known gaps. - Monitor
GET /webhooks/{id}/deliveriesforEXHAUSTEDruns. Ten consecutive exhausted deliveries deactivate the subscription; see Reliability.
Next steps
Managing subscriptions
Every endpoint, the URL rules, the five-subscription limit, and the error codes.
Anatomy of a delivery
Headers, the envelope, idempotency and ordering.
Verify signatures
The reference implementations and the rotation procedure.
Testing
Test deliveries, echo mode, and local development.

