Leads API reference
Add leads to a campaign by JSON or CSV, list them and change a lead status. 4 operations.
For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.
#Operations
Authenticate as described in Authentication. Every operation below is generated from the OpenAPI document.
| Method and path | Scope | What it does |
|---|---|---|
POST /v1/campaigns/{id}/leads | write | Add leads to a campaign |
GET /v1/campaigns/{id}/leads | read | List the leads in a campaign |
POST /v1/campaigns/{id}/leads/import | write | Import leads from CSV |
PATCH /v1/leads/{id} | write | Change a lead status |
#POST /v1/campaigns/{id}/leads
Accepts at most 1,000 leads per call, deduplicated by email (case-insensitive) against the request and the account. A row that cannot be added is reported with the reason and does not fail the others: an invalid address, an address on the suppression list, or a new address beyond the plan active-contact cap. An address already in the account is updated with the fields given and enrolled in this campaign.
Scope: write. A read key gets 403 forbidden. Success: HTTP 200.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 1 characters |
Request body
Send JSON with Content-Type: application/json. The body is required.
| Field | Type | Required | Description |
|---|---|---|---|
leads | array of object | yes | 1 to 1000 items. |
leads[].email | string | yes | 0 to 320 characters. |
leads[].first_name | string or null | no | 0 to 200 characters. |
leads[].last_name | string or null | no | 0 to 200 characters. |
leads[].company_name | string or null | no | 0 to 200 characters. |
leads[].title | string or null | no | 0 to 200 characters. |
leads[].custom_fields | map of string | no | No further constraints. |
{
"leads": [
{
"email": "maya@example.com"
}
]
}Response
| Field | Type | Required | Description |
|---|---|---|---|
campaign_id | string | yes | No further constraints. |
created | integer | yes | No further constraints. |
updated | integer | yes | Rows for an address already in the account; the fields given were applied. |
duplicates | integer | yes | Rows repeating an address earlier in the same request. |
rejected | integer | yes | No further constraints. |
rows | array of object | yes | No further constraints. |
rows[].index | integer | yes | Position of the row in the request, starting at 0. |
rows[].email | string | yes | No further constraints. |
rows[].outcome | "created" or "updated" or "duplicate" or "rejected" | yes | No further constraints. |
rows[].lead_id | string or null | yes | No further constraints. |
rows[].reason | string or null | yes | Why the row was rejected, in plain language; null otherwise. |
{
"campaign_id": "id_8f3a2c1d",
"created": 1,
"updated": 1,
"duplicates": 1,
"rejected": 1,
"rows": [
{
"index": 1,
"email": "maya@example.com",
"outcome": "created",
"lead_id": "id_8f3a2c1d",
"reason": "abc123"
}
]
}Errors
invalid_input, unauthorized, forbidden, unknown_product, payload_too_large, rate_limited, internal_error. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl -X POST "https://api.coldagentai.com/v1/campaigns/$CAMPAIGN_ID/leads" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"leads": [
{
"email": "maya@example.com"
}
]
}'const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/campaigns/${id}/leads`, {
method: 'POST',
body: JSON.stringify({
"leads": [
{
"email": "maya@example.com"
}
]
}),
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();#GET /v1/campaigns/{id}/leads
Leads enrolled in the campaign, oldest first, optionally filtered by status. Pass next_cursor as cursor for the next page.
Scope: read. A read key and a write key both work. Success: HTTP 200.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 1 characters |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
status | "new" or "contacted" or "replied" or "interested" or "meeting_booked" or "not_interested" or "bounced" or "unsubscribed" or "blocked" | no | No further constraints. |
limit | integer | no | 1 to 100 |
cursor | string | no | 0 to 500 characters |
Response
| Field | Type | Required | Description |
|---|---|---|---|
data | array of object | yes | No further constraints. |
data[].id | string | yes | No further constraints. |
data[].email | string | yes | No further constraints. |
data[].first_name | string or null | yes | No further constraints. |
data[].last_name | string or null | yes | No further constraints. |
data[].company_name | string or null | yes | No further constraints. |
data[].title | string or null | yes | No further constraints. |
data[].custom_fields | map of string | yes | No further constraints. |
data[].status | "new" or "contacted" or "replied" or "interested" or "meeting_booked" or "not_interested" or "bounced" or "unsubscribed" or "blocked" | yes | No further constraints. |
data[].verification | "unverified" or "valid" or "invalid" or "catch_all" or "unknown" or "risky" | yes | No further constraints. |
data[].verified_at | string (date-time) or null | yes | ISO 8601 time in UTC |
data[].source | string or null | yes | No further constraints. |
data[].created_at | string (date-time) | yes | ISO 8601 time in UTC |
data[].updated_at | string (date-time) | yes | ISO 8601 time in UTC |
next_cursor | string or null | yes | No further constraints. |
{
"data": [
{
"id": "id_8f3a2c1d",
"email": "maya@example.com",
"first_name": "Maya",
"last_name": "Chen",
"company_name": "Example",
"title": "abc123",
"custom_fields": {
"example_key": "abc123"
},
"status": "new",
"verification": "unverified",
"verified_at": "2026-10-17T12:00:00.000Z",
"source": "abc123",
"created_at": "2026-10-17T12:00:00.000Z",
"updated_at": "2026-10-17T12:00:00.000Z"
}
],
"next_cursor": "abc123"
}Errors
invalid_input, unauthorized, unknown_product, rate_limited, internal_error. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl "https://api.coldagentai.com/v1/campaigns/$CAMPAIGN_ID/leads" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY"const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/campaigns/${id}/leads`, {
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();#POST /v1/campaigns/{id}/leads/import
Send the CSV text as the request body (Content-Type text/plain, at most 5 MB and 1,000 data rows). The first row is the header; the email column is found by name (email, work email, and similar). First name, last name, company and title are mapped from their usual headers, and every other column becomes a custom field usable as a merge field. layout=smartlead reads a Smartlead export and skips its activity columns. Duplicate headers are made unique, a byte order mark and CRLF line ends are handled, and cells starting with = + - @ are kept as text and counted in flagged_cells. Suppression, plan cap and per-row reporting work as for the JSON endpoint.
Scope: write. A read key gets 403 forbidden. Success: HTTP 200.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 1 characters |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
layout | "generic" or "smartlead" | no | No further constraints. |
Request body
Send the body as text/plain. The body is required.
abc123Response
| Field | Type | Required | Description |
|---|---|---|---|
campaign_id | string | yes | No further constraints. |
created | integer | yes | No further constraints. |
updated | integer | yes | Rows for an address already in the account; the fields given were applied. |
duplicates | integer | yes | Rows repeating an address earlier in the same request. |
rejected | integer | yes | No further constraints. |
rows | array of object | yes | No further constraints. |
rows[].index | integer | yes | Position of the row in the request, starting at 0. |
rows[].email | string | yes | No further constraints. |
rows[].outcome | "created" or "updated" or "duplicate" or "rejected" | yes | No further constraints. |
rows[].lead_id | string or null | yes | No further constraints. |
rows[].reason | string or null | yes | Why the row was rejected, in plain language; null otherwise. |
csv_rejected | array of object | yes | Rows the parser refused, by line number in the file. |
csv_rejected[].line | integer | yes | No further constraints. |
csv_rejected[].email | string or null | yes | No further constraints. |
csv_rejected[].reason | string | yes | No further constraints. |
flagged_cells | integer | yes | Cells that begin with = + - @ and could act as spreadsheet formulas if written back to a sheet. |
warnings | array of string | yes | No further constraints. |
{
"campaign_id": "id_8f3a2c1d",
"created": 1,
"updated": 1,
"duplicates": 1,
"rejected": 1,
"rows": [
{
"index": 1,
"email": "maya@example.com",
"outcome": "created",
"lead_id": "id_8f3a2c1d",
"reason": "abc123"
}
],
"csv_rejected": [
{
"line": 1,
"email": "maya@example.com",
"reason": "abc123"
}
],
"flagged_cells": 1,
"warnings": [
"abc123"
]
}Errors
invalid_input, unauthorized, forbidden, unknown_product, payload_too_large, rate_limited, internal_error. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl -X POST "https://api.coldagentai.com/v1/campaigns/$CAMPAIGN_ID/leads/import" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
-H "Content-Type: text/plain" \
-d 'abc123'const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/campaigns/${id}/leads/import`, {
method: 'POST',
body: "abc123",
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'text/plain' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();#PATCH /v1/leads/{id}
Sets the lead status (for example interested or not_interested). Setting unsubscribed honors an opt-out: the address is suppressed and its pending sends are cancelled. A lead that opted out cannot be moved to another status.
Scope: write. A read key gets 403 forbidden. Success: HTTP 200.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 1 characters |
Request body
Send JSON with Content-Type: application/json. The body is required.
| Field | Type | Required | Description |
|---|---|---|---|
status | "new" or "contacted" or "replied" or "interested" or "meeting_booked" or "not_interested" or "bounced" or "unsubscribed" or "blocked" | yes | No further constraints. |
{
"status": "new"
}Response
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | No further constraints. |
email | string | yes | No further constraints. |
first_name | string or null | yes | No further constraints. |
last_name | string or null | yes | No further constraints. |
company_name | string or null | yes | No further constraints. |
title | string or null | yes | No further constraints. |
custom_fields | map of string | yes | No further constraints. |
status | "new" or "contacted" or "replied" or "interested" or "meeting_booked" or "not_interested" or "bounced" or "unsubscribed" or "blocked" | yes | No further constraints. |
verification | "unverified" or "valid" or "invalid" or "catch_all" or "unknown" or "risky" | yes | No further constraints. |
verified_at | string (date-time) or null | yes | ISO 8601 time in UTC |
source | string or null | yes | No further constraints. |
created_at | string (date-time) | yes | ISO 8601 time in UTC |
updated_at | string (date-time) | yes | ISO 8601 time in UTC |
{
"id": "id_8f3a2c1d",
"email": "maya@example.com",
"first_name": "Maya",
"last_name": "Chen",
"company_name": "Example",
"title": "abc123",
"custom_fields": {
"example_key": "abc123"
},
"status": "new",
"verification": "unverified",
"verified_at": "2026-10-17T12:00:00.000Z",
"source": "abc123",
"created_at": "2026-10-17T12:00:00.000Z",
"updated_at": "2026-10-17T12:00:00.000Z"
}Errors
invalid_input, unauthorized, forbidden, unknown_product, payload_too_large, rate_limited, internal_error. Every error uses the single format.
Rate limits
Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.
Examples
curl -X PATCH "https://api.coldagentai.com/v1/leads/$LEAD_ID" \
-H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "new"
}'const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/leads/${id}`, {
method: 'PATCH',
body: JSON.stringify({
"status": "new"
}),
headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();