Campaigns
Update Campaign Variation
Rename a variation, replace its content or move it on the canvas
PATCH
/
api
/
v1
/
campaigns
/
{campaignId}
/
variations
/
{variationId}
Update Campaign Variation
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"summary": {},
"blocks": [
{}
],
"html": "<string>",
"subject": {},
"previewText": {},
"emailTheme": {},
"fontFamily": {},
"position": {}
}
'import requests
url = "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}"
payload = {
"name": "<string>",
"summary": {},
"blocks": [{}],
"html": "<string>",
"subject": {},
"previewText": {},
"emailTheme": {},
"fontFamily": {},
"position": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
summary: {},
blocks: [{}],
html: '<string>',
subject: {},
previewText: {},
emailTheme: {},
fontFamily: {},
position: {}
})
};
fetch('https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}', 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/campaigns/{campaignId}/variations/{variationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'summary' => [
],
'blocks' => [
[
]
],
'html' => '<string>',
'subject' => [
],
'previewText' => [
],
'emailTheme' => [
],
'fontFamily' => [
],
'position' => [
]
]),
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/campaigns/{campaignId}/variations/{variationId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"summary\": {},\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"subject\": {},\n \"previewText\": {},\n \"emailTheme\": {},\n \"fontFamily\": {},\n \"position\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"summary\": {},\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"subject\": {},\n \"previewText\": {},\n \"emailTheme\": {},\n \"fontFamily\": {},\n \"position\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"summary\": {},\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"subject\": {},\n \"previewText\": {},\n \"emailTheme\": {},\n \"fontFamily\": {},\n \"position\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"variation": {
"id": "var_9xk2",
"emailId": "email_abc123",
"parentId": null,
"label": "V2",
"name": "Warm and personal",
"summary": "Rewrote the opening in a friendlier voice and shortened the body.",
"prompt": "Three warmer, shorter versions",
"style": "fresh",
"status": "ready",
"error": null,
"subject": "A quick note about our pricing",
"previewText": null,
"blocks": [
{ "id": "h1", "type": "heading", "content": "A quick note about pricing", "level": 1 }
],
"emailTheme": null,
"fontFamily": null,
"position": null,
"inUse": false,
"usedAt": null,
"createdAt": "2026-10-14T09:12:00.000Z",
"updatedAt": "2026-10-14T09:12:41.000Z"
}
}
{
"error": "Provide at least one of name, summary, blocks, html, subject, or previewText."
}
{
"error": "Invalid API key"
}
{
"error": "Variation not found"
}
{
"error": "This variation is still generating or failed, so its content can't be edited"
}
Renames a variation or replaces its content. Send at least one field; fields you omit stay as they are. Replacement blocks without a footer get the company’s default footer. Content (
blocks, html, subject, previewText, emailTheme, fontFamily) can only change once the variation is ready. To change it with AI instead, use Edit variation with AI. Updating a variation never changes the campaign email; use it for that.
Request
string
required
Campaign ID. Email campaigns only.
string
required
Variation ID.
string
New name, 1 to 120 characters.
string | null
What this version changes, up to 500 characters.
null clears it.array
Replacement email blocks. Send
blocks or
html, not both.string
Replacement HTML, converted to blocks.
string | null
The subject this variation uses.
null keeps the email’s subject.string | null
The preview text this variation uses.
null keeps the email’s.object | null
The variation’s own email theme (
presetId, colors, typography,
layout). A partial theme is completed with defaults. null uses the
email’s theme. Using the variation puts its theme on the email.string | null
The variation’s own body font stack, up to 500 characters.
null uses the
email’s font.object | null
Where the variation sits on the editor canvas, as
{ "x": number, "y": number }
in canvas pixels (each within ±1,000,000). null lets the canvas place it
automatically. Moving a variation does not change its updatedAt.curl -X PATCH "https://api.sequenzy.com/api/v1/campaigns/camp_abc123/variations/var_9xk2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Warm, shorter" }'
Response
object
The updated variation.
string[]
Block fields that were accepted but had no effect. Omitted when there are
none.
{
"success": true,
"variation": {
"id": "var_9xk2",
"emailId": "email_abc123",
"parentId": null,
"label": "V2",
"name": "Warm and personal",
"summary": "Rewrote the opening in a friendlier voice and shortened the body.",
"prompt": "Three warmer, shorter versions",
"style": "fresh",
"status": "ready",
"error": null,
"subject": "A quick note about our pricing",
"previewText": null,
"blocks": [
{ "id": "h1", "type": "heading", "content": "A quick note about pricing", "level": 1 }
],
"emailTheme": null,
"fontFamily": null,
"position": null,
"inUse": false,
"usedAt": null,
"createdAt": "2026-10-14T09:12:00.000Z",
"updatedAt": "2026-10-14T09:12:41.000Z"
}
}
{
"error": "Provide at least one of name, summary, blocks, html, subject, or previewText."
}
{
"error": "Invalid API key"
}
{
"error": "Variation not found"
}
{
"error": "This variation is still generating or failed, so its content can't be edited"
}
⌘I
Update Campaign Variation
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"summary": {},
"blocks": [
{}
],
"html": "<string>",
"subject": {},
"previewText": {},
"emailTheme": {},
"fontFamily": {},
"position": {}
}
'import requests
url = "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}"
payload = {
"name": "<string>",
"summary": {},
"blocks": [{}],
"html": "<string>",
"subject": {},
"previewText": {},
"emailTheme": {},
"fontFamily": {},
"position": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
summary: {},
blocks: [{}],
html: '<string>',
subject: {},
previewText: {},
emailTheme: {},
fontFamily: {},
position: {}
})
};
fetch('https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}', 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/campaigns/{campaignId}/variations/{variationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'summary' => [
],
'blocks' => [
[
]
],
'html' => '<string>',
'subject' => [
],
'previewText' => [
],
'emailTheme' => [
],
'fontFamily' => [
],
'position' => [
]
]),
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/campaigns/{campaignId}/variations/{variationId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"summary\": {},\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"subject\": {},\n \"previewText\": {},\n \"emailTheme\": {},\n \"fontFamily\": {},\n \"position\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"summary\": {},\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"subject\": {},\n \"previewText\": {},\n \"emailTheme\": {},\n \"fontFamily\": {},\n \"position\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"summary\": {},\n \"blocks\": [\n {}\n ],\n \"html\": \"<string>\",\n \"subject\": {},\n \"previewText\": {},\n \"emailTheme\": {},\n \"fontFamily\": {},\n \"position\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"variation": {
"id": "var_9xk2",
"emailId": "email_abc123",
"parentId": null,
"label": "V2",
"name": "Warm and personal",
"summary": "Rewrote the opening in a friendlier voice and shortened the body.",
"prompt": "Three warmer, shorter versions",
"style": "fresh",
"status": "ready",
"error": null,
"subject": "A quick note about our pricing",
"previewText": null,
"blocks": [
{ "id": "h1", "type": "heading", "content": "A quick note about pricing", "level": 1 }
],
"emailTheme": null,
"fontFamily": null,
"position": null,
"inUse": false,
"usedAt": null,
"createdAt": "2026-10-14T09:12:00.000Z",
"updatedAt": "2026-10-14T09:12:41.000Z"
}
}
{
"error": "Provide at least one of name, summary, blocks, html, subject, or previewText."
}
{
"error": "Invalid API key"
}
{
"error": "Variation not found"
}
{
"error": "This variation is still generating or failed, so its content can't be edited"
}