Leads
Create, read, update, and manage leads in your CRM.
/leadsList leads with pagination, search, and filters.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| pageSize | integer | Items per page (default: 20, max: 500) |
| search | string | Search by name, company, or email |
| status | string | Filter: Accepted, Rejected |
| sort | string | score_desc, score_asc, name_asc, name_desc, recent |
| isArchived | boolean | Show archived leads (default: false) |
page(integer)Page number (default: 1)
pageSize(integer)Items per page (default: 20, max: 500)
search(string)Search by name, company, or email
status(string)Filter: Accepted, Rejected
sort(string)score_desc, score_asc, name_asc, name_desc, recent
isArchived(boolean)Show archived leads (default: false)
curl -X GET "https://kashew.ai/api/v1/leads?page=1&pageSize=20&search=acme" \
-H "Authorization: Bearer kshw_xxxxxxxx_xxxxx..."/leadsCreate a new lead.
{
"personName": "Jane Smith",
"companyName": "Acme Corp",
"email": "jane@acme.com",
"phone": "+1 555-0123",
"jobTitle": "VP of Sales",
"industry": "SaaS / Software",
"website": "https://acme.com",
"country": "United States",
"linkedinProfileUrl": "https://linkedin.com/in/janesmith"
}{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "created"
}/leads/:idGet a single lead by ID.
curl -X GET "https://kashew.ai/api/v1/leads/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Authorization: Bearer kshw_xxxxxxxx_xxxxx..."/leads/:idUpdate a lead's fields.
curl -X PUT "https://kashew.ai/api/v1/leads/a1b2c3d4..." \
-H "Authorization: Bearer kshw_xxxxxxxx_xxxxx..." \
-H "Content-Type: application/json" \
-d '{"status": "Qualified", "jobTitle": "CTO"}'/leads/:idPermanently delete a lead.
Requires scope: crm:write. JWT only — not available via API key.
/leads/bulkCreate multiple leads in a single request (max 500).
{
"leads": [
{
"companyName": "Alpha Inc",
"personName": "Alice Green",
"email": "alice@alpha.com",
"jobTitle": "CEO",
"industry": "Finance"
},
{
"companyName": "Beta Corp",
"personName": "Bob Brown",
"email": "bob@beta.com",
"jobTitle": "CTO",
"industry": "Technology"
}
],
"options": {
"onDuplicate": "skip",
"defaultStatus": "New",
"stopOnError": false
}
}Options
| Parameter | Type | Description |
|---|---|---|
| onDuplicate | string | "skip" (default) or "overwrite" |
| defaultStatus | string | New (default), Contacted, Qualified |
| assignToOwnerId | string | UUID — assign all leads to a specific user (admin/manager only) |
| stopOnError | boolean | false (default) — best-effort; true — abort on first error |
onDuplicate(string)"skip" (default) or "overwrite"
defaultStatus(string)New (default), Contacted, Qualified
assignToOwnerId(string)UUID — assign all leads to a specific user (admin/manager only)
stopOnError(boolean)false (default) — best-effort; true — abort on first error
{
"batchId": "bulk_uuid",
"summary": { "total": 2, "created": 2, "updated": 0, "skipped": 0, "failed": 0 },
"results": [
{ "index": 0, "status": "created", "id": "lead-uuid-1" },
{ "index": 1, "status": "created", "id": "lead-uuid-2" }
]
}/leads/:id/convertConvert a lead into an account (and optionally a contact).
{
"createContact": true,
"accountData": {
"name": "Acme Corp",
"industry": "Technology",
"type": "Enterprise",
"status": "Active"
},
"contactData": {
"first_name": "Jane",
"last_name": "Doe",
"role_type": "decision_maker",
"email": "jane@acme.com",
"job_title": "CTO"
}
}{
"success": true,
"accountId": "new-account-uuid",
"contactId": "new-contact-uuid"
}Returns 409 if the lead has already been converted. The response includes a pointer to the current account.
/lead-enrichmentTrigger AI enrichment for a lead (generates insights, scoring, recommendations).
curl -X POST "https://kashew.ai/api/v1/lead-enrichment" \
-H "Authorization: Bearer kshw_xxxxxxxx_xxxxx..." \
-H "Content-Type: application/json" \
-d '{"lead_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"}'