Skip to main content

List Campaigns

Retrieve a paginated list of campaigns with optional filtering.

Request

GET /campaigns

Query Parameters

All parameters are optional and combined with AND.

ParameterTypeDefaultDescription
pageinteger1Page number (min: 1)
per_pageinteger100Items per page (min: 1, max: 100)
searchstring-Partial, case-insensitive match on the campaign name (max 255 characters).
statusstring-Return only campaigns with this status: draft, scheduled, queued, sending, sent, failed, or canceled (see Statuses).
sortstring-created_atSort order: created_at, updated_at, or name. Prefix with - for descending.

An unknown status, 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"

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": "550e8400-e29b-41d4-a716-446655440000",
"name": "Spring Sale",
"status": "sent",
"subject": "Up to 40% off this week",
"from_name": "Acme",
"language": "en",
"scheduled_at": null,
"recipients_count": 1284,
"created_at": "2026-03-01T09:00:00Z",
"updated_at": "2026-03-02T11:15:00Z"
},
{
"uuid": "660e8400-e29b-41d4-a716-446655440001",
"name": "June Newsletter",
"status": "draft",
"subject": null,
"from_name": "Acme",
"language": null,
"scheduled_at": null,
"recipients_count": 0,
"created_at": "2026-06-20T14:30:00Z",
"updated_at": "2026-06-20T14:30:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 50,
"total": 2
}
}

Response Fields

FieldTypeDescription
uuidstringCampaign's unique identifier
namestringCampaign name
statusstringCurrent status: draft, scheduled, queued, sending, sent, failed, or canceled
subjectstring|nullEmail subject line. null until set.
from_namestring|nullSender display name. null until set.
languagestring|nullISO 639-1 language code (2 characters). null until set.
scheduled_atstring|nullISO 8601 timestamp (UTC) the campaign is scheduled to send. null when not scheduled.
recipients_countintegerNumber of recipients the campaign was sent to. 0 for campaigns that have not been sent yet.
created_atstringISO 8601 timestamp (UTC)
updated_atstringISO 8601 timestamp (UTC)

Pagination Object

FieldTypeDescription
current_pageintegerCurrent page number
per_pageintegerNumber of items per page
totalintegerTotal 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."]
}
}
}