Campaigns

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

  • Base URL
    https://api.migma.ai
  • URL
    https://api.migma.ai/v1/campaigns
  • Auth
    API key in header Authorization

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

    • info

      added the optional property // to the response with the status

    • info

      added the new mailgun enum value to the request property

    • info

      added the new resend enum value to the request property

    • info

      added the new sendgrid enum value to the request property