Leads

Create, read, update, and manage leads in your CRM.

GET/leads

List leads with pagination, search, and filters.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
pageSizeintegerItems per page (default: 20, max: 500)
searchstringSearch by name, company, or email
statusstringFilter: Accepted, Rejected
sortstringscore_desc, score_asc, name_asc, name_desc, recent
isArchivedbooleanShow archived leads (default: false)
Request
curl -X GET "https://kashew.ai/api/v1/leads?page=1&pageSize=20&search=acme" \
  -H "Authorization: Bearer kshw_xxxxxxxx_xxxxx..."
POST/leads

Create a new lead.

Request Body

{
  "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"
}
201Response
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "created"
}
GET/leads/:id

Get 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..."
PUT/leads/:id

Update 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"}'
DELETE/leads/:id

Permanently delete a lead.

Requires scope: crm:write

POST/lead-enrichment

Trigger 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"}'