v1.0 • Lead Management
Modify an existing lead with a partial update
The lead must belong to the chatbot in the URL
chatbotIdThe chatbot the lead belongs to. Must belong to the workspace of your API key.
idThe ID of the lead to update.
JSON object. Every field is optional — send only the fields you want to change; omitted fields keep their current values.
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | No | 1–100 characters |
email | string | No | Valid email. Must be unique among this chatbot's leads |
phone | string | No | Max 20 characters |
discord | string | No | Max 50 characters |
company | string | No | Max 100 characters |
message | string | No | Max 1000 characters |
preferredMethod | enum | No | email | phone | discord |
urgency | enum | No | low | medium | high |
status | enum | No | NEW | CONTACTED | QUALIFIED | NEGOTIATING | CONVERTED | LOST | UNRESPONSIVE |
priority | enum | No | LOW | MEDIUM | HIGH | URGENT |
notes | string | No | Max 2000 characters |
customFields | object | No | Arbitrary key–value pairs. Replaces the stored object entirely |
tags | string[] | No | Max 10 tags, each max 50 characters. Replaces the stored array entirely |
Move a lead forward in the pipeline and attach notes
curl -X PUT "https://pollybot.app/api/v1/chatbots/cmq8h2xkp0031jrnghg5wq9d2/leads/cmqjwkljc00892znge0tk4c37" \
-H "Authorization: Bearer sk-workspace_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"status": "QUALIFIED",
"priority": "HIGH",
"notes": "Demo scheduled for Friday. Decision maker on the call.",
"tags": ["enterprise", "pricing", "demo-scheduled"]
}'Returns the full updated lead record, including the connected chatbot. Successful responses include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
{
"success": true,
"data": {
"id": "cmqjwkljc00892znge0tk4c37",
"chatbotId": "cmq8h2xkp0031jrnghg5wq9d2",
"conversationId": null,
"name": "Jane Cooper",
"email": "jane.cooper@acme.com",
"phone": "+14155550132",
"company": "Acme Inc.",
"message": "Interested in the enterprise plan.",
"source": "landing-page",
"status": "QUALIFIED",
"priority": "HIGH",
"assignedAgentId": null,
"notes": "Demo scheduled for Friday. Decision maker on the call.",
"tags": ["enterprise", "pricing", "demo-scheduled"],
"customFields": { "plan": "enterprise" },
"followUpDate": null,
"lastContactAt": null,
"convertedAt": null,
"createdAt": "2026-08-19T09:14:32.118Z",
"updatedAt": "2026-08-19T10:02:51.407Z",
"discord": null,
"preferredMethod": "email",
"urgency": "high",
"chatbots": {
"id": "cmq8h2xkp0031jrnghg5wq9d2",
"name": "Support Bot"
}
}
}All error responses have the shape { success: false, error, code }
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Request body failed validation. The details field contains per-field Zod errors. |
401 | AUTHENTICATION_FAILED | Missing, malformed, or invalid API key. |
404 | CHATBOT_NOT_FOUND | Chatbot does not exist or does not belong to your workspace. |
404 | LEAD_NOT_FOUND | Lead does not exist or does not belong to this chatbot. |
409 | DUPLICATE_EMAIL | Another lead of this chatbot already uses the new email address. |
429 | RATE_LIMIT_EXCEEDED | More than 1000 requests in the past hour for this API key. |
500 | INTERNAL_ERROR | Unexpected server error. |
{
"success": false,
"error": "Lead not found",
"code": "LEAD_NOT_FOUND"
}{
"success": false,
"error": "Lead with this email already exists for this chatbot",
"code": "DUPLICATE_EMAIL"
}