Create a new chatbot
POST/v1/chatbots
Create a chatbot in your workspace with the legacy v1 API by setting its name, type, language and instructions.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Creates a chatbot in your workspace. Call it when you provision chatbots from a script, for example one per brand or per region.
Request
POST /v1/chatbots
Body fields:
| Name | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Display name of the chatbot. |
type |
string | No | support, sales or guidance. Defaults to support. |
instructions |
string | No | Plain-language guidance on role, tone and scope. |
language |
string | No | Main language as a two-letter code, for example en. |
model |
string | No | The model the chatbot answers with. Defaults to the workspace default. |
The new chatbot starts with the status draft. Add knowledge with sources, then publish it in the dashboard under Settings > Versions. See Your first agent for the steps.
Note: In v2 this is Create agent.
Example request
curl -X POST https://api.askocto.co/v1/chatbots \
-H "Authorization: Bearer $OCTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Store support",
"type": "support",
"language": "en",
"instructions": "Answer questions about orders, shipping and returns. Keep answers short and friendly."
}'
const response = await fetch("https://api.askocto.co/v1/chatbots", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OCTO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Store support",
type: "support",
language: "en",
instructions: "Answer questions about orders, shipping and returns. Keep answers short and friendly.",
}),
})
const chatbot = await response.json()
console.log(chatbot.id)
Example response
A successful call returns 201 Created.
{
"id": "agt_8f3k2m",
"name": "Store support",
"type": "support",
"status": "draft",
"model": "octo-balanced",
"instructions": "Answer questions about orders, shipping and returns. Keep answers short and friendly.",
"language": "en",
"createdAt": "2026-03-14T09:30:00Z",
"updatedAt": "2026-03-14T09:30:00Z",
"settings": {
"visibility": "private",
"initialMessages": [],
"suggestedMessages": []
}
}
Response fields
| Name | Type | Description |
|---|---|---|
id |
string | The chatbot ID, starting with agt_. Use it in every other v1 call. |
status |
string | draft or live. |
settings |
object | visibility, initialMessages and suggestedMessages. Change them with Update chatbot settings. |
The remaining fields echo what you sent, plus createdAt and updatedAt as ISO 8601 UTC timestamps.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request |
name is missing, or type is not one of the allowed values. |
| 401 | unauthorized |
The API key is missing, malformed or revoked. |
| 429 | rate_limited |
Too many requests. Wait for the number of seconds in the Retry-After header. |