Webhooks
Receive Capturia events on your server in real time.
Capturia exposes a CRUD API / to manage your subscriptions (Reference).
What an address receives
eventslists the account events it receives (*for all).- An empty list (
[]) reserves the address for automations' "Outgoing webhook" steps. A step targets a specific address and delivers its payload to it directly, without a subscription; its event is namedautomation..action
Each delivery
A JSON POST, with these headers:
X-: the event name.Capturia- Event X-: the delivery identifier, the same on every retry and every resend. An account event repeats it in itsCapturia- Delivery idfield; a step's payload has none. Ignore an identifier you already processed.X-andCapturia- Timestamp X-:Capturia- Signature sha256=followed by the HMAC-SHA256 of"{timestamp}.computed with your secret, to compare in constant time.{raw body}"
Retries, cut-off, resend
- Answer with a 2xx code in under 10 seconds. Otherwise, Capturia retries the delivery 1 min, 5 min, 30 min, 2 h, 6 h then 15 h later: 7 attempts over almost 24 h.
- After 24 h without a single successful delivery, the webhook is cut off. What reaches it afterwards is kept for 30 days and goes out when it's reactivated, in Administration › Webhooks.
- A failed delivery can be resent for 30 days from the webhook's log: the same one, with the same identifier.
Limit a webhook to certain Systems
An account with several Systems can limit a webhook to the leads of some of them.
POST /acceptsv1/ webhooks system_, a list of identifiers of the account's active Systems. Absent orids null: the webhook receives the leads of all Systems. The response returnssystem_.ids GET /(v1/ systems contacts:readorwebhooks:managescope) lists the account's active Systems:id,name,is_.default - A limited webhook receives a lead's event only if the lead is in one of the chosen Systems. A lead's System is the one where it is being followed right now, otherwise the account's main System. Events without a lead (team, settings, billing) are always sent.
- In the payload,
data.(system { id, name }) carries the lead's System for every lead event, main System included. It isnullfor an event without a lead. - An automation's "Outgoing webhook" action sends a payload of another shape (
event=automation.):action system({ id, name }) is at its root, not indata.
Until this feature is open for your account, a system_ list and GET / are refused with the feature_ code.