v1.0 • Lead Management
Permanently remove a lead from a chatbot
The lead must belong to the chatbot in the URL
No request body is required.
chatbotIdThe chatbot the lead belongs to. Must belong to the workspace of your API key.
idThe ID of the lead to delete.
There is no soft delete or undo. The lead record is removed from the database immediately.
curl -X DELETE "https://pollybot.app/api/v1/chatbots/cmq8h2xkp0031jrnghg5wq9d2/leads/cmqjwkljc00892znge0tk4c37" \
-H "Authorization: Bearer sk-workspace_your_api_key_here"A confirmation message — the deleted lead's data is not returned. Successful responses include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
{
"success": true,
"message": "Lead deleted successfully"
}All error responses have the shape { success: false, error, code }
| Status | Code | Description |
|---|---|---|
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. |
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": "Invalid or inactive API key",
"code": "AUTHENTICATION_FAILED",
"timestamp": "2026-08-19T10:15:04.221Z"
}