Campaigns
Restore Campaign Variation
Bring back a discarded variation
POST
/
api
/
v1
/
campaigns
/
{campaignId}
/
variations
/
{variationId}
/
restore
Restore Campaign Variation
curl --request POST \
--url https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore', 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}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/campaigns/{campaignId}/variations/{variationId}/restore")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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": "Invalid API key"
}
{
"error": "Variation not found"
}
Brings back a discarded variation with its label, and moves its branches back under it. Restoring a variation that is not discarded returns it unchanged.
Request
string
required
Campaign ID. Email campaigns only.
string
required
Variation ID.
curl -X POST "https://api.sequenzy.com/api/v1/campaigns/camp_abc123/variations/var_9xk2/restore" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"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": "Invalid API key"
}
{
"error": "Variation not found"
}
⌘I
Restore Campaign Variation
curl --request POST \
--url https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore', 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}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/campaigns/{campaignId}/variations/{variationId}/restore")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/{variationId}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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": "Invalid API key"
}
{
"error": "Variation not found"
}