Chatbots API
List chatbots in your organization. This endpoint is commonly used for dynamic dropdown fields in integrations.
List Chatbots
GET /api/v1/chatbots
Required Scope: None (basic access)
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Number of records (1-100) |
offset | integer | 0 | Number of records to skip |
Example Request
curl -X GET "https://app.leezy.ai/api/v1/chatbots" \
-H "Authorization: Bearer lzy_at_your_token"
Response
{
"data": [
{
"id": "chatbot_abc123",
"type": "chatbot",
"attributes": {
"name": "Customer Support Bot",
"description": "Handles customer inquiries and support tickets",
"model": "gpt-4o-mini",
"status": "active",
"created_at": "2024-01-10T09:00:00Z",
"updated_at": "2024-01-15T14:30:00Z"
},
"label": "Customer Support Bot",
"value": "chatbot_abc123"
},
{
"id": "chatbot_xyz789",
"type": "chatbot",
"attributes": {
"name": "Sales Assistant",
"description": "Qualifies leads and schedules demos",
"model": "gpt-4o",
"status": "active",
"created_at": "2024-01-12T11:00:00Z",
"updated_at": "2024-01-15T16:00:00Z"
},
"label": "Sales Assistant",
"value": "chatbot_xyz789"
}
],
"meta": {
"api_version": "2024-01-01",
"total": 2,
"limit": 50,
"offset": 0,
"has_more": false,
"count": 2
}
}
Chatbot Object
| Field | Type | Description |
|---|---|---|
id | string | Unique chatbot identifier |
type | string | Always chatbot |
attributes.name | string | Chatbot display name |
attributes.description | string | Chatbot description |
attributes.model | string | AI model used |
attributes.status | string | Chatbot status |
attributes.created_at | ISO 8601 | Creation timestamp |
attributes.updated_at | ISO 8601 | Last update timestamp |
label | string | Display label (for dropdowns) |
value | string | Selection value (for dropdowns) |
Status Values
| Status | Description |
|---|---|
active | Chatbot is live and responding |
inactive | Chatbot is paused |
training | Chatbot is being trained |
Dropdown Integration
The label and value fields are included specifically for integration platforms like Zapier that need dropdown-friendly data:
// Zapier dynamic dropdown example
const response = await fetch(url, { headers });
const { data } = await response.json();
// Data is already formatted for dropdowns
// data[0].label = "Customer Support Bot"
// data[0].value = "chatbot_abc123"
Error Responses
| Status | Error | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid token |
| 403 | plan_required | Paid plan required |
Next Steps
- Leads API - Get leads from specific chatbots
- Tickets API - Get tickets from specific chatbots
- Zapier Integration - Use chatbot filters in Zaps