# Create Campaign Variation

POST /api/v2/projects/{projectId}/email-campaigns/{campaignId}/variations

Adds a variation to a draft or paused campaign. The new variation copies the first one, then applies `changes`. Same content fields as Update Campaign Message, including subjectHTML, subjectJSON, bodyHTML, bodyJSON, previewTextHTML, and previewTextJSON. A second variation on a STANDARD campaign sets the type to AB_TEST. Returns the variation and a permalink that opens the message step in the editor.

## Request

- projectId: string, path, required — Project that owns the campaign.
- campaignId: string, path, required — Campaign that receives the variation. emailMarketing_createEmailCampaign.id or emailMarketing_listEmailCampaigns[].id.
- changes: object — Content for the new variation. Same fields as emailMarketing_updateCampaignMessage changes: subjectHTML, subjectJSON, bodyHTML, bodyJSON, previewTextHTML, previewTextJSON, text, fromName, fromEmailUsername, fromDomain, replyTo, cc, bcc, label, scheduledAt, and theme. Omitted fields are copied from the first variation. bodyHTML must be an HTML fragment.
  - bcc: string
  - bodyHTML: string
  - bodyJSON: object
  - cc: string
  - fromDomain: string
  - fromEmailUsername: string
  - fromName: string
  - label: string
  - previewTextHTML: string
  - previewTextJSON: object
  - replyTo: string
  - scheduledAt: string — When to send this message, as an ISO 8601 timestamp with a timezone offset. Null clears it.
  - subjectHTML: string
  - subjectJSON: object
  - text: string
  - theme: object
    - body: object, required
    - button: object, required
    - link: object, required
    - template: string, required
    - typography: object, required

## Response

- 200: Successful response
  - bodyHTML: string, required
  - bodyJSON: object, required
  - createdAt: string, required
  - emailCampaignId: string, required
  - fromDomain: string, required
  - fromEmailUsername: string, required
  - fromName: string, required
  - id: string, required
  - label: string, required
  - permalink: string, required — Dashboard URL that opens this campaign on the message step, where every variation is listed.
  - previewTextHTML: string, required
  - previewTextJSON: object, required
  - projectId: string, required
  - sendCount: integer, required, default 0
  - subjectHTML: string, required
  - subjectJSON: object, required
  - text: string, required
  - theme: object, required
    - body: object, required
    - button: object, required
    - link: object, required
    - template: string, required
    - typography: object, required
  - updatedAt: string, required
  - bcc: string
  - cc: string
  - lastSuccessContactCreatedAt: string
  - lastSuccessContactId: string
  - replyTo: string
  - …
- 400: Invalid input data
- 401: Authorization not provided
- 403: Insufficient access
- 500: Internal server error
