Sequences
Use Sequence Email Variation
Save a variation’s design into its email, or every email’s style
POST
/
api
/
v1
/
sequences
/
{sequenceId}
/
emails
/
{emailId}
/
variations
/
{variationId}
/
use
Use Sequence Email Variation
curl --request POST \
--url https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scope": "<string>",
"dryRun": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use"
payload = {
"scope": "<string>",
"dryRun": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({scope: '<string>', dryRun: true})
};
fetch('https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'scope' => '<string>',
'dryRun' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use"
payload := strings.NewReader("{\n \"scope\": \"<string>\",\n \"dryRun\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"<string>\",\n \"dryRun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": \"<string>\",\n \"dryRun\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"dryRun": false,
"emails": [
{
"emailId": "email_abc123",
"nodeId": "node_abc123",
"label": "Email 1",
"status": "changed",
"summary": "Now uses V1.",
"saved": true,
"error": null
},
{
"emailId": "email_def456",
"nodeId": "node_def456",
"label": "Email 2",
"status": "changed",
"summary": "Matched to Email 1's style.",
"saved": true,
"error": null
}
]
}
{
"error": "This step is an A/B test. Change its variants instead."
}
{
"error": "Invalid API key"
}
{
"error": "Variation not found"
}
{
"error": "This variation is still being designed. Try again once it's ready."
}
Saves a
ready variation’s design into its email: its blocks, theme and font. The email keeps its own subject and preview text. With scope: "all", every other email of the sequence also takes the variation’s style exactly, without AI, like Use for every email in the sequence editor: its theme, its font and the style of each kind of block, while every email keeps its own words.
Each email saves on its own. One saved somewhere else since it was read is not overwritten: it comes back with saved: false and an error. Translations and A/B test copy are re-derived from the new content, and on an active sequence the changes go out with the next sends. Pass dryRun: true to see what would change first.
The email’s previous design is not kept as a variation. To compare it later, generate new variations, or read the sequence with Get Sequence before using one.
Request
string
required
Sequence ID.
string
required
The email’s ID: the
emailId of its step from Get Sequence.string
required
Variation ID.
string
default:"email"
email changes only this email. all also gives every other email of the
sequence its style.boolean
default:"false"
Return what would change without saving.
curl -X POST "https://api.sequenzy.com/api/v1/sequences/seq_abc123/emails/email_abc123/variations/evar_9xk2/use" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "scope": "all" }'
Response
boolean
Whether the changes were only returned, not saved.
object[]
This email first, then, with
scope: "all", every other email the AI can
edit, in sending order.Show properties
Show properties
string
The email’s ID.
string
Its step.
string
Its position in the sequence, like
Email 2.string
changed, unchanged (it already had this style) or failed.string | null
What changed.
boolean
Whether the change was saved.
string | null
Why a changed email wasn’t saved, or a warning when only its translations
or A/B test copy couldn’t be updated.
{
"success": true,
"dryRun": false,
"emails": [
{
"emailId": "email_abc123",
"nodeId": "node_abc123",
"label": "Email 1",
"status": "changed",
"summary": "Now uses V1.",
"saved": true,
"error": null
},
{
"emailId": "email_def456",
"nodeId": "node_def456",
"label": "Email 2",
"status": "changed",
"summary": "Matched to Email 1's style.",
"saved": true,
"error": null
}
]
}
{
"error": "This step is an A/B test. Change its variants instead."
}
{
"error": "Invalid API key"
}
{
"error": "Variation not found"
}
{
"error": "This variation is still being designed. Try again once it's ready."
}
⌘I
Use Sequence Email Variation
curl --request POST \
--url https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scope": "<string>",
"dryRun": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use"
payload = {
"scope": "<string>",
"dryRun": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({scope: '<string>', dryRun: true})
};
fetch('https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'scope' => '<string>',
'dryRun' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use"
payload := strings.NewReader("{\n \"scope\": \"<string>\",\n \"dryRun\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"<string>\",\n \"dryRun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/{variationId}/use")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": \"<string>\",\n \"dryRun\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"dryRun": false,
"emails": [
{
"emailId": "email_abc123",
"nodeId": "node_abc123",
"label": "Email 1",
"status": "changed",
"summary": "Now uses V1.",
"saved": true,
"error": null
},
{
"emailId": "email_def456",
"nodeId": "node_def456",
"label": "Email 2",
"status": "changed",
"summary": "Matched to Email 1's style.",
"saved": true,
"error": null
}
]
}
{
"error": "This step is an A/B test. Change its variants instead."
}
{
"error": "Invalid API key"
}
{
"error": "Variation not found"
}
{
"error": "This variation is still being designed. Try again once it's ready."
}