Campaigns

Create Campaign

Create a new email campaign from a generated email. Use emailId for the exact generated email, especially series slots. Requires API key with campaign:write.

post/v1/campaigns

Request body

projectIdstring required

Project ID

namestring required

Campaign name

conversationIdstring required

Conversation ID that owns the generated email

emailIdstring

Generated email ID from result.emails[].emailId. Recommended for series slots.

subjectstring

Email subject (auto-populated from conversation if omitted)

preheaderTextstring

Preheader text

fromstring email required

Sender email address

fromNamestring required

Sender display name

replyTostring email

Reply-to address

recipientType'audience' | 'tag' required

Send to a segment (audience) or tag

recipientIdstring required

Segment or list ID. Required unless recipientIds is set. Ignored when recipientIds is present except as recipientIds[0] on the stored campaign.

recipientIdsstring[]

Send to several segments or several lists of the same type. Unique people receive one email. Cannot mix segments and lists. Maximum 20.

topicIdstring

Topic ID for preference filtering

providerType'ses' | 'resend' | 'sendgrid' | 'mailgun' | 'migma'

Email provider (default: migma)

variablesobject

Template variables

Response

Campaign created

successboolean required
errorstring nullable

Changes

Changed in 2 of the 6 revisions of this API.12

    • added the new optional request property recipientIds

      new-optional-request-property

    • added the optional property allOf[subschema #2]/data/recipientIds to the response with the 200 status

      response-optional-property-added

    • added the new pending_review enum value to the allOf[subschema #2]/data/status response property for the response status 200

      response-property-enum-value-added