Create a campaign
Exactly one of `list_id` or `segment_id` is required — a campaign sends to a static list or a live segment, never both.
/campaignsAuthorizations
Authorization API key for your workspace, scoped to campaigns:manage. Pass it as a Bearer token in the Authorization header.
Body · application/json
namesubjecttemplate_idsender_idlist_idcurl https://api.mailcraft.host/v1/campaigns \
-X POST \
-H 'Authorization: Bearer sk_live_...' \
-H 'Content-Type: application/json' \
-d '{
"name": "September newsletter",
"subject": "What'\''s new this month",
"template_id": 9,
"sender_id": 3,
"list_id": 4
}'{
"data": {
"id": 5,
"name": "September newsletter",
"subject": "What's new this month",
"template_id": 9,
"sender_id": 3,
"list_id": 4,
"segment_id": null,
"status": "draft",
"scheduled_at": null,
"started_at": null,
"completed_at": null,
"stats": null,
"created_at": "2026-09-22T14:20:00.000000Z"
}
}List campaigns
/campaignsAuthorizations
Authorization API key for your workspace, scoped to campaigns:manage. Pass it as a Bearer token in the Authorization header.
curl https://api.mailcraft.host/v1/campaigns \
-H 'Authorization: Bearer sk_live_...'{
"data": [
{ "id": 5, "name": "September newsletter", "status": "draft" }
]
}Get a campaign
/campaigns/{campaign}Authorizations
Authorization API key for your workspace, scoped to campaigns:manage. Pass it as a Bearer token in the Authorization header.
curl https://api.mailcraft.host/v1/campaigns/5 \
-H 'Authorization: Bearer sk_live_...'{
"data": {
"id": 5,
"name": "September newsletter",
"status": "sent",
"stats": { "sent": 812, "delivered": 799, "opened": 401, "clicked": 88 },
"started_at": "2026-09-22T14:25:00.000000Z",
"completed_at": "2026-09-22T14:31:00.000000Z"
}
}Send a campaign
Transitions the campaign from `draft`/`scheduled` to `sending`, materializes the recipient list, and dispatches through the rate-limited send queue.
/campaigns/{campaign}/sendAuthorizations
Authorization API key for your workspace, scoped to campaigns:manage. Pass it as a Bearer token in the Authorization header.
curl https://api.mailcraft.host/v1/campaigns/5/send \
-X POST \
-H 'Authorization: Bearer sk_live_...'{
"data": { "id": 5, "status": "sending", "started_at": "2026-09-22T14:25:00.000000Z" }
}Delete a campaign
/campaigns/{campaign}Authorizations
Authorization API key for your workspace, scoped to campaigns:manage. Pass it as a Bearer token in the Authorization header.
curl https://api.mailcraft.host/v1/campaigns/5 \
-X DELETE \
-H 'Authorization: Bearer sk_live_...'(empty body)