Create a lead
Goal: add a potential customer to a product and place it on a pipeline stage.
curl -s https://api.sance.ai/v1/leads/ \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{ "product_id": 42, "stage_id": 7, "name": "Acme Corp — Jane Doe" }'
To create the lead with its contacts in one atomic call (so an agent knows where to
reach it), use POST /v1/leads/with-contacts:
curl -s https://api.sance.ai/v1/leads/with-contacts \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{
"lead": { "product_id": 42, "stage_id": 7, "name": "Acme Corp — Jane Doe" },
"contacts": [
{ "contact": "+15551234567", "contact_type": "phone", "is_main": true },
{ "contact": "jane_doe", "contact_type": "username", "channel_type": "telegram" }
]
}'
Contact values are normalized and validated. With deduplicate_contacts (default true),
the call returns 409 if a contact is duplicated in the request or already exists in the
product.
What happens next: the lead exists on stage 7. If it's active and an outreach campaign targets that stage, the scheduler can begin reaching out; otherwise message it directly or move it through the pipeline.
See: POST /v1/leads/, POST /v1/leads/with-contacts.