GET/campaigns/:campaignId/leads
List leads in a campaign. 0 credits. Rate class: global.
Request
GET /campaigns/search-xyz/leads?excluded=true&limit=5
X-API-Key: sk_live_...
| Query | Required | Notes |
|---|---|---|
limit | No | 1–100, default 50 |
cursor | No | Opaque lead id from prior nextCursor |
tag | No | Classifier allowlist (see below) |
replied | No | true | false |
needsReply | No | true only (false → 400) |
excluded | No | true only (false → 400) |
sort | No | Always desc; default createdAt |
At most one of tag / replied / needsReply / excluded.
Sort
| Value | Requires |
|---|---|
createdAt | any / none (including needsReply=true, excluded=true) |
taggedAt | tag=… |
repliedAt | replied=true|false |
lastInboundMessageAt | none or replied — not with tag |
With needsReply=true or excluded=true, only sort=createdAt (or omit sort) is allowed — other sorts → 400 validation_error.
Reuse a cursor only with the same filter and sort. Leads missing the sort timestamp field are omitted.
BASE=https://api.notiq.io/public/v1
KEY=sk_live_…
curl -sS "$BASE/campaigns/search-xyz/leads?excluded=true&limit=5" \
-H "X-API-Key: $KEY"
curl -sS "$BASE/campaigns/search-xyz/leads?tag=Interested&sort=taggedAt&limit=5" \
-H "X-API-Key: $KEY"
curl -sS "$BASE/campaigns/search-xyz/leads?replied=true&sort=lastInboundMessageAt&limit=5" \
-H "X-API-Key: $KEY"
Filter tag allowlist
Interested, Information request, Not interested, Wrong person, Meeting request, Meeting booked, Resolved, To be defined
Writable tags on PATCH are a smaller set (Interested, Not interested, Wrong person, Meeting booked, Resolved) — see PATCH …/leads/:id.
Response
{
"leads": [
{
"id": "lead_abc",
"fullName": "Jane Doe",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane@acme.com",
"companyName": "Acme Dental",
"website": "https://acme.com",
"jobTitle": null,
"location": "Austin, TX",
"tag": null,
"replied": false,
"needsReply": false,
"excluded": true,
"stage": "excluded",
"repliedAt": null,
"lastInboundMessageAt": null,
"taggedAt": null
}
],
"nextCursor": null
}
| Field | Type |
|---|---|
id | string |
fullName | string | null |
firstName | string | null |
lastName | string | null |
email | string | null |
companyName | string | null |
website | string | null |
jobTitle | string | null |
location | string | null |
tag | string | null |
replied | boolean |
needsReply | boolean |
excluded | boolean |
stage | new | messaged | replied | tagged | excluded | failed | handed_off |
repliedAt | string | null (ISO) |
lastInboundMessageAt | string | null (ISO) — prefer for “last reply” |
taggedAt | string | null (ISO) |
No LinkedIn URL field.
Errors
| Error code | When |
|---|---|
validation_error | Bad filter combo, excluded=false / needsReply=false, invalid sort, bad cursor |
not_found | Unknown campaign |
Related
- Single update: PATCH …/leads/:leadId
- Bulk tag/exclude: POST …/leads/batch-update
- Bulk delete: POST …/leads/batch-delete
- Activity feed: GET /activity
MCP
Tool: list_leads (excluded: true optional; at most one filter).