Skip to Content

Enable a custom tracking domain

Enable a custom tracking domain. Request: POST /v1/email/domains/{id}/custom-tracking. Scope: domains:update.

POST
/v1/email/domains/{id}/custom-tracking

Provisions a custom tracking domain for a verified sending domain so open/click links redirect through the customer's own host, <label>.<parentDomain> (default track.<sending domain>). parentDomain may be a parent of the sending domain, so send.example.com can use track.example.com. Calling it again with a different label or parent moves the host. Requires a plan that includes custom tracking domains. Returns the resulting state including the two DNS records the customer must create; a hostname another domain already uses is a conflict.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^dom_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
label?|null
parentDomain?|null

Response Body

CustomTrackingStatus

application/json
  1. response
enabled*boolean
customTracking*|null
parentDomains*array<string>
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.email.enableCustomTracking({
  "id": "example"
});
Example Response
{
  "enabled": true,
  "customTracking": {
    "status": "pending",
    "label": "string",
    "hostname": "string",
    "parentDomain": "string",
    "region": "string",
    "sslStatus": "string",
    "certificate": {
      "reason": {
        "code": "initializing",
        "message": "string"
      },
      "lastCheckedAt": "string",
      "nextCheckAt": "string"
    },
    "dnsRecords": {
      "tracking": {
        "name": "string",
        "type": "string",
        "value": "string"
      },
      "dcvDelegation": {
        "name": "string",
        "type": "string",
        "value": "string"
      }
    },
    "caaBlocked": true,
    "verificationErrors": [
      "string"
    ],
    "teardownScheduledAt": "string"
  },
  "parentDomains": [
    "string"
  ]
}

Related documentation