Create or prepare a campaign (frozen draft)
Create or prepare a campaign (frozen draft) with the Mailly email API for AI agents: POST /campaigns. Parameters, request body, responses and code samples.
Idempotent by campaignKey: an existing campaign must have identical content (otherwise 409). Marketing campaigns need the marketing footer configured first. Providing audience freezes an audience snapshot.
bearerAuthAuthorizationBearer <token>Mailly API key(Authorization: Bearer )
application/json- body
campaignKey?stringname?stringemailType?stringDefault marketing
"transactional""lifecycle""marketing"senderEmail?stringfromName?stringreplyTo?stringtopic?stringsubject?stringhtml?stringtext?stringfrequencyCapDays?numberfrequencyCapMax?numbertopicExclusionDays?numberrecipientReason?stringtemplateKey?stringtemplateVersion?numberaudienceDefinition?unknownaudience?Frozen audience selection
sourceApp?stringutm?businessGoal?string[key: string]?unknownCreated
application/json- response
success*booleancampaign*audienceSnapshot*|null[key: string]?unknowncurl -X POST 'https://api.mailly.site/campaigns' \ -H 'Content-Type: application/json' \ -d '{ "property1": null, "property2": null}'{ "success": true, "campaign": { "property1": null, "property2": null }, "audienceSnapshot": { "property1": null, "property2": null }, "property1": null, "property2": null}complete Campaign POST
complete Campaign with the Mailly email API for AI agents: POST /campaigns/{campaignKey}/complete. Parameters, request body, responses and code samples.
Edit content while paused PATCH
Edit content while paused with the Mailly email API for AI agents: PATCH /campaigns/{campaignKey}/content. Parameters, request body, responses and code samples.