Create Sequence Variant
Add an A/B variant to a sequence step. The campaign must not be active.
POST
https://api.foxreach.io/ api/ v1/ campaigns/{campaign_id}/ sequences/{sequence_id}/ variantsRequires 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_idstringpathrequiredThe campaign.
sequence_idstringpathrequiredThe sequence step.
Body Parameters#
subjectstringbodyrequiredSubject line, up to 500 characters.
bodystringbodyrequiredBody, up to 200,000 characters.
labelstringbodyUnique within the step, up to 10 characters. Default
A.weightintegerbodyShare of sends relative to the other variants, 1 to 1000. Default
1.sendAsHtmlbooleanbodySend as HTML. Default
false.Response#
dataobjectShow Variant object
idstringVariant identifier.
sequenceIdstringThe step it belongs to.
labelstringUnique within the step, for example
A.subjectstringSubject line. Supports variables and spin syntax.
bodystringBody. Supports variables and spin syntax.
weightintegerShare of sends relative to the other variants.
sendAsHtmlbooleanSent as HTML.
createdAtstringISO 8601 timestamp.
updatedAtstringISO 8601 timestamp.
Errors#
| Status | Description |
|---|---|
401 | Missing, invalid, revoked or expired API key |
403 | API key does not have the required scope: write |
400 | The campaign is active (pause it first), the spin syntax is invalid, or the label is already used on this step |
404 | Campaign or sequence step not found in this workspace |
422 | A field is out of range, for example a label longer than 10 characters |
Rate Limit#
- 120 requests per minute, shared by every
writecall in your workspace. Fixed 60-second window. - Every response includes
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset(unix epoch seconds) andX-RateLimit-Bucket(write). - A
429response includes aRetry-Afterheader (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