A/B Tests
Get A/B Test Stats
Get aggregate and per-variant A/B test stats
GET
/
api
/
v1
/
ab-tests
/
{abTestId}
/
stats
Get A/B Test Stats
curl --request GET \
--url https://api.sequenzy.com/api/v1/ab-tests/{abTestId}/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/ab-tests/{abTestId}/stats"
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}/stats', 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}/stats",
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}/stats"
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}/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/ab-tests/{abTestId}/stats")
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,
"abTestId": "ab_abc123",
"period": "30d",
"stats": {
"sent": 200,
"delivered": 198,
"opened": 92,
"clicked": 18,
"openRate": 46.46,
"clickRate": 9.09
},
"variants": [
{
"id": "var_a",
"label": "A",
"subject": "Welcome",
"isWinner": false,
"stats": {
"sent": 100,
"delivered": 99,
"opened": 42,
"clicked": 7,
"openRate": 42.42,
"clickRate": 7.07
}
}
]
}
{
"success": false,
"error": "Invalid period. Must be one of: 1h, 24h, 7d, 30d, 90d"
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "A/B test not found"
}
Get aggregate A/B test stats and per-variant stats for the authenticated company. Open and click metrics exclude detected email-security scanners and tracked brand assets by default.
Request
string
required
A/B test ID.
string
Optional period:
1h, 24h, 7d, 30d, or 90d.string
Custom range start as ISO 8601. Requires
end.string
Custom range end as ISO 8601. Requires
start.boolean
default:"false"
Set to
true to include detected scanner, preview, and tracked asset
open/click events in A/B test metrics.curl "https://api.sequenzy.com/api/v1/ab-tests/ab_abc123/stats?period=30d" \
-H "Authorization: Bearer YOUR_API_KEY"
Responses
{
"success": true,
"abTestId": "ab_abc123",
"period": "30d",
"stats": {
"sent": 200,
"delivered": 198,
"opened": 92,
"clicked": 18,
"openRate": 46.46,
"clickRate": 9.09
},
"variants": [
{
"id": "var_a",
"label": "A",
"subject": "Welcome",
"isWinner": false,
"stats": {
"sent": 100,
"delivered": 99,
"opened": 42,
"clicked": 7,
"openRate": 42.42,
"clickRate": 7.07
}
}
]
}
{
"success": false,
"error": "Invalid period. Must be one of: 1h, 24h, 7d, 30d, 90d"
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "A/B test not found"
}
⌘I
Get A/B Test Stats
curl --request GET \
--url https://api.sequenzy.com/api/v1/ab-tests/{abTestId}/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/ab-tests/{abTestId}/stats"
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}/stats', 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}/stats",
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}/stats"
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}/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/ab-tests/{abTestId}/stats")
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,
"abTestId": "ab_abc123",
"period": "30d",
"stats": {
"sent": 200,
"delivered": 198,
"opened": 92,
"clicked": 18,
"openRate": 46.46,
"clickRate": 9.09
},
"variants": [
{
"id": "var_a",
"label": "A",
"subject": "Welcome",
"isWinner": false,
"stats": {
"sent": 100,
"delivered": 99,
"opened": 42,
"clicked": 7,
"openRate": 42.42,
"clickRate": 7.07
}
}
]
}
{
"success": false,
"error": "Invalid period. Must be one of: 1h, 24h, 7d, 30d, 90d"
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "A/B test not found"
}