Campaigns
Create a campaign
Creates an email campaign draft for the given audience and content, returning the created campaign.
Creates an email campaign draft for the given audience and content, returning the created campaign.
Authorization
apiKey x-api-key<token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
name*string
channel*"email"
Value in
- "email"
content*
audience*
policy?|null
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/campaigns" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "channel": "email", "content": { "channel": "email", "email": {} }, "audience": {} }'{ "id": "string", "name": "string", "channel": "email", "content": { "channel": "email", "email": { "subject": "string", "html": "string", "text": "string", "attachments": [ { "filename": "string", "content": "string", "mediaId": "string", "contentType": "string", "size": 1 } ], "publicationId": "string", "inputContractId": "string", "templateId": "string", "templateSlug": "string", "templateData": {}, "inReplyToMessageId": "string", "replyTo": [ "string" ], "unsubscribeGroupId": "string", "tracking": { "opens": true, "clicks": true }, "footer": { "enabled": true } }, "conversationId": "string", "metadata": {} }, "audience": { "includeTags": [ "string" ], "excludeTags": [ "string" ], "contactIds": [ "string" ], "groupIds": [ "string" ] }, "policy": { "unsubscribeGroupId": "string", "pageSize": 100 }, "definition": { "state": "editable", "frozenAt": "string" }, "latestRun": { "id": "string", "status": "scheduled", "scheduledFor": "string", "completedAt": "string", "totalRecipients": 0, "dispatchedCount": 0, "failedCount": 0, "skippedCount": 0 }, "createdBy": "string", "actorEmail": "string", "memberRole": "string", "createdAt": "string", "updatedAt": "string"}