v1.0 • Lead Management
Retrieve a chatbot's leads with filtering and pagination
Lists the leads of one chatbot in your workspace
chatbotIdThe unique identifier of the chatbot (required). Must belong to the workspace of the API key.
All query parameters are optional
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number. Values below 1 are clamped to 1. |
limit | integer | 50 | Leads per page. Clamped to the range 1–100. |
status | string | — | Filter by lead status: NEW, CONTACTED, QUALIFIED, NEGOTIATING, CONVERTED, LOST, UNRESPONSIVE. |
priority | string | — | Filter by priority: LOW, MEDIUM, HIGH, URGENT. |
search | string | — | Case-insensitive substring match against name, email, and company. |
sortBy | string | createdAt | Lead field to sort by. |
sortOrder | string | desc | Sort direction: asc or desc. |
List leads with and without filters
curl "https://pollybot.app/api/v1/chatbots/cmqjwkljc00892znge0tk4c37/leads?page=1&limit=50" \
-H "Authorization: Bearer sk-workspace_your_api_key_here"curl "https://pollybot.app/api/v1/chatbots/cmqjwkljc00892znge0tk4c37/leads?status=NEW&priority=HIGH&search=acme&sortBy=createdAt&sortOrder=desc" \
-H "Authorization: Bearer sk-workspace_your_api_key_here"200 OK — leads, pagination, and the chatbot they belong to
{
"success": true,
"data": {
"leads": [
{
"id": "cmf8x2k3j0001abcdef123456",
"chatbotId": "cmqjwkljc00892znge0tk4c37",
"conversationId": "cmf8x1p9a0000abcdef123456",
"name": "Jane Cooper",
"email": "jane@acme.com",
"phone": "+14155550132",
"company": "Acme Inc",
"message": "Interested in the Pro plan",
"source": "chat_widget",
"status": "NEW",
"priority": "MEDIUM",
"assignedAgentId": null,
"notes": null,
"tags": ["pricing"],
"customFields": null,
"followUpDate": null,
"lastContactAt": null,
"convertedAt": null,
"createdAt": "2026-08-15T09:24:11.000Z",
"updatedAt": "2026-08-15T09:24:11.000Z",
"discord": null,
"preferredMethod": "email",
"urgency": "low",
"chatbots": {
"id": "cmqjwkljc00892znge0tk4c37",
"name": "Support Bot"
}
}
],
"pagination": {
"current": 1,
"total": 1,
"count": 1,
"totalLeads": 1,
"hasNext": false,
"hasPrev": false,
"limit": 50
},
"chatbot": {
"id": "cmqjwkljc00892znge0tk4c37",
"name": "Support Bot"
}
}
}pagination.current is the requested page, pagination.total is the total number of pages, pagination.count is the number of leads on this page, and pagination.totalLeads is the number of leads matching the query. Use hasNext / hasPrev to page through results.
Each lead also includes a chatbots object with the owning chatbot's id and name.
Every successful response includes your current rate limit state (1000 requests per hour per API key):
All errors return success: false with an error code
| Status | Code | When |
|---|---|---|
401 | AUTHENTICATION_FAILED | Missing, malformed, invalid, or inactive API key. |
404 | CHATBOT_NOT_FOUND | The chatbot does not exist or does not belong to your workspace. |
429 | RATE_LIMIT_EXCEEDED | More than 1000 requests in an hour with this API key. |
500 | INTERNAL_ERROR | Unexpected server error. |
{
"success": false,
"error": "Invalid or inactive API key",
"code": "AUTHENTICATION_FAILED",
"timestamp": "2026-08-19T10:30:00.000Z"
}{
"success": false,
"error": "Chatbot not found or access denied",
"code": "CHATBOT_NOT_FOUND"
}