Websites
Configure Domain Tracking
Deprecated: set the company tracking domain from a sending domain
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 subdomain already holds the domain's bounce records. Choose another tracking subdomain."
}
{
"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."
}
Deprecated. Tracking is company-wide: every sending domain uses one tracking
domain. Use Set Tracking Domain instead, which can
also change it.
<trackingPrefix>.<domain>, such as links.mail.example.com, as your company
tracking domain when your company has none. Publish the returned
website.tracking.cnameRecord. Sending never waits for it: links use Sequenzy’s
shared tracking domain until it verifies.
Sending your company’s current tracking hostname again changes nothing. When
your company already uses another tracking domain, the request still succeeds
but changes nothing, and message explains why; it never replaces your company
tracking domain. A hostname connected to another company returns 409. 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. A tracking provider or other 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 subdomain already holds the domain's bounce records. Choose another tracking subdomain."
}
{
"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 subdomain already holds the domain's bounce records. Choose another tracking subdomain."
}
{
"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."
}