Skip to content

Webhooks

This page is for staff Admins. A webhook sends what happens to requests to a system of yours, or to a chat channel, as it happens. You manage webhooks on the Webhooks card, the last card on Settings › Integrations. Each webhook picks the request types and the events it gets.

The Add a webhook dialog, filled in: the name Procurement, the address https://hooks.adiutor.dev/requests, Signed JSON, All request types, and Requests raised, Replies and Status changes ticked, with the warning about staff-only information under them.
  1. On the Webhooks card, press Add webhook. The card says “No webhooks yet” until you have one.
  2. Fill in the dialog Add a webhook: “From now on, what you choose here is sent to this address.”
  3. Press Add webhook.
  4. Copy the signing secret that the dialog shows, then press Done. The toast “Webhook added.” follows.

Adding a webhook asks you to confirm it’s you with your second step if you haven’t done so in the last 15 minutes. Add webhook then sends you to the confirmation page first and brings you back to the card. Editing, renewing the secret and turning a webhook on ask for it too; turning off, removing, Send a test and Send again don’t. Where the webhook sends is what the staff trust it with, so changing it is treated like changing how you sign in.

The dialog has these fields.

Field What to enter
Name What the staff call it, for example “Procurement” or “Staff chat”. Required, at most 80 characters, without web addresses.
Address Where to send it: an https:// address, at most 2,048 characters. It may hold a token, so it’s kept secret and only its host is shown.
Format Signed JSON or Chat message (see below).
Request types All request types (“Every type, also the ones added later.”) or Chosen types, with a checkbox per request type. Choose at least one.
Send The events to send. Choose at least one. Requests raised, Replies and Status changes are ticked to begin with.

The address is checked when you save it, and again each time something is sent.

  • It must start with https://. Plain http:// works only for the computer Adiutor runs on (such as localhost), and only once the operator allows it, as the next point explains.
  • It can’t point inside the server’s own network (private and local addresses, and the addresses clouds use for their own services). The operator of the server can allow chosen networks with WEBHOOK_ALLOWED_NETWORKS, as described in the environment variables. Nobody can allow one from the app.
  • It can’t hold a user name or a password: “the signature already tells the receiver who sent it.”
  • A host name that can’t be found is accepted when you save it, and fails when something is sent.
  • Signed JSON is for your own systems: “Signed as Standard Webhooks describes, with every detail, for a system of yours.” The receiver checks the signature: see Verifying webhook deliveries.
  • Chat message is a short message that Slack, Google Chat, Mattermost and Discord show as it is, in Adiutor’s default language (not the language of whoever caused it). For Discord, use its Slack-compatible address (the one that ends in /slack). A message is a heading with the request’s reference and title, a sentence per event, and a link to the request. Texts are shortened, formatting and images are left out, and nothing in them can mention a channel. Chat messages carry the signature headers too, which chat services ignore.
Event Sent when
Requests raised A request is raised.
Replies Someone replies, a reply that proposes a solution included.
Internal notes A staff member writes an internal note.
Status changes A request’s status changes.
Assignees A staff member is assigned to a request or removed from it.
Title, type and priority A request’s title, type or priority changes.
Missed deadlines One of a request’s SLA deadlines is missed: its response or its resolution. Only webhooks that choose it get it.

A webhook hears of the events it chose, for the request types it covers, whoever made the change. When a request changes type, the webhooks of the old type and of the new type both hear of it, once. What happens while a webhook is off isn’t sent later.

Internal requests (the staff’s own, without a company) go to every webhook like any other request: its request types and events still apply, and the request has no company. Internal notes go only to webhooks that choose Internal notes, and priorities only to webhooks that choose Title, type and priority: both the changes of priority and, in a Signed JSON delivery, the request’s current priority.

When a webhook is added, the dialog says “Webhook added. Copy the signing secret”. The field under it holds a secret that starts with whsec_. Press Copy secret, then Done. “It won’t be shown again. The receiver checks each delivery’s signature with it.” Hand it to whoever builds the receiver, through a safe channel. If it’s lost, renew it.

Each webhook on the card shows its name (a link to its page), a badge that says whether it’s on, a badge with its format, “To hooks.adiutor.dev · All request types” and the events it sends. The address and the secret are never shown, only the host.

A webhook's page: its details (Sends to hooks.adiutor.dev, Format, Request types, Sends, Added, Secret renewed Never) with the buttons Edit, Send a test, Turn off, Renew secret and Remove, and the Deliveries table with delivered deliveries, one tried again before it got through, and a test.

Press the name on the card to open it. All webhooks takes you back. The first card, headed with the webhook’s name and “Where it sends, and what.”, shows Sends to, Format, Request types, Sends, Added and Secret renewed (Never until you renew it). Failing since appears while deliveries are failing.

  • Edit changes any of the fields. Leave Address empty to keep the saved address, which is never shown again. Press Save. It needs your second step, like adding.
  • Send a test sends a test delivery at once and shows the result as a toast: “Test delivered: the receiver answered 200.” or “The test wasn’t delivered.”, with the reason. It works on a webhook that is off, so you can check it before turning it on. It sends the type webhook.test with the webhook’s name, or, for a chat message, a sentence saying it works. It is signed like any delivery.
  • Turn off stops everything. Turn on starts it again (with your second step), from a clean start.
  • Renew secret makes a new secret. “The old secret stops working at once. Deliveries the receiver refuses meanwhile are tried again, so give it the new secret soon.” It needs your second step, like adding. The dialog then shows the new secret once, like when adding.
  • Remove asks “Remove Procurement?”, and Remove webhook deletes the webhook and its deliveries. “This can’t be undone.” The toast says “Webhook removed.”

The Deliveries card lists what was sent in the last 30 days and how it went, “never what was sent or what the receiver answered”. Older deliveries are deleted. The sort menu (“Time, newest first”) puts the newest or the oldest first.

Column Shows
What The events, with a link to the request, or Test.
When When it was made.
Result A status, and what happened.
Attempts How many attempts, and “Next attempt” with its time while one is waiting.

Narrow screens fold the columns into What. The statuses are Sending, Delivered, Failed and Cancelled (nothing was left to send, or the webhook was turned off).

Under the status, a line says what happened:

  • “Answered 200.” The receiver accepted it. Any 2xx counts.
  • “It answered 500.” Any other answer is a failure.
  • “It answered with a redirect (301), which webhooks never follow.”
  • “No answer within 10 seconds.”
  • “Its host name can’t be found.”
  • “The connection was refused or broke off.”
  • “Its certificate or encryption can’t be trusted.”
  • “Its address is inside this server’s own network.”
  • “Its address or secret can’t be read any more.”

A delivery that fails is tried again, six attempts in all: the first, then after 5 minutes, 30 minutes, 2 hours, 8 hours and 24 hours. Every attempt uses the webhook’s current address and secret, and what it still sends. After the last one the status is Failed. Send again next to a delivery tries it once more the next time the background jobs run (usually within 5 minutes), with the same delivery ID. It is there for webhooks that are on, and for deliveries that aren’t tests and aren’t being sent.

A webhook turns itself off when:

  • every delivery has failed for 3 days;
  • the receiver answers 410 Gone, at once (“its receiver answered that it’s gone for good”);
  • its address or secret can’t be read any more.

The badge then says Off: kept failing, Off: receiver gone or Off: can’t be read (a webhook you turned off says Off; one that works says On). Its page explains why, for example “It was turned off automatically because every delivery failed for 3 days. Once its receiver works, turn it on again.” Every active staff Admin gets the email “The webhook “Procurement” was turned off”, which names the reason and never the address.

To turn it on again, fix the receiver, check it with Send a test, then press Turn on. For Off: can’t be read, edit it and enter its address again, press Renew secret, then turn it on. Tests never count towards a turn-off.

A delivery of the type request.updated holds the request (its number, reference, title, status, type, company and link, and its priority for webhooks that choose Title, type and priority) and the events since the last delivery, in order. People appear by name and side only (the company or the staff). An internal request has no company. The fields are listed on Webhook events.

What never goes out: email addresses, user IDs, sign-in links, and who was signed in as whom.

Alex Admin wants the purchasing department’s tool to hear of new requests. Alex presses Add webhook, names it “Procurement”, enters https://hooks.adiutor.dev/requests, keeps Signed JSON and All request types, and keeps the three events ticked to begin with. After confirming with their authenticator app, Alex copies the secret and sends it to the developer, who follows Verifying webhook deliveries. Then Alex presses Send a test and sees “Test delivered: the receiver answered 200.”

Only staff Admins see Settings. Everyone else gets the “This page doesn’t exist or you don’t have access to it.” page.

  • A staff Admin can add, edit, renew, turn on or off and remove at most 30 times an hour, and send at most 20 tests and Send again deliveries an hour.
  • Every change is recorded in the audit log, which staff Admins and Managers read: Added a webhook, Changed a webhook, Renewed a webhook’s signing secret, Turned a webhook off, Turned a webhook on and Removed a webhook. It names the webhook and its host, never the address or the secret. Tests and Send again aren’t recorded.
  • Delivery is at least once: the same delivery may arrive twice, so the receiver should skip one it has seen.
  • The receiver must answer within 10 seconds. A redirect counts as a failure: Adiutor never follows one, so give the final address.

Adiutor's code is released under the MIT License. The Adiutor name and logo aren’t covered by it; see the notice.

Set in Inter and JetBrains Mono, under the SIL Open Font License (Inter, JetBrains Mono).