This has no v1 equivalent. Managing endpoints needs the
webhooks:manage scope.Registering an endpoint
POST /webhook-endpoints with your URL and the events you want. The response carries the
signing secret, in plaintext, once.
Verifying the signature
Every delivery carries anX-InStockRx-Signature header:
HMAC-SHA256 over the exact string "<t>.<raw request body>" using your signing
secret, hex-encode it, and compare against v1.
Accept any v1 present
During a secret rotation we sign with both secrets and send two values:
v1 value. A verifier that
reads only the first — or assumes there is only one — breaks the moment anyone rotates. That
is the whole point of the overlap: it lets you redeploy without dropping deliveries.
POST /webhook-endpoints/{id}/rotate-secret takes gracePeriodSeconds — default 24 hours,
maximum 7 days, 0 for an immediate hard swap. The old secret is erased once the window
closes.
What we send
16 event types. Names aresnake_case with a dotted resource prefix — the one place on the
v2 surface that isn’t PascalCase.
Events fire for activity in the portal as well as through the API, so you see a pharmacy’s
own actions, not just your integration’s.
Retries, and how an endpoint gets switched off
Any non-2xx is retried on a fixed backoff: 30s → 5min → 30min → 2h → 12h → 24h → 48h — seven retries after the first attempt, about four days of cover. Return a 2xx as soon as you have durably accepted the body, and do your processing after. Slow handlers burn into the retry schedule.Reading the status
The distinction is deliberate: a pause you chose and a shutdown we imposed mean very
different things when you are debugging missing events.
failureCount is a live count, not a running total. It counts deliveries currently
awaiting a retry, so it falls back to zero on its own once they land. It is a “something is
wrong right now” signal. For the permanent case, read status.Two things that surprise people
DELETE doesn't really delete
DELETE doesn't really delete
DELETE /webhook-endpoints/{id} sets the status to Disabled. The endpoint still comes
back from GET and the list. If you replay your configuration from a template, take care
not to resurrect something you meant to remove.Any key for the group can manage any endpoint
Any key for the group can manage any endpoint
Endpoints belong to the group, not to the key that created them. Any key holding
webhooks:manage can edit, disable or re-enable any of the group’s endpoints. This keeps
key rotation working, and every change is attributed to the key that made it in our
audit log.