Variants
List All Variants
Retrieve all variants across all channels for a template. Returns variant metadata, conditions, and content.
GET
/
v2
/
{workspace}
/
template
/
{template_slug}
/
variant
/
List All Variants
curl -X GET "https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/" \
--header 'Authorization: ServiceToken <token>'import requests
url = "https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/"
headers = {"ServiceToken <token>": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'ServiceToken <token>': '<api-key>'}};
fetch('https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/', 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://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ServiceToken <token>: <api-key>"
],
]);
$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://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("ServiceToken <token>", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/")
.header("ServiceToken <token>", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["ServiceToken <token>"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"count": 4,
"limit": 10,
"offset": 0
},
"results": [
{
"$schema": "https://schema.suprsend.com/template/v2/variant_schema.json",
"channel": "email",
"id": "default",
"tenant_id": null,
"locale": "en",
"conditions": [],
"hash": "dd176370a4b99c735e30f70bc98c61983671072c40db70750c3ada9e5edcabc1",
"needs_vendor_approval": false,
"sysgen_template_name": null,
"approval_status": "auto_approved",
"discard_comment": null,
"approval_at": "2026-04-07T10:39:28.502737Z",
"has_error": false,
"seq_no": 1,
"action": null,
"created_at": "2026-04-07T10:39:28.510000Z"
},
{
"$schema": "https://schema.suprsend.com/template/v2/variant_schema.json",
"channel": "email",
"id": "spanish",
"tenant_id": null,
"locale": "es",
"conditions": [],
"hash": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"needs_vendor_approval": false,
"sysgen_template_name": null,
"approval_status": "auto_approved",
"discard_comment": null,
"approval_at": "2026-04-07T11:00:00.000000Z",
"has_error": false,
"seq_no": 2,
"action": null,
"created_at": "2026-04-07T11:00:00.000000Z"
},
{
"$schema": "https://schema.suprsend.com/template/v2/variant_schema.json",
"channel": "sms",
"id": "default",
"tenant_id": null,
"locale": "en",
"conditions": [],
"hash": "3d99f9fa848e1997f23ebf634cdf7db37ef36f05d3433b6c14727abf494c2c56",
"needs_vendor_approval": true,
"sysgen_template_name": "order_shipped_en_v1",
"approval_status": "approved",
"discard_comment": null,
"approval_at": "2026-04-07T12:00:00.000000Z",
"has_error": false,
"seq_no": 1,
"action": null,
"created_at": "2026-04-07T12:00:00.000000Z"
},
{
"$schema": "https://schema.suprsend.com/template/v2/variant_schema.json",
"channel": "inbox",
"id": "default",
"tenant_id": null,
"locale": "en",
"conditions": [],
"hash": "e71a233fa3af63e04beb3df6da90e7e506eef159b2599c3b42f3518b1a589c20",
"needs_vendor_approval": false,
"sysgen_template_name": null,
"approval_status": "auto_approved",
"discard_comment": null,
"approval_at": "2026-04-07T10:45:00.000000Z",
"has_error": false,
"seq_no": 1,
"action": null,
"created_at": "2026-04-07T10:45:00.000000Z"
}
]
}{
"code": 401,
"error_code": "authentication_failed",
"type": "AuthenticationFailed",
"message": "Invalid service token.",
"detail": "Invalid service token."
}{
"code": 404,
"error_code": "not_found",
"type": "NotFound",
"message": "workspace 'demo' not found",
"detail": "workspace 'demo' not found"
}Authorizations
You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.
Was this page helpful?
⌘I
List All Variants
curl -X GET "https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/" \
--header 'Authorization: ServiceToken <token>'import requests
url = "https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/"
headers = {"ServiceToken <token>": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'ServiceToken <token>': '<api-key>'}};
fetch('https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/', 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://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ServiceToken <token>: <api-key>"
],
]);
$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://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("ServiceToken <token>", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/")
.header("ServiceToken <token>", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/variant/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["ServiceToken <token>"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"count": 4,
"limit": 10,
"offset": 0
},
"results": [
{
"$schema": "https://schema.suprsend.com/template/v2/variant_schema.json",
"channel": "email",
"id": "default",
"tenant_id": null,
"locale": "en",
"conditions": [],
"hash": "dd176370a4b99c735e30f70bc98c61983671072c40db70750c3ada9e5edcabc1",
"needs_vendor_approval": false,
"sysgen_template_name": null,
"approval_status": "auto_approved",
"discard_comment": null,
"approval_at": "2026-04-07T10:39:28.502737Z",
"has_error": false,
"seq_no": 1,
"action": null,
"created_at": "2026-04-07T10:39:28.510000Z"
},
{
"$schema": "https://schema.suprsend.com/template/v2/variant_schema.json",
"channel": "email",
"id": "spanish",
"tenant_id": null,
"locale": "es",
"conditions": [],
"hash": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"needs_vendor_approval": false,
"sysgen_template_name": null,
"approval_status": "auto_approved",
"discard_comment": null,
"approval_at": "2026-04-07T11:00:00.000000Z",
"has_error": false,
"seq_no": 2,
"action": null,
"created_at": "2026-04-07T11:00:00.000000Z"
},
{
"$schema": "https://schema.suprsend.com/template/v2/variant_schema.json",
"channel": "sms",
"id": "default",
"tenant_id": null,
"locale": "en",
"conditions": [],
"hash": "3d99f9fa848e1997f23ebf634cdf7db37ef36f05d3433b6c14727abf494c2c56",
"needs_vendor_approval": true,
"sysgen_template_name": "order_shipped_en_v1",
"approval_status": "approved",
"discard_comment": null,
"approval_at": "2026-04-07T12:00:00.000000Z",
"has_error": false,
"seq_no": 1,
"action": null,
"created_at": "2026-04-07T12:00:00.000000Z"
},
{
"$schema": "https://schema.suprsend.com/template/v2/variant_schema.json",
"channel": "inbox",
"id": "default",
"tenant_id": null,
"locale": "en",
"conditions": [],
"hash": "e71a233fa3af63e04beb3df6da90e7e506eef159b2599c3b42f3518b1a589c20",
"needs_vendor_approval": false,
"sysgen_template_name": null,
"approval_status": "auto_approved",
"discard_comment": null,
"approval_at": "2026-04-07T10:45:00.000000Z",
"has_error": false,
"seq_no": 1,
"action": null,
"created_at": "2026-04-07T10:45:00.000000Z"
}
]
}{
"code": 401,
"error_code": "authentication_failed",
"type": "AuthenticationFailed",
"message": "Invalid service token.",
"detail": "Invalid service token."
}{
"code": 404,
"error_code": "not_found",
"type": "NotFound",
"message": "workspace 'demo' not found",
"detail": "workspace 'demo' not found"
}