curl -X POST "https://api.sitespeak.ai/v1/agency/clients/{client_id}/chatbots" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: billing-account-1001-agent-2" \
-d '{
"name": "Acme Sales Agent",
"website_url": "https://acme.example"
}'
const response = await fetch(
'https://api.sitespeak.ai/v1/agency/clients/{client_id}/chatbots',
{
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
'Idempotency-Key': 'billing-account-1001-agent-2'
},
body: JSON.stringify({
name: 'Acme Sales Agent',
website_url: 'https://acme.example'
})
}
);
const data = await response.json();
console.log(data);
Agency
Create Client AI Agent
Creates an AI agent in a client workspace
POST
/
v1
/
agency
/
clients
/
{client_id}
/
chatbots
curl -X POST "https://api.sitespeak.ai/v1/agency/clients/{client_id}/chatbots" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: billing-account-1001-agent-2" \
-d '{
"name": "Acme Sales Agent",
"website_url": "https://acme.example"
}'
const response = await fetch(
'https://api.sitespeak.ai/v1/agency/clients/{client_id}/chatbots',
{
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
'Idempotency-Key': 'billing-account-1001-agent-2'
},
body: JSON.stringify({
name: 'Acme Sales Agent',
website_url: 'https://acme.example'
})
}
);
const data = await response.json();
console.log(data);
Available on agency plans. The API token must belong to the agency owner.
Path Parameters
| Name | Type | Description |
|---|---|---|
| client_id* | String | The ID of the client workspace. |
Headers
| Name | Type | Description |
|---|---|---|
| Accept* | String | application/json |
| Authorization* | String | Bearer |
| Content-Type* | String | application/json |
| Idempotency-Key* | String | A unique key for this request. Retrying with the same key and body returns the original response instead of creating a duplicate agent. |
Body Parameters
| Name | Type | Description |
|---|---|---|
| name* | String | The AI agent name. |
| website_url | String | A website URL to crawl and train the agent on. |
| accent_color | String | Accent color for the agent widget. A random gradient is used when omitted. |
curl -X POST "https://api.sitespeak.ai/v1/agency/clients/{client_id}/chatbots" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: billing-account-1001-agent-2" \
-d '{
"name": "Acme Sales Agent",
"website_url": "https://acme.example"
}'
const response = await fetch(
'https://api.sitespeak.ai/v1/agency/clients/{client_id}/chatbots',
{
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
'Idempotency-Key': 'billing-account-1001-agent-2'
},
body: JSON.stringify({
name: 'Acme Sales Agent',
website_url: 'https://acme.example'
})
}
);
const data = await response.json();
console.log(data);
Response
- 201 Created
- 400 Missing Idempotency-Key
- 403 Not an agency account
- 404 Not found
- 409 Request in progress
- 422 Validation error
{
"chatbot": {
"id": "9f2a1c44-7d31-4a09-b2f1-3f5f4f2f7f10",
"name": "Acme Sales Agent",
"enabled": true,
"accent_color": "linear-gradient(135deg, #4f46e5, #6366f1)",
"messages_remaining": 726,
"created_at": "2026-07-22T19:40:00+00:00"
}
}
Returns when the
Idempotency-Key header is missing.Returns when the API token does not belong to an agency account owner.
Returns when no client workspace with this ID exists in your agency.
Returns when a request with the same
Idempotency-Key is still being processed. Retry shortly.Returns when the client’s AI agent limit or your plan’s agent limit is reached, a field is invalid, or the
Idempotency-Key was already used with a different request body.Last modified on July 22, 2026
⌘I