Skip to main content

Campaigns

Campaigns let you send template-based emails to subscriber lists. They support scheduling, send rate control, A/B testing, and lifecycle management (pause, resume, cancel).

tip

For the full request/response schema, see the interactive API Reference.

Creating a Campaign

POST /api/v1/users/me/campaigns
{
"name": "April Newsletter",
"subject": "What's new in April",
"from_email": "newsletter@example.com",
"from_name": "Acme Team",
"template_id": 5,
"template_version_id": 12,
"language": "en",
"template_data": {
"month": "April",
"featured_url": "https://example.com/april"
},
"list_id": 3,
"send_rate": 100,
"scheduled_at": "2026-04-10T09:00:00Z"
}

Required Fields

FieldDescription
nameCampaign name (internal reference)
subjectEmail subject line
from_emailSender email address
template_idTemplate to use for the email body
list_idSubscriber list to send to

Optional Fields

FieldDefaultDescription
from_nameSender display name
template_version_idSpecific template version (uses active version if omitted)
languageenTemplate localization language
template_dataVariables to pass to the template
send_rate0Max emails per minute (0 = unlimited)
send_at_local_timefalseSend at scheduled time in each subscriber's local timezone
ab_test_enabledfalseEnable A/B testing
ab_test_variantsA/B test variant configuration
scheduled_atSchedule for future delivery

Campaign Statuses

StatusDescription
draftInitial state, can be edited
scheduledScheduled for future delivery
sendingCurrently sending to subscribers
sentAll messages delivered
pausedSending paused, can be resumed
cancelledPermanently cancelled

Listing Campaigns

GET /api/v1/users/me/campaigns?page=0&size=20

Optional query parameters:

ParameterDescription
pagePage number (default: 0)
sizePage size (default: 20)
statusFilter by status

Response includes delivery stats for each campaign:

{
"id": 1,
"name": "April Newsletter",
"status": "sending",
"stats": {
"total": 5000,
"pending": 2100,
"queued": 500,
"sent": 2300,
"failed": 50,
"skipped": 50
}
}

Getting a Campaign

GET /api/v1/users/me/campaigns/{id}

Updating a Campaign

PUT /api/v1/users/me/campaigns/{id}

Only draft campaigns can be updated. All fields are optional.

Deleting a Campaign

DELETE /api/v1/users/me/campaigns/{id}