Skip to content

Call a webhook

This is the one endpoint on these pages that other systems call, not your own scripts. A request to a webhook’s address starts every active workflow listening to it. Calling a webhook in the manual is the guide to send to the developer of the sending system, with the signing recipes. This page is the reference.

ANY https://api.doxtly.com/v1/webhooks/{id}

The address answers every HTTP method. A webhook takes the one method it is set to, exactly, and refuses the others. {id} is the webhook’s id, and the full address is in its url field.

Key permission: none by default. On a webhook with access_key authentication, the key needs call_webhooks. Unlike the rest of the API, this is checked by the webhook itself, so a key that lacks it gets 401, not 403.

The webhook’s authentication decides what a caller sends.

authentication tokenLocation Send
none Nothing. The address alone is enough.
token header Authorization: Bearer <token>
token query ?token=<token> in the address
access_key X-Api-Key and X-Api-Secret. The key must be switched on, not expired, of the webhook’s organization and given call_webhooks.

These credentials are never kept with the request and never reach a workflow.

Header When Meaning
Content-Type With a body See The body.
Idempotency-Key Optional, or required by requiresIdempotencyKey See Idempotency.
webhook-id, webhook-timestamp, webhook-signature With standard_webhooks The Standard Webhooks signature. The timestamp may be at most 5 minutes off, either way. webhook-signature may hold several signatures separated by spaces, as a sender changing its key does, and one right one is enough.
The webhook’s signatureHeader With hmac_sha256 The HMAC-SHA256 of the raw body, hex (upper or lower case) or base64, after the signaturePrefix if the webhook has one.
X-Request-ID Optional Your own id for the request, if it is a UUID. Otherwise Doxtly makes one.
Accept-Language Optional pl, es, de, pt, fr, uk, th, zh, hi, ar, ja, tr or it asks for refusals in that language. Otherwise they are in English.
Doxtly-Workflow-Chain Optional A workflow’s Webhook step sends this header. A system that calls back with it within an hour keeps the new run in the same chain.

Signing a request shows how to compute both signatures.

Method Where the data comes from
POST, PUT, PATCH The body
GET The address parameters
DELETE The address parameters, or the body if the webhook’s dataSource is body
Content-Type How the body is read
None, application/json, or any type ending in +json JSON
application/x-www-form-urlencoded Form fields
Any text/ type Text
Anything else, including multipart/form-data Refused with 415

The body can be up to the webhook’s maxBodyKb, at most 1024 KB. It may be empty: the workflow then starts with no data, unless the webhook’s schema requires some.

Address parameters are text, so with a GET webhook a JSON Schema sees "12", never the number 12.

Each workflow run gets the data at the top level, so the field email is the variable {{ email }}. The rest comes alongside:

Variable Holds
The data’s fields The fields of a JSON object or a form.
_params Address parameters with one value each, without the token.
_webhook.requestId The request, or for a repeat the first request with its key.
_webhook.correlationId The X-Request-ID.
_webhook.webhookId, _webhook.webhookName The webhook.
_webhook.method, _webhook.contentType How the request came.
_webhook.receivedAt When it came, in your organization’s time zone.
_webhook.headers The headers by lower-case name, without credentials or a signature. A repeated header’s values are joined with commas.
_webhook.body Data that isn’t an object: a list, a number or text. null otherwise.

An accepted request gets the webhook’s responseStatus, by default 202, with its responseBody as responseFormat says, or no body. A 204 never has one. There is no way to return a workflow’s result here: the runs start with the request and finish in their own time.

Every response carries X-Request-ID. It is the correlationId of the recorded request.

The webhook here takes a token and a signature, so the first two lines build the signature of the body.

Terminal window
BODY='{"email":"anna.kowalska@lindenlogistics.example","invoiceNumber":"INV-2026-0147"}'
SIGNATURE=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac 'kP9vT2mQ7xZc4LrB8sWn' -r | cut -d' ' -f1)
curl -i -X POST 'https://api.doxtly.com/v1/webhooks/01a1abe6-38ce-71af-877a-a6a4cccebce5' \
-H 'Authorization: Bearer nb-7Qm2xV9sLk4Tz8Rw1Hc6Yp3D' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: INV-2026-0147-requested' \
-H "X-Billing-Signature: sha256=$SIGNATURE" \
-d "$BODY"
HTTP/2 202
content-type: application/json
x-request-id: fa59b830-1252-4d29-9810-b5e9a5516f21
{"received":true}

With access_key authentication, the same call carries the API’s headers:

Terminal window
curl -i -X POST 'https://api.doxtly.com/v1/webhooks/01a1abe6-b99a-73b4-b410-5c8e015d49c0' \
-H "X-Api-Key: $DOXTLY_API_KEY" \
-H "X-Api-Secret: $DOXTLY_API_SECRET" \
-H 'Content-Type: application/json' \
-d '{"email":"anna.kowalska@lindenlogistics.example","invoiceNumber":"INV-2026-0147"}'
HTTP/2 202
content-type: text/html; charset=UTF-8
x-request-id: 44104352-a109-4434-a312-5a714a2ffbb4

A refusal is a problem document, with code naming what went wrong. Read code in a program. Checks run in this order, and the first that fails answers.

Order Status code When Extra header
1 404 None No webhook has this address. Not recorded.
2 403 organization_unavailable The organization that owns the webhook is unavailable. Not recorded.
3 429 None A rate limit is spent. Not recorded. Retry-After
4 404 inactive The webhook is switched off. The message reads as if no webhook were there.
5 405 method_not_allowed The webhook takes another method. Allow
6 401 unauthorized The token or key is missing or wrong, or the key can’t be used here. WWW-Authenticate: Bearer, for a token in the header
7 413 payload_too_large The body is larger than maxBodyKb.
8 401 signature_invalid The signature is missing or wrong, or its timestamp is too far off.
9 415 unsupported_media_type The content type isn’t one a webhook takes.
10 400 malformed The body isn’t valid JSON. violations says so.
11 400 idempotency_key_missing The webhook requires a key and there is none.
11 400 malformed The key isn’t 1 to 255 printable characters. violations says so.
12 422 invalid_data The data breaks the webhook’s JSON Schema. violations lists up to ten problems.
13 422 idempotency_key_reused The key was used with other content.
13 409 idempotency_key_in_use The first request with this key is still being handled. Retry-After: 1
14 503 limit_exceeded Your plan has no workflow runs left. Retry-After: 3600
Any 503 failed Doxtly couldn’t start the workflows. Send it again. Retry-After: 30
{
"violations": [
{
"field": "/",
"message": "Required properties are missing: invoiceNumber.",
"code": null
}
],
"type": "https://tools.ietf.org/html/rfc4918#section-11.2",
"title": "Unprocessable Content",
"status": 422,
"detail": "The data does not match the schema of this webhook.",
"instance": "/v1/webhooks/01a1abe6-38ce-71af-877a-a6a4cccebce5",
"code": "invalid_data"
}

In violations, field is the place in the data, such as /orderId, or / for the whole of it.

What to retry says how a caller should react to each answer.

A caller that times out can’t know whether its request arrived. An idempotency key makes sending it again safe: the workflows start once.

The key is the Idempotency-Key header. On a standard_webhooks webhook, webhook-id serves as the key when that header is missing. A key is 1 to 255 printable characters, an empty header counts as no key, and each webhook keeps its own keys for a day. Pick something that names the event: INV-2026-0147-requested stays the same however often the billing system retries, which a fresh random value wouldn’t.

A second request with the same key gets one of these answers:

Situation Answer Workflows
The first was answered The same status and the webhook’s body, with Idempotent-Replayed: true. Recorded as replayed. None start
The first is still being handled 409, with Retry-After: 1 None start
Same key, other method, parameters or body 422 None start
The first failed, or held the key for two minutes without an answer Handled normally Only those the first didn’t start

Your organization sets how many requests its webhooks take per hour, in three counts, each from 1 to 100,000. A request over any of them gets 429, and Retry-After says how many seconds to wait.

Limit Default
From one address, across all webhooks 1000
To one webhook from one address 600
To one webhook from anywhere 2000

A webhook that checks a token or an access key can turn the limits off with usesRateLimits: false. A webhook with none authentication is always held to them, even one that checks a signature. See Set up a webhook for the setting, and Request limits for changing the numbers.