Skip to main content

Move a lead through the pipeline

Goal: advance a lead to another stage and tag it.

# Change stage (new_stage_id must belong to the lead's product)
curl -s -X POST "https://api.sance.ai/v1/leads/1001/change-stage?new_stage_id=8" \
-H "Authorization: Bearer $TOKEN"

# Apply a tag (also synced to the CRM)
curl -s https://api.sance.ai/v1/lead-tags/ \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{ "lead_id": 1001, "tag_id": 55 }'

To move many leads at once, use POST /v1/leads/change_stage/batch with { "lead_ids": [...], "new_stage_id": 8 } (best-effort: leads that fail are skipped). Stage moves are recorded as lead events and synced to the CRM. Update CRM custom fields with PUT /v1/leads/{id}/crm-fields.

See: POST /v1/leads/{id}/change-stage, POST /v1/leads/change_stage/batch, POST /v1/lead-tags/, PUT /v1/leads/{id}/crm-fields.