Campaigns

Create and start a campaign

POST/v1/campaignsrequires campaign:write

Starts the send immediately, or holds it until scheduled_for.

Requestcurl -X POST https://api.transmit.dev/v1/campaigns \
  -H "Authorization: Bearer tr_v2_…" \
  -H "Content-Type: application/json" \
  -d '{
       "name": "…",
       "audience_id": "0f9f8e7d-6c5b-4a39-8271-1a2b3c4d5e6f",
       "template_id": "0f9f8e7d-6c5b-4a39-8271-1a2b3c4d5e6f",
       "from": "hello@yourdomain.com"
     }'

Body

FieldTypeNotes
name requiredstring1–200 characters
audience_id requiredstringuuid
template_id requiredstringuuid
from requiredstringemail
from_namestringat most 200 characters
track_opensbooleandefaults to true
track_clicksbooleandefaults to true
scheduled_forstringdate-time

Responses

StatusMeaning
202The campaign and the id of the run driving it
401The API key is missing, malformed, expired or revoked
403The API key lacks the campaign:write scope
404The audience or the template does not exist

Every response body is described in the OpenAPI spec, which this page is generated from.