Create a lead
Create a lead in Customers & Leads.
POST https://cotlet.dev/api/v1/method-crm/leads
write
Returns the new contact ID. A lead is not synced to QuickBooks until it becomes a customer, and the call sends nothing to anyone, so it does not wait for your OK. A wrong lead is removed by hand in Method.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Name in QuickBooks, the name the customer gets after conversion. |
| email string | string | Contact email. |
| phone string | string | Contact phone. |
| assigned_to string | string | Method user responsible for the lead. |
| source string | string | A lead source from your account. |
Request
curl -X POST https://cotlet.dev/api/v1/method-crm/leads \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}' result = client.call("method-crm", "create_lead", {"name":"Jane Doe"}) const result = await cotlet.call('method-crm', 'create_lead', {"name":"Jane Doe"}); cotlet call method-crm create_lead --data '{"name":"Jane Doe"}' Example response
{
"contact_id": "C-2090",
"name": "Lopez Fencing",
"type": "lead",
"synced_to_quickbooks": false
}