DocsAI assistants and API
Webhooks
Tell your own service when something happens in Adea. Each message is signed, carries ids, titles and links, and is sent again if it doesn't arrive.
On this page
A webhook is an address of your own that Adea calls when something happens. Use it to start work in your own tools: pick up an answer when Adea has finished a question you sent over the API, open a ticket when an insight is published, update a sheet when rows enter a list, or tell a chat room when a scheduled page has gone out.
Only administrators can add and change webhooks. They are on the Developers page in Settings, under the API keys.
Add a webhook
- Open Settings, then Developers, and find Webhooks.
- Write the address of your service. It has to start with
https://and be reachable from the internet. Addresses on a private network are refused. - Choose what it hears about, then choose Add webhook.
- Copy the signing secret and keep it somewhere safe. It is shown once.
Each webhook has its own signing secret. A company can have up to 10 webhooks. Adding one is written to the security log.
What you can listen for
| Event | Sent when |
|---|---|
thread.answered |
Adea has finished answering in a thread. |
insight.published |
Adea publishes an insight. |
measure.changed |
A number Adea follows ended last night outside what is normal for it. |
list.rows_added |
Rows enter a list, or come back to it. |
list.rows_left |
Rows drop out of a list. |
page.sent |
A scheduled page has been sent. |
understanding.changed |
What Adea understands changes, or a change of Adea’s waits for a person’s yes. |
What a message holds
A message is JSON, sent with POST. It carries ids, names, a link and a little text, never the values in your rows and never personal data. To see more, follow the link, where Adea’s usual access rules apply.
{
"id": "0198f1c2-7d1e-7c3a-9b5e-2f6a8d4c1e90",
"type": "insight.published",
"createdAt": "2026-10-07T08:30:12.000Z",
"data": {
"insightId": "0198f1c2-5a0b-7e11-8c44-91d2b7e3a6f5",
"title": "Bookings from Aarhus fell 18 %",
"severity": 4,
"threadId": "0198f1c2-4f3e-7a02-b1c7-5d09e8a2c3f1",
"url": "https://your-company.adea.app/insights/0198f1c2-5a0b-7e11-8c44-91d2b7e3a6f5"
}
}
Every message has id, type, createdAt and a data object with a title and a url. The rest of data depends on the event:
| Event | Also in data |
|---|---|
thread.answered |
threadId; startedBy (person, routine or event); visibility (private or company); text, Adea’s answer in words, up to 2,000 characters. text is only there when the thread is shared with the company, otherwise it is null: read a private thread with threads.get as its owner. |
insight.published |
insightId; severity from 1 to 5; threadId, the thread that found it. |
measure.changed |
measureId; asOf, the day; direction (up or down); changePercent, how far from normal, or null. |
list.rows_added |
listId; count, how many rows. Not sent for a list’s first fill or for private lists. |
list.rows_left |
listId; count. |
page.sent |
pageId; channels, where it went, like mail,slack. |
understanding.changed |
key, the item’s name in the understanding; kind (section, term, trap and so on); version; change (created, changed, archived or proposed); summary, one line on what changed. |
title is what people named the thing, or for thread.answered the thread’s title. A proposed change has not been made yet: it waits for a person in Adea.
Check that it came from Adea
Every message has these headers:
Adea-Signature:t=<seconds>,v1=<signature>Adea-Event: the event, likeinsight.publishedAdea-Delivery: the message’s id, the same asidin the body
The signature is an HMAC with SHA-256 over the timestamp, a dot and the exact body, using the webhook’s signing secret. Compute it yourself and compare. Refuse a message whose timestamp is more than five minutes old.
import { createHmac, timingSafeEqual } from "node:crypto";
export function fromAdea(secret, header, rawBody) {
const t = /t=(\d+)/.exec(header)?.[1];
const v1 = /v1=([0-9a-f]+)/.exec(header)?.[1];
if (!t || !v1 || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
const given = Buffer.from(v1, "hex");
return expected.length === given.length && timingSafeEqual(expected, given);
}
Use the body exactly as it arrived, before any parsing.
Answer quickly
Answer with any 2xx status within 10 seconds. Do the slow work after you have answered. Adea doesn’t follow redirects.
If it doesn’t arrive
A message that doesn’t get a 2xx answer is sent again, after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and a day. After the eighth try Adea gives up on it. A message can arrive more than once, so use Adea-Delivery to ignore one you have already handled.
If 20 messages in a row fail, Adea pauses the webhook and the page says so. Fix your service, then switch the webhook on again.
Test and look back
- Send a test sends a message of type
testto the address, signed like the real ones. It holds none of your data. - Last messages shows the last 50 sent to a webhook: which event, whether it arrived, the status your service answered with and when the next try is. A message that didn’t arrive can be sent again from there.
Switch off or delete
Switch a webhook off to stop messages without losing its settings. Delete it to remove it and its log. Deleting one is written to the security log.
With the API
Everything on the page is an action, so you can manage webhooks from a script too: webhooks.list, webhooks.create, webhooks.change, webhooks.test, webhooks.log, webhooks.retry and webhooks.delete. See the API.
Still stuck? Write to hello@adea.app. A person answers.