POST with a JSON body to a URL you choose.
Set up an endpoint
To start receiving webhooks, send your account manager:- The HTTPS URL that should receive events.
- The event types you want to subscribe to (see Available events).
whsec_. You use it to verify that each request came from Opereit. Store it in a secrets manager and treat it like a password.
Each endpoint has its own secret. To rotate a secret or change the subscribed events, contact your account manager.
Respond to a webhook
Return any2xx status within 10 seconds to acknowledge the event. The response body is ignored.
If your endpoint returns any other status, times out, or can’t be reached, Opereit retries the delivery with exponential backoff.
Handle duplicates and ordering
Build your handler with these delivery guarantees in mind:- At-least-once delivery. The same event can arrive more than once, for example after a retry. Use the
webhook-idheader (the same value as the eventid) to skip events you’ve already processed. - No ordering guarantee. Events can arrive out of order. Compare
occurred_atwith the last event you processed for the same resource, and ignore older ones. - Unknown events and fields. New event types and new fields can be added at any time. Ignore event types and fields you don’t recognize instead of rejecting the request.
GET /v1/claims/{id}. The API is always authoritative.
Verify signatures
Every request is signed with HMAC-SHA256 using your endpoint’s signing secret. Signing follows the Standard Webhooks specification, so you can use one of its open-source libraries or the code below. Each request includes these headers:
To verify a request:
1
Build the signed content
Join the
webhook-id header, the webhook-timestamp header, and the raw request body with a period: {webhook-id}.{webhook-timestamp}.{body}.2
Compute the expected signature
Remove the
whsec_ prefix from your secret and base64-decode the rest to get the key. Compute HMAC-SHA256 of the signed content with that key, then base64-encode the result.3
Compare signatures
Accept the request if any
v1, entry in webhook-signature matches your expected signature. Use a constant-time comparison.4
Check the timestamp
Reject the request if
webhook-timestamp is more than 5 minutes away from your current time. This protects you against replayed requests.401 and don’t process the event.
Rotate a secret
When your secret is rotated, Opereit signs each request with both the old and the new secret for a transition period, sowebhook-signature contains two v1, entries. Since you accept a request if any signature matches, you can deploy the new secret without missing events.
Event format
Every event body has the same envelope:Available events
Event types are named<entity>.<action>, for example claim.status_updated, and data is always that entity. Related objects are referenced by ID. You subscribe to each event type separately. The API reference lists every field of each event.
Claims
New status reasons can be added over time. If you get a status reason
slug you don’t recognize, show its label.