API v2 overview
Start here for the Askocto REST API v2: base URL, API keys, versioning, request conventions and a map of every resource.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
API v2 is the current REST API of Askocto. Use it to manage agents, sources, procedures and actions, chat with an agent from your own app, read conversations, work with Helpdesk tickets and send WhatsApp template messages. The older v1 API is the legacy chatbots API, see the v1 overview.
Base URL and versioning
All v2 paths start with /v2 on one host:
https://api.askocto.co/v2
The version is part of the path. v1 paths start with /v1. New integrations should use v2, and a v1 chatbot ID is the agent ID in v2.
Your first request
Create a key in Workspace Settings > API keys, then export it:
export OCTO_API_KEY="oc_test_..."
curl "https://api.askocto.co/v2/agents?limit=1" \
-H "Authorization: Bearer $OCTO_API_KEY"
The same call in Node 20 or later:
const response = await fetch("https://api.askocto.co/v2/agents?limit=1", {
headers: { Authorization: `Bearer ${process.env.OCTO_API_KEY}` },
})
console.log(await response.json())
Keys are shown once and start with oc_live_ or oc_test_. They act on the whole workspace. See Authentication for rotation and storage.
Conventions
- Bodies are JSON with
Content-Type: application/json. File uploads usemultipart/form-dataand streamed chat replies usetext/event-stream. - IDs are strings with a prefix:
agt_agent,src_source,prc_procedure,act_action,conv_conversation,msg_message,tkt_ticket,con_contact,usr_user. - Timestamps are ISO 8601 UTC strings, for example
2026-03-14T09:30:00Z. - Lists return
{ "data": [...], "nextCursor": "cur_..." }, ornullfornextCursoron the last page. Read Pagination. - Errors return an
errorobject withcode,messageandrequestId. Read Error handling for the codes and retry rules.
Resources
- Agents: create, configure and chat. Start with the Agents overview, then try Chat with an agent. Replies can be streamed, see Streaming.
- Sources: the knowledge of an agent. See the Sources overview.
- Procedures and actions: list, read, create and change them under each agent. Their endpoints have their own sections in the sidebar.
- Conversations: read and manage them with List conversations. Events and collected data have sections of their own.
- Helpdesk: tickets, teams and statuses. See the Helpdesk overview.
- WhatsApp: templates and outbound messages. See the WhatsApp overview.
- Health: Health check confirms the API is reachable.
Every endpoint page shows the method and path, the parameters, a curl and a JavaScript example, the full response and the errors it can return.