Leads
Records a lead against a chatbot, optionally linked to a conversation, and emits the `lead.created` webhook.
POST
/api/v1/leadsDeduplicated per conversation: when conversation_id is provided and a lead already exists for it, the existing lead is returned with existing: true rather than a duplicate being created.
Request body
Prop
Type
Response 200
Prop
Type
Errors
400— Invalid request body401— Missing or invalid API key404— Chatbot or conversation not found429— Rate limit exceeded
Every error shares one envelope.
Example
curl -X POST \
https://www.hey.support/api/v1/leads \
-H 'Authorization: Bearer hs_live_…' \
-H 'Content-Type: application/json' \
-d '{"chatbot_id":"<chatbot_id>"}'