Websites
Configure Domain Tracking
Give an older sending domain its own tracking subdomain
PATCH
/
api
/
v1
/
websites
/
{domain}
Configure Domain Tracking
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/websites/{domain} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trackingPrefix": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/websites/{domain}"
payload = { "trackingPrefix": "<string>" }
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({trackingPrefix: '<string>'})
};
fetch('https://api.sequenzy.com/api/v1/websites/{domain}', 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/websites/{domain}",
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([
'trackingPrefix' => '<string>'
]),
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/websites/{domain}"
payload := strings.NewReader("{\n \"trackingPrefix\": \"<string>\"\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/websites/{domain}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"trackingPrefix\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/websites/{domain}")
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 \"trackingPrefix\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"website": {
"id": "domain_abc123",
"domain": "mail.example.com",
"status": "verified",
"dnsVerified": true,
"readyToSend": true,
"tracking": {
"policy": "legacy",
"required": false,
"hostname": "links.mail.example.com",
"status": "pending",
"ready": false,
"error": null,
"cnameRecord": {
"type": "CNAME",
"name": "links.mail.example.com",
"value": "links1.sequenzydns.com"
}
}
}
}
{
"success": false,
"error": "This domain already uses links.mail.example.com for tracking, and it cannot be changed."
}
{
"success": false,
"code": "SENDING_DOMAIN_NOT_CONFIGURED",
"error": "Sending domain not configured",
"title": "Sending domain not configured",
"docsUrl": "https://docs.sequenzy.com/api-reference/websites/create",
"details": { "domain": "mail.example.com" }
}
{
"success": false,
"error": "The tracking hostname links.mail.example.com is already in use. Choose another tracking subdomain."
}
Move tracked links and opens for a domain added before per-domain tracking
(
An invalid label returns 400. A missing or non-string
website.tracking.policy is legacy) to a subdomain of that domain, such as
links.mail.example.com. Publish the returned website.tracking.cnameRecord.
Links keep using their current tracking domain until the new subdomain
verifies, and sending is never paused while it does.
Once the subdomain verifies, the domain switches to per-domain tracking like
newly added domains: tracking.policy becomes required, and links no longer
fall back to the company tracking domain. A tracking subdomain cannot be changed
once set. Sending the same value again changes nothing; a different value
returns 400.
Domains with tracking.policy: "required" chose their tracking subdomain when
they were added, so any other value returns 400. This endpoint requires the
websites:write scope.
Request
string
required
Configured sending domain.
string
required
Tracking subdomain label, for example
links. Use one DNS label of 1 to 63
letters, numbers or hyphens, without a leading or trailing hyphen. It cannot
be inbound or the label that holds the domain’s bounce records.trackingPrefix returns 422. An unexpected server error returns 500; retrying with the same value is
safe.
curl -X PATCH "https://api.sequenzy.com/api/v1/websites/mail.example.com" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"trackingPrefix": "links"}'
Responses
{
"success": true,
"website": {
"id": "domain_abc123",
"domain": "mail.example.com",
"status": "verified",
"dnsVerified": true,
"readyToSend": true,
"tracking": {
"policy": "legacy",
"required": false,
"hostname": "links.mail.example.com",
"status": "pending",
"ready": false,
"error": null,
"cnameRecord": {
"type": "CNAME",
"name": "links.mail.example.com",
"value": "links1.sequenzydns.com"
}
}
}
}
{
"success": false,
"error": "This domain already uses links.mail.example.com for tracking, and it cannot be changed."
}
{
"success": false,
"code": "SENDING_DOMAIN_NOT_CONFIGURED",
"error": "Sending domain not configured",
"title": "Sending domain not configured",
"docsUrl": "https://docs.sequenzy.com/api-reference/websites/create",
"details": { "domain": "mail.example.com" }
}
{
"success": false,
"error": "The tracking hostname links.mail.example.com is already in use. Choose another tracking subdomain."
}
⌘I
Configure Domain Tracking
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/websites/{domain} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trackingPrefix": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/websites/{domain}"
payload = { "trackingPrefix": "<string>" }
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({trackingPrefix: '<string>'})
};
fetch('https://api.sequenzy.com/api/v1/websites/{domain}', 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/websites/{domain}",
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([
'trackingPrefix' => '<string>'
]),
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/websites/{domain}"
payload := strings.NewReader("{\n \"trackingPrefix\": \"<string>\"\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/websites/{domain}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"trackingPrefix\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/websites/{domain}")
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 \"trackingPrefix\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"website": {
"id": "domain_abc123",
"domain": "mail.example.com",
"status": "verified",
"dnsVerified": true,
"readyToSend": true,
"tracking": {
"policy": "legacy",
"required": false,
"hostname": "links.mail.example.com",
"status": "pending",
"ready": false,
"error": null,
"cnameRecord": {
"type": "CNAME",
"name": "links.mail.example.com",
"value": "links1.sequenzydns.com"
}
}
}
}
{
"success": false,
"error": "This domain already uses links.mail.example.com for tracking, and it cannot be changed."
}
{
"success": false,
"code": "SENDING_DOMAIN_NOT_CONFIGURED",
"error": "Sending domain not configured",
"title": "Sending domain not configured",
"docsUrl": "https://docs.sequenzy.com/api-reference/websites/create",
"details": { "domain": "mail.example.com" }
}
{
"success": false,
"error": "The tracking hostname links.mail.example.com is already in use. Choose another tracking subdomain."
}