Mailly文档

Create or prepare a campaign (frozen draft)

POST
/campaigns

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.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Mailly API key(Authorization: Bearer )

Request Body

application/json
  1. body
campaignKey?string
name?string
emailType?string

Default marketing

Value in"transactional""lifecycle""marketing"
senderEmail?string
fromName?string
replyTo?string
topic?string
subject?string
html?string
text?string
frequencyCapDays?number
frequencyCapMax?number
topicExclusionDays?number
recipientReason?string
templateKey?string
templateVersion?number
audienceDefinition?unknown
audience?

Frozen audience selection

sourceApp?string
utm?
businessGoal?string
[key: string]?unknown

Response Body

Created

application/json
  1. response
success*boolean
campaign*
audienceSnapshot*|null
[key: string]?unknown
curl -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}