webhooks:manage. Each key is limited to 60 calls a minute on these routes.
All routes act on the workspace of the key and never on one named by the caller. Another workspace’s endpoint id answers 404
not_found. The console’s own /v1/webhooks routes need a signed-in admin and are separate: they are in the Console API.
There is no route to edit an endpoint with a key. To change its URL or events, delete it and create a new one, or use the console.
Events
GET /v1/partner/webhooks/events returns the list below, as a JSON array of strings.
The events in the first eleven rows share one envelope:
event, event_id, occurred_at and tenant_id, then their own keys. The console events in the last rows have a smaller payload without event or event_id (for example document.completed carries document_id, job_id, status, document_type and page_count). Route on the X-Sahl-Event header, which every delivery carries.
Payloads carry ids, your reference, statuses and check keys. They never carry a name, a date of birth, a balance or a document’s contents. Events are sent for both environments, and the payload says which.
Create an endpoint
secret is the signing secret, whsec_ followed by 48 characters. It is in the create answer only, and only when Sahl generated it. If you sent your own secret the answer carries "secret": null. Store it in a secret manager. In the list answers events is one comma-separated string.
An invalid URL answers 422 with a code in detail.code: webhook_url_scheme (not https), webhook_url_invalid, webhook_url_unresolvable (the name does not resolve) or webhook_url_private_address.
List, test and delete
success is true for any status below 400. error says why nothing was sent when the URL was refused (“Refused, not sent: …”). The test delivery is a test.ping, signed like a real one, with the header X-Sahl-Event: test.ping. It is not shaped like the other events (see Webhooks).
Delivery log and replay
Scopewebhooks:manage too. These routes show what Sahl sent to your endpoints and let you send it again. They cover your workspace only: another workspace’s delivery is a 404 like a missing one. The environment is X-Sahl-Environment or ?environment= (sandbox by default): it is the one the event’s payload names, and an event that names none is listed in both.
A delivery’s outcome is delivered, pending (not sent yet, or failed and waiting for the retry job: see next_retry_at) or failed (every attempt used).
List the deliveries
attempt_count counts replays too. http_status_code is the last attempt’s status. id is also the X-Sahl-Delivery header you receive.
GET /v1/partner/webhook-deliveries/summary counts the deliveries queued in the last 24 hours and 7 days per outcome:
One delivery
GET /v1/partner/webhook-deliveries/{delivery_id}:
payload is the JSON body exactly as sent (ids, references and statuses only). attempts.last.excerpt is the first 200 characters of your receiver’s answer or of the error, with secrets removed. attempts.replays lists the replays made with this API, latest first (at, signature_timestamp, delivered, http_status_code). idempotency_key is the X-Sahl-Delivery value, the same on every attempt and replay: de-duplicate on it.
Replay
X-Sahl-Delivery id, with a fresh signature and a fresh X-Sahl-Timestamp (see Verify the signature), and answers with your receiver’s reply. It makes one attempt. A failed replay goes back on the automatic retry schedule while attempts remain (next_retry_at). Because the id is unchanged, a receiver that de-duplicates on X-Sahl-Delivery handles it as the same event.
Verify the signature
Every delivery carries these headers:
Read the raw bytes before you parse the JSON, compare in constant time, and reject a timestamp that is too far from your clock. The window below, 5 minutes, is your choice and not a Sahl rule. Each retry is signed again, so its timestamp is fresh.
Delivery and retries
A delivery succeeds on any 2xx answer. Redirects are not followed and your server has 30 seconds to answer. A delivery that does not get a 2xx is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours: 6 attempts in all, the first included. After the sixth failure it stays failed. Delivery is at least once and not ordered: de-duplicate onX-Sahl-Delivery or on event_id, answer quickly with a 2xx and do the work afterwards. The full description, with a receiver example, is in Webhooks.