List All Agents
GET /api/chatbots
Returns all agents belonging to the authenticated user, including conversation counts for each.
200 OK):
string
Unique identifier for the agent.
string
The agent’s display name.
string | null
Optional description of the agent’s purpose.
string
The AI model the agent uses (e.g.,
"gpt-4o-mini", "gpt-4o").string
The AI provider:
"openai", "anthropic", or "google".number
Response creativity setting between
0.0 (deterministic) and 1.0 (creative).integer
Maximum number of tokens in the agent’s response.
string
Agent status:
"active" or "inactive".integer
Total number of conversations started with this agent.
integer
Total number of messages exchanged with this agent.
string
ISO 8601 timestamp of when the agent was created.
Create an Agent
POST /api/chatbots
Creates a new agent. Returns 201 Created with the new agent object. Your plan determines how many agents you can create — a 403 response indicates you have reached your plan limit.
string
required
The agent’s display name. Shown in the dashboard and the chat widget.
string
The AI model to use. Common values:
"gpt-4o-mini", "gpt-4o". Defaults to "gpt-4o-mini".string
The AI provider:
"openai" (default), "anthropic", or "google".string
System prompt that defines the agent’s persona and behaviour. Also accepted as
system_message. If omitted, a default customer-support prompt is applied.string
The first message shown when a chat window opens. Defaults to
"Hi! I'm your AI assistant. How can I help you today?".number
Response creativity between
0.0 (deterministic) and 1.0 (creative). Defaults to 0.7.integer
Maximum number of tokens per response. Defaults to
500.string
Optional description of the agent’s purpose.
201 Created):
Get an Agent
GET /api/chatbots/{chatbot_id}
Returns details for a single agent. Returns 404 if the agent does not exist or does not belong to your account.
string
required
The unique ID of the agent to retrieve.
Update an Agent
PUT /api/chatbots/{chatbot_id}
Updates one or more fields on an existing agent. Only include the fields you want to change — omitted fields remain unchanged.
string
required
The unique ID of the agent to update.
string
Updated display name.
string
Updated description.
string
Updated AI model (e.g.,
"gpt-4o-mini", "gpt-4o").string
Updated AI provider:
"openai", "anthropic", or "google".string
Updated system prompt. Also accepted as
system_message.string
Updated welcome message shown when the chat widget opens.
number
Updated temperature value between
0.0 and 1.0.integer
Updated maximum tokens per response.
string
Set to
"active" or "inactive" to manually change the agent’s state. Use Toggle for a simple flip.boolean
Whether the agent is publicly accessible via the widget. Set to
false to restrict access.string
Primary hex color for the chat widget (e.g.,
"#7c3aed").string
Secondary hex color for the chat widget.
string
Accent hex color for the chat widget.
string
Widget position on the page:
"bottom-right", "bottom-left", "top-right", or "top-left".string
Widget color theme:
"light", "dark", or "auto".string
Widget size:
"small", "medium", or "large".boolean
Whether the widget shows a lead capture form before the first message.
boolean
Whether email alerts are sent when a new lead is captured.
string
Email address to receive lead capture alerts. Required if
email_alerts_enabled is true.boolean
Whether per-session rate limiting is enabled on the widget.
integer
Maximum messages a single session can send per hour when
rate_limit_enabled is true. Defaults to 60.200 OK): The updated agent object (same structure as the create response).
Delete an Agent
DELETE /api/chatbots/{chatbot_id}
Permanently deletes an agent and all associated data — sources, conversations, and messages. Returns 204 No Content on success.
string
required
The unique ID of the agent to delete.
204 No Content — no response body.
Toggle Agent Status
PATCH /api/chatbots/{chatbot_id}/toggle
Flips the agent’s status between "active" and "inactive". When an agent is "inactive", the public chat endpoint returns a 400 error, preventing end-users from chatting with it.
string
required
The unique ID of the agent to toggle.
200 OK):
string
The new status after toggling:
"active" or "inactive".