Developers
Hols API
Read and answer Hols conversations, manage FAQs and receive events from your own tools, Zapier, Make or n8n.
Overview
The Hols API is a JSON REST API. It works with the conversations, unanswered questions and FAQs of one Hols team, and lets you subscribe to events (webhooks).
- Base URL:
https://app.anesphq.org/api/v1 - Format: JSON requests and answers, UTF-8. Times are UTC, in ISO 8601.
- Plans: the API and webhooks are included in the Growth and Scale plans (see Pricing).
Authentication
Every request carries a team API key. Create one in the Hols dashboard under Team > API Keys. Send it in the Authorization header:
Authorization: Bearer <your API key>
The header X-Api-Key: <your API key> works too. A key acts on its own team only, with the rights of a team admin for conversations and FAQs. Delete the key in the dashboard to revoke it.
Test the key:
curl -H "Authorization: Bearer $HOLS_API_KEY" https://app.anesphq.org/api/v1/me
Answers and errors
A successful answer is { "data": ... }. An error is { "error": { "message": "..." } } with one of these status codes:
| Status | Meaning |
|---|---|
401 | No API key, or the key is unknown or deleted. |
403 | The team's plan does not include the API. |
404 | The widget, conversation or hook does not belong to this team. |
405 | The method is not allowed on this path. |
409 | A limit is reached (for example 50 FAQs, or 20 hooks made through the API). |
422 | A field is missing or not valid. The message says which. |
429 | Too many requests. Wait the number of seconds in the Retry-After header. |
Rate limits: each API key may make 60 requests a minute and 10,000 a day.
Endpoints
Team
| Request | What it does |
|---|---|
GET /me | The key's team (team.id, team.name) and the event types. Use it to test the connection. |
GET /widgets | The team's chat widgets: id, name, enabled, aiEnabled, faqCount, createdAt. |
Conversations
| Request | What it does |
|---|---|
GET /widgets/{widgetId}/conversations | Recent conversations (last 90 days): those a person has first, then the newest. Query: status = human (a person has it), waiting (the visitor asked for a person and wrote last) or bot; limit 1 to 100, default 50. Each has id, channel, contactName, status, waitingForTeam, unansweredCount, lastMessageAt and messages (author, question, answer, source, createdAt). |
POST /widgets/{widgetId}/conversations/{conversationId}/reply | Body { "text": "..." }, 1 to 2,000 characters. Replies as the team, as in the dashboard inbox; on WhatsApp, Instagram, Messenger or LinkedIn for a channel conversation. Answers 201 { "sent": true }. |
POST /widgets/{widgetId}/conversations/{conversationId}/release | Gives the conversation back to Hols. { "released": false } when no person had it. |
Unanswered questions
| Request | What it does |
|---|---|
GET /widgets/{widgetId}/unanswered | Questions Hols could not answer and the team has not handled. The same question is grouped: question, count, lastAskedAt, ids. |
POST /widgets/{widgetId}/unanswered | Body { "ids": ["..."] }. Marks those questions as handled. |
FAQs
| Request | What it does |
|---|---|
GET /widgets/{widgetId}/faqs | The widget's FAQs: question, answer, synonyms. |
POST /widgets/{widgetId}/faqs | Body { "question": "...", "answer": "...", "synonyms": [] }. Adds one FAQ at the end. Question up to 300 characters, answer up to 2,000, at most 10 synonyms, at most 50 FAQs per widget (409). |
Events and webhooks (REST hooks)
| Request | What it does |
|---|---|
GET /events | The team's latest events, newest first, in the same body webhooks receive. Query: type (one or more event types, comma-separated), limit 1 to 100 (default 10), sample=1 for one example per type. Events are kept 7 to 14 days. |
GET /hooks | The team's webhook endpoints: id, url, label, events, source, disabled, createdAt. |
POST /hooks | Body { "url": "https://...", "events": ["conversation.handoff"], "label": "..." } (or "event" for one type; no events means all). Subscribes the URL. Answers 201 with the hook's id and its signing secret. With "tokenHeader": true also a token, sent as X-Hols-Token with every delivery. At most 20 hooks through the API per team. |
GET /hooks/{id} | One hook, with its signing secret and its token when it has one. |
DELETE /hooks/{id} | Unsubscribes the hook. |
Hooks made through the API also appear in the dashboard under Team > Webhooks, and the other way round.
Event types
Every delivery is a POST with a JSON body:
{
"id": "evt_bc72f70bd9ae4701a923648801879871",
"event": "conversation.handoff",
"data": {
"widgetId": "11111111-1111-4111-8111-111111111111",
"widgetName": "My shop",
"conversationId": "c_123",
"channel": null,
"contactName": "",
"reason": "unanswered",
"lastQuestion": "Do you ship to Italy?",
"createdAt": "2026-11-24T20:16:18.430Z"
}
}
Every data has widgetId, widgetName, conversationId, channel (null for the website chat, or whatsapp, instagram, messenger, linkedin), contactName and createdAt. Then:
| Event | When | More fields |
|---|---|---|
conversation.started | A visitor starts a new conversation. | firstQuestion |
conversation.handoff | The conversation waits for a person: the visitor asked (reason: "asked") or Hols could not answer ("unanswered"). | reason, lastQuestion |
conversation.released | The team gave the conversation back to Hols. | none |
message.created | A visitor question with Hols' answer, or a team reply. | messageId, author (visitor or team), question, answer, source (faq, ai, unanswered, limit, error, waiting, human) |
question.unanswered | Hols could not answer a question. | as message.created |
A delivery can arrive more than once. Use id to ignore repeats. Failed deliveries are retried.
Verifying deliveries
Every delivery is signed with the hook's secret (whsec_...). It carries the headers svix-id, svix-timestamp (Unix seconds) and svix-signature (v1,<base64>, several may be listed, separated by spaces). To check it:
- Refuse a timestamp more than 5 minutes from now.
- Take the key: base64-decode the secret after
whsec_. - Compute base64(HMAC-SHA256(key,
<svix-id>.<svix-timestamp>.<raw body>)) on the raw body exactly as received. - Accept the delivery when one
v1signature matches (compare in constant time).
The svix libraries (npm, PyPI and others) do this for you. Receivers that cannot check a signature can ask for a token instead ("tokenHeader": true) and accept only requests with the right X-Hols-Token header.
Zapier, Make and n8n
The Hols apps for Zapier, Make and n8n are built on this API: an instant trigger subscribes with POST /hooks when the automation is turned on, unsubscribes with DELETE /hooks/{id} when it is turned off, and takes its sample data from GET /events. Actions call the endpoints above.
Help
Questions about the API? Write to us and choose "Help with Hols".