Skip to main content

Overview

Campaigns let you send a single email to every subscribed contact in a contact book. Schedule sends for a specific time or send immediately, with automatic batching to respect rate limits. Track delivery, opens, clicks, bounces, and complaints in real time.

How It Works

  1. Create a campaign with a name, from address, subject, HTML content, and a target contact book
  2. Schedule or send now — the system populates a send queue for every subscribed contact
  3. Batch processing — Sendi’s internal scheduler automatically picks up queued sends in batches (default 100), respecting your plan’s rate limits. No setup required — it just works.
  4. Track metrics — as SES events arrive, campaign counters update automatically (delivered, opened, clicked, bounced, complained)
  5. Pause/resume — pause a running campaign at any time; pending sends stay in the queue until you resume

Campaign Lifecycle

DRAFT → SCHEDULED → RUNNING → SENT
                       ↓ ↑
                     PAUSED
  • Draft — editable, not yet scheduled
  • Scheduled — queued for a future time (or immediately)
  • Running — actively sending batches via cron
  • Paused — sending stopped; can be resumed
  • Sent — all sends completed

Campaign Object

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "March Newsletter",
  "status": "running",
  "from_email": "news@yourdomain.com",
  "subject": "What's new in March",
  "preview_text": "Big updates this month...",
  "contact_book_id": "660e8400-e29b-41d4-a716-446655440000",
  "total_contacts": 1500,
  "sent_count": 800,
  "delivered_count": 790,
  "opened_count": 320,
  "clicked_count": 85,
  "bounced_count": 10,
  "complained_count": 0,
  "unsubscribed_count": 3,
  "batch_size": 100,
  "scheduled_at": "2026-03-08T14:00:00Z",
  "started_at": "2026-03-08T14:00:00Z",
  "created_at": "2026-03-08T12:00:00Z"
}

Template Variables

Campaign HTML supports variable substitution using double curly braces:
VariableDescription
{{email}}Contact’s email address
{{first_name}}Contact’s first name
{{last_name}}Contact’s last name
{{unsubscribe_url}}HMAC-signed unsubscribe link
<p>Hi {{first_name}},</p>
<p>Thanks for subscribing!</p>
<p><a href="{{unsubscribe_url}}">Unsubscribe</a></p>

Preview Text

Set preview_text to control the snippet shown in email clients next to the subject line. It’s injected as a hidden span at the start of the email body. Each campaign send gets a unique, HMAC-signed unsubscribe URL. When a recipient clicks it, their contact is marked as subscribed: false and excluded from future sends. No authentication required — the HMAC token prevents tampering.

Batching & Rate Limits

Campaigns are processed automatically by Sendi’s internal scheduler. The default batch size is 100 emails per cycle (runs every minute). If your plan’s daily or monthly quota is hit mid-campaign, the campaign is automatically paused. You don’t need to configure anything — scheduling and batch processing are fully managed.

Open & Click Tracking

Campaign emails automatically include open tracking pixels and click-wrapped links (same as regular sends). Metrics on the campaign update in real time as events arrive from SES.

Plan Limits

FeatureFreePro
Active campaigns1Unlimited
Active campaigns are those with status not in sent or cancelled.

API Reference

See the Campaigns API reference for full CRUD and lifecycle operations.