Public API
Everything the dashboard does with your content, from your own code, Zapier or Make. Included with paid plans.
The machine-readable description is at /api/v1/openapi.json (OpenAPI 3.1). Import it into Postman, Insomnia, or a code generator.
1. Create a key
In the app: Account → API keys. Name the key, choose exactly what it may do, optionally limit it to one chatbot and give it an expiry. The key looks like tm_live_… and is shown once; we keep only a fingerprint. Revoke it any time.
Send it on every request:
curl https://YOUR-DOMAIN/api/v1/chatbots \
-H "Authorization: Bearer tm_live_XXXXXXXXXXXXXXXX"
2. Permissions
| Permission | Lets the key |
|---|---|
chatbots:read | List and read chatbots |
chatbots:write | Create chatbots; change name, greeting, instructions, fallback, reply language |
knowledge:read | List what a chatbot knows |
knowledge:write | Add website pages and Q&A answers; remove items |
conversations:read | Read conversations and transcripts |
leads:read / leads:write | Read leads / add leads and change their status |
chat | Send a message and get the answer (counts toward your message limit) |
webhooks:write | Subscribe a URL to events (used by Zapier and Make) |
No key can reach billing, team members, account settings or other keys. Those need a person signed in.
3. Endpoints
| Method and path | What it does |
|---|---|
GET /api/v1/me | Who the key belongs to and its permissions |
GET /api/v1/chatbots | List chatbots (?page=&limit=) |
POST /api/v1/chatbots | Create a chatbot (respects your plan's chatbot limit) |
GET|PATCH /api/v1/chatbots/{id} | Read or change a chatbot |
GET /api/v1/chatbots/{id}/knowledge | What it knows |
POST /api/v1/chatbots/{id}/knowledge/urls | Add up to 20 website pages |
POST /api/v1/chatbots/{id}/knowledge/qa | Add a question and its answer |
DELETE /api/v1/chatbots/{id}/knowledge/{itemId} | Remove an item |
GET /api/v1/chatbots/{id}/conversations | List conversations (?since= epoch ms) |
GET /api/v1/chatbots/{id}/conversations/{conversationId} | One conversation with its messages |
GET /api/v1/leads · GET /api/v1/chatbots/{id}/leads | List leads (?complete=, ?status=) |
POST /api/v1/chatbots/{id}/leads | Add a lead |
PATCH /api/v1/leads/{id} | Change a lead's status or follow-up date |
POST /api/v1/chatbots/{id}/chat | Ask a question, get the answer and its sources |
GET /api/v1/events · GET /api/v1/events/{type}/sample | Event types, and an example payload for each |
GET|POST|DELETE /api/v1/webhooks | Subscribe a URL to events (see Event webhooks) |
Timestamps are epoch milliseconds. Lists return total, page and limit.
4. Examples
Chat with a chatbot
curl -X POST https://YOUR-DOMAIN/api/v1/chatbots/CHATBOT_ID/chat \
-H "Authorization: Bearer tm_live_…" -H "Content-Type: application/json" \
-d '{"message": "Do you deliver on Sundays?", "visitorId": "customer-42"}'
# {"answer":"Yes — …","conversationId":"…","sources":[{"name":"Delivery FAQ","url":null,"kind":"qa"}]}
Pass the returned conversationId back to continue the same conversation. visitorId is your own id for the person; when the chatbot has visitor memory on it remembers them by it.
Teach it an answer
curl -X POST https://YOUR-DOMAIN/api/v1/chatbots/CHATBOT_ID/knowledge/qa \
-H "Authorization: Bearer tm_live_…" -H "Content-Type: application/json" \
-d '{"question": "What are your opening hours?", "answer": "9–5, Monday to Friday."}'
Read new leads
curl "https://YOUR-DOMAIN/api/v1/leads?complete=true&status=new" -H "Authorization: Bearer tm_live_…"
5. Errors and limits
Every error is { "error": "…", "code": "…" }. The code is stable; switch on it, not on the text.
| HTTP | code | Meaning |
|---|---|---|
| 401 | missing_api_key, invalid_api_key, api_key_expired | Key missing, wrong, revoked or expired |
| 403 | insufficient_scope, account_suspended, chatbot_disabled | The key lacks the permission, or the account/chatbot is switched off |
| 402 | plan_limit_reached, message_limit_reached | Your plan's limit is used up |
| 400 / 404 | invalid_request, not_found | Bad input, or it does not exist (another account's chatbot also answers 404) |
| 429 | rate_limited | 120 requests a minute per key (30 a minute for chat). Failed authentication is limited per address |
Chat messages count toward your plan's monthly messages exactly like website visitors' do.