Send a campaign

Send a campaign

POST/api/v1/email/campaigns/{id}/send

POST /email/campaigns/{id}/send
curl -X POST 'https://www.unitpost.com/api/v1/email/campaigns/cmp_123/send' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
Response · 200
{
  "object": "campaign",
  "id": "id_123",
  "name": "Example",
  "template_id": "template_123",
  "segment_id": "segment_123",
  "topic_id": "topic_123",
  "from": "you@yourdomain.com",
  "subject": "Welcome to Acme",
  "preview_text": "string",
  "open_tracking": false,
  "click_tracking": false,
  "status": "draft",
  "scheduled_at": "2026-01-01T00:00:00.000Z",
  "variable_fallbacks": {},
  "excluded_contact_ids": [
    "string"
  ],
  "total_recipients": 1,
  "projected_recipients": {
    "total": 1,
    "reachable": 0,
    "skipped": 0
  },
  "sent_count": 1,
  "failed_count": 1,
  "pause_reason": {
    "code": "user",
    "message": "string",
    "metric": "hard_bounce_rate",
    "value": 0,
    "threshold": 0,
    "sample": {
      "events": 0,
      "of": 0
    },
    "window": {
      "since": "string"
    },
    "decided_by": "floor",
    "resume": "self_serve",
    "paused_at": "2026-01-01T00:00:00.000Z"
  },
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Validate a draft campaign and then send it now or schedule it. scheduled_at in the body schedules it for that time (ISO 8601 with Z or an offset; in the future, inside your plan's scheduling window); null sends it now; omit it to use the draft's saved scheduled_at while that is still in the future — **otherwise the campaign is sent immediately** (except right after a dashboard Unschedule, which cleared its time: then it answers 409 with details[].code send_time_required and sends nothing, so name the time or pass null). The response's scheduled_at is the resolved time in UTC (null when it is sending now). A misnamed time field (scheduledAt, send_at, deliver_at, …) is a 422 naming scheduled_at, and a body that isn't JSON (a form-encoded one included) is a 400; nothing is sent in either case. Other fields are ignored and a JSON null body means no options. If anything blocks the send (unverified domain, missing template variables, empty audience, …) you get a 409 with each blocking reason itemized in error.details[] (code is the reason, as in the validate report's blockers[].code). To see the full pre-send report without attempting a send, use Validate a campaign; fix variable issues via Update a campaign. A launched campaign can be paused or canceled, and a scheduled one rescheduled. Requires the campaigns:send capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Request body1 field
FieldTypeDescription
scheduled_atstring | null—
Response · 200 fields22 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
namerequiredstring—
template_idrequiredstring—
segment_idrequiredstring—
topic_idrequiredstring | null—
fromrequiredstring—
subjectrequiredstring | null—
preview_textrequiredstring | null—
open_trackingrequiredboolean | null—
click_trackingrequiredboolean | null—
statusrequiredenumdraft | scheduled | sending | paused | sent | canceled | failed—
scheduled_atrequiredstring | null—
variable_fallbacksrequiredobject—
excluded_contact_idsrequiredstring[]—
total_recipientsrequirednumberRecipients the engine admitted when the campaign started sending. 0 while it is `draft` or `scheduled`: read `projected_recipients`, or `sendable` from validate.
projected_recipientsobject | nullThe audience counted when the campaign was sent or scheduled: `total` segment members, `reachable` who will get it, `skipped` (unsubscribed, suppressed, excluded). Null for a draft that was never sent: read validate. Read-only.
sent_countrequirednumber—
failed_countrequirednumber—
pause_reasonrequiredobject | null—
created_atrequiredstring—
updated_atrequiredstring—
200400401402403404409422429502503

Search docs and guides

Search the docs and product guides.