Skip to content

Create a campaign

POST /campaigns

Create a draft campaign. The campaign is not sent until you call /launch.

FieldTypeRequiredDescription
namestringyesInternal name.
descriptionstringno
list_iduuidyesTarget contact list.
domain_iduuidyesSending domain — must be verified.
subject_templatestringyesSupports {{first_name}}, {{custom_fields.state}}, etc.
preheader_templatestringnoHidden preheader text.
html_templatestringyesHTML body.
text_templatestringnoPlain text body.
from_addressstringyesMust be on domain_id.
reply_tostringno
daily_capintnoDefault 500.
per_minute_capintnoDefault 120.
send_window_start_hourintno0–23. Default 10.
send_window_end_hourintno0–23. Default 18.
scheduled_start_atISO 8601noDelay launch.
Terminal window
curl -X POST https://mail.3ava.com/api/campaigns \
-H "Authorization: Bearer am_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "April newsletter",
"list_id": "list_a1b2...",
"domain_id": "dom_c3d4...",
"subject_template": "{{first_name}}, your April update",
"html_template": "<p>Hi {{first_name}},</p>...",
"from_address": "[email protected]",
"daily_cap": 5000,
"per_minute_cap": 100
}'
{
"id": "camp_a1b2...",
"name": "April newsletter",
"status": "draft",
"total_recipients": 0,
"sent_count": 0,
"created_at": "2026-04-22T22:30:00Z"
}

total_recipients is 0 until you launch. At launch, it’s set to the count of valid recipients on the list at that moment.