Skip to content

Leads API

All lead endpoints are prefixed with /api/leads and require authentication.

Write operations (create, update, delete) require an API key with full scope.

GET /api/leads

Returns a paginated list of leads in your workspace.

Query parameters:

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber20Results per page (max 100)
statusstringFilter by status: new, contacted, qualified, converted, closed
sourceIdstringFilter by source UUID
searchstringSearch by name, email, phone, or company
startDatestringFilter leads created after this ISO date
endDatestringFilter leads created before this ISO date
assignedTostringFilter by assigned user ID, or unassigned
duplicatesstringonly to show only duplicates, exclude to hide them

Example:

Terminal window
curl "https://leads.500rockets.io/api/leads?status=new&limit=10" \
-H "X-API-Key: 5l_live_..."

Response:

{
"data": [
{
"id": "lead_abc123",
"firstName": "Jane",
"lastName": "Smith",
"email": "[email protected]",
"phone": "+1234567890",
"company": "Acme Corp",
"status": "new",
"score": 78,
"source": { "id": "src_xyz", "name": "Website Form" },
"assignedTo": null,
"createdAt": "2026-03-01T12:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 42,
"pages": 5
}
}

GET /api/leads/:id

Returns a single lead with full details.

Terminal window
curl "https://leads.500rockets.io/api/leads/lead_abc123" \
-H "X-API-Key: 5l_live_..."

GET /api/leads/:id/events

Returns the activity timeline for a lead (scoring events, status changes, etc.).

Terminal window
curl "https://leads.500rockets.io/api/leads/lead_abc123/events" \
-H "X-API-Key: 5l_live_..."

PUT /api/leads/:id/status

Moves a lead to a new status. Requires full scope.

Terminal window
curl -X PUT "https://leads.500rockets.io/api/leads/lead_abc123/status" \
-H "X-API-Key: 5l_live_..." \
-H "Content-Type: application/json" \
-d '{ "status": "contacted" }'

Body:

FieldTypeRequiredDescription
statusstringYesOne of: new, contacted, qualified, converted, closed

PUT /api/leads/:id/notes

Sets or updates the notes on a lead. Requires full scope.

Terminal window
curl -X PUT "https://leads.500rockets.io/api/leads/lead_abc123/notes" \
-H "X-API-Key: 5l_live_..." \
-H "Content-Type: application/json" \
-d '{ "notes": "Spoke with Jane, interested in Pro plan." }'

POST /api/leads/:id/tags
Terminal window
curl -X POST "https://leads.500rockets.io/api/leads/lead_abc123/tags" \
-H "X-API-Key: 5l_live_..." \
-H "Content-Type: application/json" \
-d '{ "name": "hot-lead" }'
DELETE /api/leads/:id/tags/:tagId
Terminal window
curl -X DELETE "https://leads.500rockets.io/api/leads/lead_abc123/tags/tag_xyz" \
-H "X-API-Key: 5l_live_..."

PUT /api/leads/:id/assign

Assigns a lead to a team member. Requires full scope.

Terminal window
curl -X PUT "https://leads.500rockets.io/api/leads/lead_abc123/assign" \
-H "X-API-Key: 5l_live_..." \
-H "Content-Type: application/json" \
-d '{ "userId": "usr_member123" }'

Set userId to null to unassign.


GET /api/leads/:id/duplicates

Returns leads that have been flagged as duplicates of this lead.


POST /api/leads/:id/merge

Merges a duplicate lead into the primary lead. Requires full scope.

Terminal window
curl -X POST "https://leads.500rockets.io/api/leads/lead_abc123/merge" \
-H "X-API-Key: 5l_live_..." \
-H "Content-Type: application/json" \
-d '{ "duplicateId": "lead_dup456" }'

DELETE /api/leads/:id

Permanently deletes a lead and its associated data. Requires full scope.

Terminal window
curl -X DELETE "https://leads.500rockets.io/api/leads/lead_abc123" \
-H "X-API-Key: 5l_live_..."

GET /api/leads/stats

Returns aggregated lead counts by status.

{
"total": 142,
"byStatus": {
"new": 45,
"contacted": 30,
"qualified": 38,
"converted": 20,
"closed": 9
}
}

GET /api/leads/export

Downloads all leads as a CSV file. Supports the same filters as the list endpoint.

Terminal window
curl "https://leads.500rockets.io/api/leads/export?status=qualified" \
-H "X-API-Key: 5l_live_..." \
-o leads.csv

POST /api/leads/import

Uploads a CSV file to create leads in bulk. Requires full scope.

Terminal window
curl -X POST "https://leads.500rockets.io/api/leads/import" \
-H "X-API-Key: 5l_live_..." \

The CSV must include a header row. Recognized columns: email, firstName, lastName, phone, company.