GET /api/v1/campaigns
Authorization
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Allowed |
Query parameters
| Parameter | Type | Description |
|---|---|---|
status | string | draft, scheduled, sending, sent, failed |
search | string | Filters on the campaign name |
page / limit | string | Pagination, limit capped at 100 |
Query parameters
| Parameter | Type | Description |
|---|---|---|
status | string | draft, scheduled, sending, sent, failed |
search | string | Matches the campaign name, case-insensitive |
page | number | Defaults to 1 |
limit | number | Defaults to 20, capped at 100 |
Example
bash
curl -H "x-api-key: $AGENTMAIL_API_KEY" \
"https://www.agentsmail.io/api/v1/campaigns?status=sent&limit=20"Response
200 OK— the call succeeded.401 Unauthorized— missing or invalid key, or its owner left the organization.429 Too Many Requests— over 120 requests in a minute for this key.
Response fields
data is an array of campaigns, with a pagination object next to it.
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
data[].id | string | Identifier of the campaign |
data[].name | string | Its internal name |
data[].subject | string | The subject recipients see |
data[].status | string | draft, scheduled, sending, sent, failed |
data[].listId | string | The list it targets |
data[].tagId / segmentId | string \ | null |
data[].scheduledAt | string \ | null |
data[].sentAt | string \ | null |
data[].createdAt / updatedAt | string | ISO dates |
pagination | object | {total, page, limit, totalPages} |
Example response
json
{
"success": true,
"data": [
{
"id": "4d19c0a2",
"name": "Newsletter",
"subject": "August news",
"status": "subscribed",
"listId": "0b7c51e8",
"tagId` / `segmentId": "value",
"scheduledAt": "2026-08-23T10:22:05.000Z",
"sentAt": "2026-08-23T10:22:05.000Z",
"createdAt` / `updatedAt": "value"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}
}