Docs: Webhooks
Webhooks
Signed, retried notices of what happened on your site, sent to HTTPS addresses you choose: events, verifying, retries and the delivery log.
Since 1.21.0 a site can send signed, retried notices of what happened on it to HTTPS addresses its staff set. Open System ▸ Webhooks (permission Manage outbound webhooks). It has an Endpoints tab and a Delivery log tab. No cron job and no host setup is needed.
Off until a person turns it on #
The switch On for this site is off on every install, so updating changes nothing. While it is off nothing is queued, and notices still waiting are marked skipped, so turning it on later sends no backlog. No credential, draft or import can turn it on; a person does it on the Webhooks page. The Administrator role holds the permission after the update; give it to others in the role editor.
Events #
There are five:
- a page is published (
core.page_published); - a blog post is published (
blog.post_published, sent once its publish date has passed); - a support ticket is opened (
tickets.ticket_opened); - a member signs up (
core.member_signed_up); - a test ping (
core.ping), sent only when a person presses Send test.
Each endpoint chooses its events, and an event is offered only if the person who sets the endpoint may see what it reports. A notice carries ids and public facts, never a name, an email address, a ticket subject or a message. A page or post that was already published and is saved again raises nothing.
What a receiver gets #
One POST per delivery with a JSON body of at most 64 KB; a larger body ends that delivery as failed. The body holds id, event_id, type, version, created_at, site and data. Every retry and every replay sends the same bytes. There is no promise about order: two events may arrive in either order.
Signing and verifying #
Deliveries follow the Standard Webhooks scheme. The headers webhook-id, webhook-timestamp and webhook-signature carry an HMAC-SHA256 signature over the id, the timestamp and the raw body, made with the endpoint's secret. A receiver recomputes it from the raw body it received, compares in constant time and refuses a timestamp far from its own clock. The exact steps are in the Outbound webhooks section of STABILITY.md in the release. The secret is shown once, when a person creates or rotates it; during a rotation both secrets sign for a short while, so a receiver can switch without a gap.
At least once #
Delivery is at least once, never exactly once: a send that dies after the receiver answered goes out again with the same id. A receiver must de-duplicate on id.
Retries, and switching itself off #
- A 2xx answer counts as delivered. Anything else, and every network error, is retried after 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours: six attempts over about 20 hours, then the delivery is failed. A redirect is never followed.
- A 410 answer switches the endpoint off at once.
- An endpoint whose deliveries fail five in a row switches itself off, writes an Activity row, notifies its owner and everyone who may manage webhooks (on the site and by email) and shows a Health finding naming the receiver and the reason. Queued deliveries to a dead receiver are tried one after another, so with a long queue this can take several days.
- A replay and a test do not count toward the five.
Who a delivery acts as #
Each endpoint belongs to the person who set it, and every delivery is judged as that person at each attempt. If they lose the permission, or the account goes away, or their password or two-step sign-in changes, the endpoint switches off with a notice, and only the owner can switch it on again. Adding or changing an endpoint asks you to confirm it is you, and needs two-factor authentication turned on in your Profile first.
Addresses #
Only https addresses are accepted. A notice never goes into a private or local network: webhooks, content sync and social posting share one list of forbidden destinations, which also refuses a link with a user part, a port above 65535 and the IPv4-translated range. A host name is judged once at the send, and the pinned address is the one used. A development site can allow its own loopback address in its configuration file only. The address is stored sealed and never shown again, only its host. A webhook set up under another site address sends nothing until its secret is rotated.
The delivery log #
The Delivery log tab lists every delivery with its status (pending, delivered, failed, skipped or cancelled), its tries, the receiver's answer code and a short error. It never stores a response body or header. A delivery can be replayed, and Send test sends a ping at once.
The Operator API #
It reads endpoints, deliveries and the event list, and proposes a new endpoint, a change or a deletion as a draft a person approves. An approved new endpoint is created switched off with no secret; a person sets a secret and switches it on. A draft can switch an endpoint off, never on. See Operator API.