Dashboard

Delete Lead

Permanently remove a lead from a chatbot

DELETE
2 min read

Endpoint

The lead must belong to the chatbot in the URL

DELETE https://pollybot.app/api/v1/chatbots/{chatbotId}/leads/{id}

Required Headers

Authorization: Bearer sk-workspace_your_api_key_here

No request body is required.

Path Parameters

chatbotId

The chatbot the lead belongs to. Must belong to the workspace of your API key.

string
id

The ID of the lead to delete.

string

Deletion is permanent

There is no soft delete or undo. The lead record is removed from the database immediately.

Example Request

curl -X DELETE "https://pollybot.app/api/v1/chatbots/cmq8h2xkp0031jrnghg5wq9d2/leads/cmqjwkljc00892znge0tk4c37" \
  -H "Authorization: Bearer sk-workspace_your_api_key_here"
200 OK

Success Response

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"
}

Errors

All error responses have the shape { success: false, error, code }

StatusCodeDescription
401
AUTHENTICATION_FAILEDMissing, malformed, or invalid API key.
404
CHATBOT_NOT_FOUNDChatbot does not exist or does not belong to your workspace.
404
LEAD_NOT_FOUNDLead does not exist or does not belong to this chatbot.
429
RATE_LIMIT_EXCEEDEDMore than 1000 requests in the past hour for this API key.
500
INTERNAL_ERRORUnexpected server error.

404 — Lead not found

{
  "success": false,
  "error": "Lead not found",
  "code": "LEAD_NOT_FOUND"
}

401 — Authentication failed

{
  "success": false,
  "error": "Invalid or inactive API key",
  "code": "AUTHENTICATION_FAILED",
  "timestamp": "2026-08-19T10:15:04.221Z"
}