Send email (transactional or marketing)
POST
Applies governance, then passes through to the queue service; supports single, batch, audience, campaign, scheduled, and template-variable sends. Billed per recipient.
bearerAuthheader
AuthorizationBearer <token>Mailly API key(Authorization: Bearer )
application/json- body
to?|array<string|>Recipients: an email, an array of emails, or an array of {email, externalId} objects; use exactly one of this, audience, or campaignKey
audience?Audience filter {include, exclude}
campaignKey?stringCampaign key that uses a frozen audience
campaignName?stringsubject?stringEmail subject
html?stringHTML body
text?stringPlain-text body
fromEmail?stringFrom address (must be on a verified sending domain)
fromName?stringreplyTo?stringcc?stringbcc?stringtopic?stringUnsubscribe and frequency-cap topic
emailType?stringValue in
"transactional""lifecycle""marketing"dryRun?booleanValidate only, do not deliver
testSend?booleanscheduledAt?numberScheduled send time in Unix seconds
frequencyCapDays?numberfrequencyCapMax?numbertopicExclusionDays?numberrecipientReason?stringtemplateKey?stringtemplateVersion?numbersourceApp?stringbusinessGoal?stringutm?messageId?stringinReplyTo?stringreferences?array<string>attachments?array<unknown>variables?Inline {{var}} template variables
[key: string]?unknownSend result (passed through from the Queue service, JSON)
curl -X POST 'https://api.mailly.site/send-email' \ -H 'Content-Type: application/json' \ -d '{ "property1": null, "property2": null}'Empty