Skip to content

Campaigns API

Campaigns group related messages for tracking and analytics. Listing and managing campaigns happens in the dashboard; the developer API exposes creation so your integrations can tag outgoing messages with a campaign.

Create Campaign

POST /api/v1/campaigns
Authorization: Bearer {api_key}

Required scope: email:send. Scoped keys (all_domains = false) must also include a from address whose domain is in their allowlist, same as POST /emails.

json
{
  "name": "March Newsletter",
  "template_id": "tmpl_abc123",
  "scheduled_at": "2026-03-20T09:00:00Z"
}
FieldRequiredDescription
nameYesCampaign name
template_idNoTemplate to use for campaign messages
scheduled_atNoSchedule the campaign for a future time

Response

json
{
  "id": "cmp_abc123",
  "user_id": "user_xyz",
  "name": "March Newsletter",
  "type": "email",
  "status": "draft",
  "template_id": "tmpl_abc123",
  "scheduled_at": "2026-03-20T09:00:00Z",
  "stats": {
    "sent": 0,
    "delivered": 0,
    "bounced": 0,
    "opened": 0
  },
  "created_at": "2026-03-15T10:00:00Z",
  "updated_at": "2026-03-15T10:00:00Z"
}

Campaign Status

StatusDescription
draftCreated, not yet sent
scheduledQueued for future delivery
sendingCurrently processing
completedAll messages sent
cancelledCancelled before completion

TechTrans Lab