v1.0 • Lead Management
Get up and running with the Lead Management API in under 5 minutes
You'll need an API key from your workspace settings
Basic knowledge of REST APIs and HTTP requests
A tool like curl, Postman, or your preferred programming language
The two values every request needs, and exactly where they live in the dashboard
sk-workspace_. The full key is shown only once, at creation — store it somewhere safe (an environment variable, never client-side code).The key grants access to every chatbot in that workspace — one key covers chat, leads, and webhooks.
The ID looks like cmqviwwzi0000q0v9t5hj526q and goes into the {chatbotId} part of every endpoint path.
All API requests are made to this base URL
https://pollybot.app/api/v1Note: All endpoints are versioned with /v1 prefix.
Include your API key in the Authorization header
Authorization: Bearer sk-workspace_your_api_key_hereSecurity: Keep your API key secure! Never expose it in client-side code or public repositories.
Test your setup by fetching leads
curl -X GET "https://pollybot.app/api/v1/chatbots/your-chatbot-id/leads" \
-H "Authorization: Bearer sk-workspace_your_api_key_here" \
-H "Content-Type: application/json"const response = await fetch('https://pollybot.app/api/v1/chatbots/your-chatbot-id/leads', {
headers: {
'Authorization': 'Bearer sk-workspace_your_api_key_here',
'Content-Type': 'application/json'
}
});
const data = await response.json(); {
"success": true,
"data": [
{
"id": "lead_123",
"name": "John Doe",
"email": "john@example.com",
"company": "Acme Corp",
"status": "new",
"createdAt": "2025-01-10T10:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1,
"totalPages": 1
}
}Your API integration is working. Here's what to explore next: