A/B Tests
Get A/B Test
Get A/B test details and variants
GET
/
api
/
v1
/
ab-tests
/
{abTestId}
Get A/B Test
curl --request GET \
--url https://api.sequenzy.com/api/v1/ab-tests/{abTestId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/ab-tests/{abTestId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/ab-tests/{abTestId}', 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/ab-tests/{abTestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/ab-tests/{abTestId}"
req, _ := http.NewRequest("GET", 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.get("https://api.sequenzy.com/api/v1/ab-tests/{abTestId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/ab-tests/{abTestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"abTest": {
"id": "ab_abc123",
"kind": "sequence",
"name": "Subject test",
"status": "draft",
"automationNodeId": "node_abc123",
"winnerCriteria": "open_rate",
"testType": "content",
"winnerThreshold": 150,
"settings": {
"testType": "content",
"winnerThreshold": 150,
"winnerCriteria": "open_rate"
},
"winningVariantId": null,
"variants": [
{
"id": "var_a",
"label": "A",
"emailId": "email_abc123",
"subject": "Welcome",
"previewText": null,
"blocks": [],
"localizations": []
}
]
}
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "A/B test not found"
}
Get one A/B test, including its effective
settings, all variants, and
localization sync status for each variant. Use settings when copying a test:
campaigns return percentage/duration settings, while sequences return
testType, winnerThreshold, and winnerCriteria.
Sequence records retain legacy testPercentage: 100 and
testDurationMinutes: 0 fields for backwards compatibility. Those sentinels do
not control sequence delivery.
Request
string
required
A/B test ID.
curl "https://api.sequenzy.com/api/v1/ab-tests/ab_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
Responses
{
"success": true,
"abTest": {
"id": "ab_abc123",
"kind": "sequence",
"name": "Subject test",
"status": "draft",
"automationNodeId": "node_abc123",
"winnerCriteria": "open_rate",
"testType": "content",
"winnerThreshold": 150,
"settings": {
"testType": "content",
"winnerThreshold": 150,
"winnerCriteria": "open_rate"
},
"winningVariantId": null,
"variants": [
{
"id": "var_a",
"label": "A",
"emailId": "email_abc123",
"subject": "Welcome",
"previewText": null,
"blocks": [],
"localizations": []
}
]
}
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "A/B test not found"
}
⌘I
Get A/B Test
curl --request GET \
--url https://api.sequenzy.com/api/v1/ab-tests/{abTestId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/ab-tests/{abTestId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/ab-tests/{abTestId}', 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/ab-tests/{abTestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/ab-tests/{abTestId}"
req, _ := http.NewRequest("GET", 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.get("https://api.sequenzy.com/api/v1/ab-tests/{abTestId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/ab-tests/{abTestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"abTest": {
"id": "ab_abc123",
"kind": "sequence",
"name": "Subject test",
"status": "draft",
"automationNodeId": "node_abc123",
"winnerCriteria": "open_rate",
"testType": "content",
"winnerThreshold": 150,
"settings": {
"testType": "content",
"winnerThreshold": 150,
"winnerCriteria": "open_rate"
},
"winningVariantId": null,
"variants": [
{
"id": "var_a",
"label": "A",
"emailId": "email_abc123",
"subject": "Welcome",
"previewText": null,
"blocks": [],
"localizations": []
}
]
}
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "A/B test not found"
}