Webhooks
4 endpoints
/v1/webhooksList webhook subscriptions
Returns the list of webhook subscriptions created by the calling
API key. Subscriptions created by another key on the same account
are NOT visible here (filter client_).
No cursor pagination
The maximum of 10 subscriptions per account always fits on a
single page. The response returns pagination. and
has_.
Secret never returned
The HMAC secret used to sign outbound payloads is only
returned on creation (POST /). It isn't
returned here — to rotate it, delete the subscription and
create a new one.
webhooks:manageResponses
| Status | Description |
|---|---|
200 | List of this API key's webhook subscriptions. |
401 | The API key is missing, unknown or expired.
|
403 | Authorization refused.
|
429 | Rate limit reached.
|
500 | Unexpected server error. Always include the
|
501 | Test keys (
|
503 | A service the request depends on didn't respond (reading the key, the
account or the plan). The same request will go through once it's back:
retry after the
|
Example request
curl -X GET 'https://api.capturia.io/v1/webhooks' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'/v1/webhooksCreate a webhook subscription
Registers a new subscription. Capturia sends an HMAC-signed JSON POST
to url every time a subscribed event occurs.
HTTPS URL required
The URL must use the https:// scheme — http:// is rejected to
avoid leaking payloads in cleartext.
Limit of 10 subscriptions per account
Beyond 10 active subscriptions on the same account (across all
keys), returns 429 subscription_. Delete
an existing subscription before you create a new one.
HMAC secret returned only ONCE
The 201 response includes secret in cleartext (64 hex characters, 256 bits
of entropy). You MUST store it immediately — you use it to
verify the signature of outbound payloads
(X-), and the API never returns it again.
The secret is encrypted in the database after this response.
Scoped to the creating key
The subscription belongs to both the account AND the API key that
created it. The GET / and
DELETE / endpoints only see the current key's
subscriptions — a subscription created by another key on the same
account can't be listed or deleted through the API.
Per-System limit
system_ limits the subscription to some of the account's Systems:
this webhook only receives the leads of the chosen Systems; absent or
null: all Systems; events without a lead are always sent. The list
holds 1 to 50 identifiers of active Systems, as GET /
returns them; the webhooks:manage scope is enough to call it.
An empty list, a value that isn't a list of UUIDs, more than
50 Systems, or a System of the account that isn't active return
400 validation_ (details[].,
details[]. = invalid_, exceeds_, or
system_). An identifier unknown to the account returns
422 system_. Until Systems are opened to the API for the
account, a list returns 403 feature_
(details.); null is still accepted.
webhooks:manageRequest body
| Property | Type | Required | Description |
|---|---|---|---|
url | string | required | HTTPS URL that will receive the notifications. Must be a publicly
reachable endpoint that accepts JSON POST requests. |
events | string[] | required | List of business events to subscribe to, or * for all
events. Each event name is delivered as-is in the
X- header and the payload's event field. An empty
list reserves the address for automation webhook steps, which target
it directly without a subscription. The accepted names follow; the
shape of each notification is described in the Webhooks guide.Allowed values: |
system_ids | array | null | optional | Optional per-System limit: this webhook only receives the leads of the
chosen Systems; absent or null: all Systems; events without a lead
are always sent. A non-empty list of at most 50 identifiers of the
account's active Systems, as GET / returns them. A lead's
System is the one where it is being followed right now, otherwise the
account's main System. |
Responses
| Status | Description |
|---|---|
201 | Subscription created. The HMAC |
400 | Invalid request.
|
401 | The API key is missing, unknown or expired.
|
403 | Authorization refused.
|
413 | The request body exceeds 1 MB (1,048,576 bytes).
|
415 | The
|
422 | Request refused.
|
429 | Limit reached.
|
500 | Unexpected server error. Always include the
|
501 | Test keys (
|
503 | A service the request depends on didn't respond (reading the key, the
account or the plan). The same request will go through once it's back:
retry after the
|
Example request
curl -X POST 'https://api.capturia.io/v1/webhooks' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://hooks.example.com/capturia",
"events": [
"lead_created",
"payment_received"
]
}'/v1/webhooks/{id}Delete a webhook subscription
Permanently deletes a webhook subscription. The subscription
must belong to both the calling account AND the calling
API key (filter client_) — otherwise
404 not_.
No soft delete
Deletion is immediate and irreversible — to resume the
event stream, create a new subscription with
POST / (a new secret will be issued).
webhooks:managePath parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | required | UUID of the resource. |
Responses
| Status | Description |
|---|---|
204 | Subscription deleted. No body. |
401 | The API key is missing, unknown or expired.
|
403 | Authorization refused.
|
404 | Resource not found.
|
429 | Rate limit reached.
|
500 | Unexpected server error. Always include the
|
501 | Test keys (
|
503 | A service the request depends on didn't respond (reading the key, the
account or the plan). The same request will go through once it's back:
retry after the
|
Example request
curl -X DELETE 'https://api.capturia.io/v1/webhooks/{id}' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'/v1/webhook-eventsList the latest deliverable business events (samples)
Returns the account's latest business events, in exactly the payload shape delivered by a webhook subscription — the same payload builder powers real deliveries and this list.
What it's for
performListin Zapier/Make apps: when a user tests a trigger, the app shows real recent samples, guaranteed to match what a real delivery will send.- Integration debugging: inspect what would be delivered without waiting for a new event.
The list combines two sources, from newest to oldest:
- events recorded in the account's delivery queue, with the exact data that was or will be delivered;
- supplemented by events from the activity log that the queue didn't record (no subscription was listening to them at the time), formatted by the same builder.
So it works even when no webhook subscription exists.
Events emitted outside the log (lead_, note_,
task_, sms_, email_, call_…)
only appear once a subscription listens to them: as long
as none does, they aren't recorded anywhere. Internal
event types (audit) never appear, and
sensitive keys in the changes field are redacted just as they are on
delivery.
Difference from a real delivery
Each item's id field is the event's identifier at its
source — on a real delivery, id is the delivery's unique
identifier (X-). The data. field is
always null in a sample: it is resolved at delivery
time. The shape and every other field are identical.
No cursor pagination
This is a feed of recent samples, capped at 25 items
(limit, default 10). The response returns
pagination. and has_.
webhooks:manageQuery parameters
| Name | Type | Required | Description |
|---|---|---|---|
event | string | optional | Restricts results to events of this type (a catalog value,
e.g. lead_, booking_, automation_).
A value outside the catalog returns 400 validation_
(reason: unknown_). |
limit | integer | optional | Maximum number of items (integer from 1 to 25, default 10). A non-integer or out-of-range value returns 400 validation_. |
Responses
| Status | Description |
|---|---|
200 | Latest deliverable events, from newest to oldest. |
400 | Invalid request.
|
401 | The API key is missing, unknown or expired.
|
403 | Authorization refused.
|
429 | Rate limit reached.
|
500 | Unexpected server error. Always include the
|
501 | Test keys (
|
503 | A service the request depends on didn't respond (reading the key, the
account or the plan). The same request will go through once it's back:
retry after the
|
Example request
curl -X GET 'https://api.capturia.io/v1/webhook-events' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'