Skip to content

Create Sequence Variant

Add an A/B variant to a sequence step. The campaign must not be active.

POST/api/v1/campaigns/{campaign_id}/sequences/{sequence_id}/variants

Requires an API key with the write scope.

Add at least two variants to a step to run an A/B test. Subject and body support variables and spin syntax; invalid spin syntax is refused.

Path Parameters#

campaign_idstringpathrequired
The campaign.
sequence_idstringpathrequired
The sequence step.

Body Parameters#

subjectstringbodyrequired
Subject line, up to 500 characters.
bodystringbodyrequired
Body, up to 200,000 characters.
labelstringbody
Unique within the step, up to 10 characters. Default A.
weightintegerbody
Share of sends relative to the other variants, 1 to 1000. Default 1.
sendAsHtmlbooleanbody
Send as HTML. Default false.

Response#

dataobject
Show Variant object
idstring
Variant identifier.
sequenceIdstring
The step it belongs to.
labelstring
Unique within the step, for example A.
subjectstring
Subject line. Supports variables and spin syntax.
bodystring
Body. Supports variables and spin syntax.
weightinteger
Share of sends relative to the other variants.
sendAsHtmlboolean
Sent as HTML.
createdAtstring
ISO 8601 timestamp.
updatedAtstring
ISO 8601 timestamp.

Errors#

StatusDescription
401Missing, invalid, revoked or expired API key
403API key does not have the required scope: write
400The campaign is active (pause it first), the spin syntax is invalid, or the label is already used on this step
404Campaign or sequence step not found in this workspace
422A field is out of range, for example a label longer than 10 characters

Rate Limit#

  • 120 requests per minute, shared by every write call in your workspace. Fixed 60-second window.
  • Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (unix epoch seconds) and X-RateLimit-Bucket (write).
  • A 429 response includes a Retry-After header (seconds until the bucket resets).

For client-side patterns (Retry-After, exponential backoff, monitoring X-RateLimit-Remaining), see Rate Limiting.

Was this page helpful?
View as MarkdownLast updated November 4, 2026