Create campaign
documentedCreate a new campaign.
POST /campaignsCampaigns (Classic)no implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://api.mailerlite.com/api/v2/campaigns" \
-X POST \
-H "X-MailerLite-ApiKey: {{MAILERLITE_API_KEY}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name": "{{$title}}", "type": "regular", "language_id": {{$language_id}}, "emails": [{"subject": "{{$subject}}", "from_name": "{{$from_name}}", "from_email": "{{$from_email}}"}], "ab_settings": {"values": ["{{$ab_value1}}", "{{$ab_value2}}"], "send_type": "subject", "ab_win_type": "opens", "winner_after": {{$winner_after}}, "winner_after_type": "d", "split_part": {{$split_part}} }' }