List Campaigns
Retrieve a paginated list of campaigns with optional filtering.
Request
GET /campaigns
Query Parameters
All parameters are optional and combined with AND.
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (min: 1) |
per_page | integer | 100 | Items per page (min: 1, max: 100) |
search | string | - | Partial, case-insensitive match on the campaign name (max 255 characters). |
status | string | - | Return only campaigns with this status: draft, scheduled, queued, sending, sent, failed, or canceled (see Statuses). |
ab_test | boolean | - | true returns only campaigns with an A/B test; false only campaigns without. Omit to return all. |
sort | string | -created_at | Sort order: created_at, updated_at, or name. Prefix with - for descending. |
An unknown status, a non-boolean ab_test, an unsupported sort field, or an out-of-range page /
per_page returns 422 VALIDATION_ERROR.
Ordering: Results default to created_at descending (newest first) unless
sort is supplied.
Counting matches: every response includes the filtered total in
pagination.total. To get only a count, request per_page=1 with your filters
and read pagination.total.
Example Requests
List the most recently created campaigns:
curl -X GET "https://email.easy.tools/api/v1/campaigns?page=1&per_page=50" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Drafts only, ordered by name:
curl -X GET "https://email.easy.tools/api/v1/campaigns?status=draft&sort=name" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
A/B test campaigns only:
curl -X GET "https://email.easy.tools/api/v1/campaigns?ab_test=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Count the campaigns that have been sent:
curl -X GET "https://email.easy.tools/api/v1/campaigns?status=sent&per_page=1" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Response
Success Response (200 OK)
{
"data": [
{
"uuid": "4e8b1c7a-2f9d-4b63-a0e5-8c2d7f19b356",
"name": "Weekend Flash Sale",
"status": "draft",
"subject": "Free shipping all weekend",
"from_name": null,
"language": null,
"scheduled_at": null,
"recipients_count": 0,
"ab_test": {
"phase": "configured",
"winner_variant": null,
"winner_at": null
},
"created_at": "2026-06-25T09:00:00Z",
"updated_at": "2026-06-25T09:00:00Z"
},
{
"uuid": "71a18204-8f3d-4f0f-9146-75ee41fb7978",
"name": "June Newsletter",
"status": "draft",
"subject": null,
"from_name": "Acme",
"language": null,
"scheduled_at": null,
"recipients_count": 0,
"ab_test": null,
"created_at": "2026-06-20T14:30:00Z",
"updated_at": "2026-06-20T14:30:00Z"
},
{
"uuid": "53a8ae7a-9c90-4451-960d-ca7e816cb9cf",
"name": "Summer Sale",
"status": "sent",
"subject": "Summer Sale: up to 30% off",
"from_name": "Acme",
"language": "en",
"scheduled_at": null,
"recipients_count": 1240,
"ab_test": {
"phase": "sending_winner",
"winner_variant": "b",
"winner_at": "2026-06-03T08:02:11Z"
},
"created_at": "2026-06-01T09:00:00Z",
"updated_at": "2026-06-03T08:40:00Z"
},
{
"uuid": "c0578a15-1b1d-41e4-8dd3-caa3ac7ccf47",
"name": "Spring Sale",
"status": "sent",
"subject": "Up to 40% off this week",
"from_name": "Acme",
"language": "en",
"scheduled_at": null,
"recipients_count": 1284,
"ab_test": null,
"created_at": "2026-03-01T09:00:00Z",
"updated_at": "2026-03-02T11:15:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 50,
"total": 4
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
uuid | string | Campaign's unique identifier |
name | string | Campaign name |
status | string | Current status: draft, scheduled, queued, sending, sent, failed, or canceled |
subject | string|null | Email subject line. null until set. On an A/B test campaign, variant A's subject. |
from_name | string|null | Sender display name. null until set. |
language | string|null | ISO 639-1 language code (2 characters). null until set. |
scheduled_at | string|null | ISO 8601 timestamp (UTC) the campaign is scheduled to send. null when not scheduled. |
recipients_count | integer | Number of recipients the campaign was sent to. 0 for campaigns that have not been sent yet. See A/B test campaigns for how it changes during a test. |
ab_test | object|null | The campaign's A/B test state, or null for a campaign without an A/B test. See A/B Test Summary Object. |
created_at | string | ISO 8601 timestamp (UTC) |
updated_at | string | ISO 8601 timestamp (UTC) the campaign itself last changed, such as an edit or a status change. Messages being sent, opened, or clicked don't change it. |
A/B Test Summary Object
| Field | Type | Description |
|---|---|---|
phase | string | configured, testing, choosing_winner, or sending_winner. See How a test runs. |
winner_variant | string|null | The variant that won, a or b. null until the winner is picked. |
winner_at | string|null | ISO 8601 timestamp (UTC) the winner is or was picked. null while unknown. |
The full settings and per-variant results are in the A/B Test Object, returned by Get Campaign.
Pagination Object
| Field | Type | Description |
|---|---|---|
current_page | integer | Current page number |
per_page | integer | Number of items per page |
total | integer | Total number of campaigns |
Error Responses
Validation Error (422 Unprocessable Entity)
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"status": ["The selected status is invalid."]
}
}
}