Leads API
POST /api/v1/leads/{id}/convert
Turns a QUALIFIED lead into an active contact. Requires the write:leads scope.
POST /api/v1/leads/cmq2lead0alk34567890/convert HTTP/1.1
Host: agentlyleads.com
Authorization: Bearer alk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxThe path accepts the agentlyleads ID or your externalId. There is no body.
In one transaction, a new contact is created from the lead's name, company, email, phone and owner; the lead is marked CONVERTED and linked to the contact; and the lead's communications and emails move onto the contact.
Response (201)
{
"lead": { "id": "cmq2lead0alk34567890", "status": "CONVERTED", "convertedContactId": "cmq2cont0alk34567890" },
"contact": { "id": "cmq2cont0alk34567890", "name": "Ann Lee", "email": "ann@acme.com", "company": "Acme", "status": "ACTIVE" }
}Errors
| Status | When |
|---|---|
404 | No lead with that ID in your workspace |
409 | The lead is not QUALIFIED. The message says its current status, or which contact it was already converted to |
Because a converted lead is no longer QUALIFIED, repeating the call converts nothing and returns 409.