Converting a lead creates an associated customer and/or account record and marks the lead as converted. This action cannot be undone — use the unconvert endpoint to reverse it.
Path Parameters
The unique identifier of the lead to convert. Example: e0901f08-3aa1-43c5-af5c-0a9d2fc64e30
Request Body
Whether to create an associated account record during conversion.
Whether to create an associated customer record during conversion.
Override the owner for the newly created account/customer records.
Response
The ID of the converted lead.
Object type. Always lead.
Whether the lead was successfully converted.
Updated lead status. Will be converted.
The ID of the newly created customer record (if create_customer was true).
The ID of the newly created account record (if create_account was true).
cURL
GraphQL
Node.js
Python
Ruby
Go
Java
PHP
curl --location --request POST 'https://api.stateset.com/v1/leads/e0901f08-3aa1-43c5-af5c-0a9d2fc64e30/convert' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"create_account": true,
"create_customer": true
}'
Response
Error Response (404 Not Found)
Error Response (409 Conflict)
{
"id" : "e0901f08-3aa1-43c5-af5c-0a9d2fc64e30" ,
"object" : "lead" ,
"converted" : true ,
"status" : "converted" ,
"customer_id" : "cust_7b2f4a91-d3e5-4c8a-b1f0-9e6d3c5a7b2f" ,
"account_id" : "acct_3d1e8f72-a5b6-4c9d-8e0f-1a2b3c4d5e6f"
}