Docs menu

DocsAI assistants and API

The API

Ask Adea a question, read its answer, run a recipe and read lists, pages and insights from your own code. The OpenAPI file lists every call.

6 min readOpen as Markdown
On this page

With the API your own code can ask Adea a question and read the answer, run a recipe, and read lists, pages, insights and what Adea understands about your business. A call has the same checks as a click: your role, your plan, Guardian and the month’s analysis. You see what you could see in Adea, never more.

The address

Each company has its own address, and the API lives under it:

https://your-company.adea.app/api/v1

What you can call

The OpenAPI file describes every call: its name, what it needs, what it returns, whether it only reads or also changes something, and what it costs. Fetch it here:

curl https://adea.app/api/v1/openapi.json

The calls for working with Adea’s answers are these:

Call What it does
threads.start Asks Adea a question, or gives it a job: a number, a why, a record, a list or a page to build. Returns the thread to follow.
threads.continue Asks a follow-up in a thread, or answers a question Adea asked there.
threads.get A thread with its messages and Adea’s answers.
threads.list Your threads, and the ones shared with the company.
threads.events What Adea is doing in a thread right now, step by step.
threads.attach Adds an image to a question.
recipes.list, recipes.get The recipes Adea has saved, and one recipe in full.
recipes.run Runs a recipe for a period or other settings and returns its table. No AI is used, so it is fast and always gives the same answer for the same data.
lists.index, lists.get Your lists, and one list with its rows, why each row is on it and who owns it.
lists.export A list as a CSV file. A person has to confirm it first.
pages.list, pages.get Your pages, and one page with its blocks.
pages.run Runs a page’s recipes for the filters you give and returns its numbers. No AI is used.
pages.pdf Makes a PDF of a page. A person has to confirm it first.
insights.list, insights.get What Adea found while watching the business, and one insight in full.
understanding.get What Adea understands about the business: the sections, terms, traps and the map of the data, with their evidence.

The file also lists the calls that set Adea up: your team, data sources, code, comments, API keys and webhooks. What Adea understands, its proposals, working a list, building a page and setting up routines are done by people in the app, or by asking in a thread, so they are not open to the API.

Ask a question

Start a thread, then read it until Adea’s answer is there:

curl -X POST https://your-company.adea.app/api/v1/actions/threads.start \
  -H "Authorization: Bearer $ADEA_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "How many bookings did we get last week, and how does that compare with the week before?" }'
{ "ok": true, "data": { "threadId": "...", "runId": "...", "seq": 1 }, "changed": [] }

Adea works on it for a while. Call threads.get with the threadId; when the last message has status: "done", its content is the answer in words and blocks hold the numbers, tables and charts. A thread you start is private to you unless you send "visibility": "company". To be told when the answer is ready instead of asking again, add a webhook for thread.answered.

Run a recipe

A recipe is a saved way of computing something, so you can fetch the same number every time from a dashboard or a script. Find its id with recipes.list, then run it:

curl -X POST https://your-company.adea.app/api/v1/actions/recipes.run \
  -H "Authorization: Bearer $ADEA_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "recipeId": "...", "params": { "from": "2026-09-01", "to": "2026-09-30" } }'

The answer has the table’s columns and rows, and when the numbers were computed. Add "fresh": true to compute them again instead of taking a recent result.

Every call works the same way

Send a POST to /api/v1/actions/{name} with the input as JSON. A call that works returns ok: true and the result in data, as above. For example, to read a list:

curl -X POST https://your-company.adea.app/api/v1/actions/lists.get \
  -H "Authorization: Bearer $ADEA_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "listId": "..." }'

A call that doesn’t work returns ok: false and an error with a code and a message in plain words. The codes you will meet most often:

Code Meaning
invalid_input Some of the details aren’t valid. The error says which.
unauthenticated You aren’t signed in, or the key is not valid.
forbidden Your role doesn’t allow this.
plan_required The action isn’t part of your plan.
usage_limit The company has used this month’s analysis. It renews on the 1st, or an administrator can add more.
confirmation_required A person has to confirm this first. See below.
guardian_held An administrator has to approve this first.
rate_limited Too many calls at once. Wait a minute.

Actions that need a confirmation

A few calls need a person to confirm them: anything that sends your data out of Adea, such as lists.export. A call to one of these returns confirmation_required with a preview of what would happen. The API can’t confirm on a person’s behalf. A person confirms in Adea, or you send them the link.

Keys and sign-in

Calls from the signed-in app use your session. A script uses a key, sent as Authorization: Bearer adea_.... A key belongs to one company and works only on that company’s address. It acts as the person who made it, with at most the role you give it, and every call is logged.

To make a key, open Settings, then Developers, and choose a name, a role and when it should expire. The key is shown once, so copy it when it appears. Only administrators and developers can make keys, a key can’t have more than your own role, and an administrator sees everyone’s keys and can switch any of them off. A key stops working when its person is removed from the team.

Webhooks

To have Adea call your service when something happens, such as an answer being ready, an insight being published or rows entering a list, see Webhooks.

Limits

Calls are limited per person and per key. When you go over, the answer is rate_limited.

Other ways in

Still stuck? Write to hello@adea.app. A person answers.