Skip to main content
POST
/
domains
/
:domain_id
/
tracking-domains
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.domains.trackingDomains.create(
  'd91cd9bd-1176-453e-8fc1-35364d380206',
  {
    subdomain: 'links',
  },
);
{
  "object": "tracking_domain",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "track",
  "full_name": "links.example.com",
  "status": "not_started",
  "created_at": "2026-03-10T12:00:00.000Z",
  "records": [
    {
      "record": "Tracking",
      "type": "CNAME",
      "name": "links.example.com",
      "value": "<proxy-target>",
      "ttl": "Auto",
      "status": "not_started"
    }
  ]
}
Custom tracking domains are currently in private alpha and only available to a limited number of users. APIs might change before GA.To use the methods on this page, you must upgrade your Resend SDK:
npm install resend@6.10.0-preview-tracking-domains.0
Contact us if you’re interested in testing this feature.
Add the CNAME record from the response to your DNS provider. Once configured, call Verify Tracking Domain to trigger DNS verification.

Path Parameters

Body Parameters

subdomain
string
required
The subdomain to use for click tracking (e.g. links results in links.example.com for the verified domain example.com).
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.domains.trackingDomains.create(
  'd91cd9bd-1176-453e-8fc1-35364d380206',
  {
    subdomain: 'links',
  },
);
{
  "object": "tracking_domain",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "track",
  "full_name": "links.example.com",
  "status": "not_started",
  "created_at": "2026-03-10T12:00:00.000Z",
  "records": [
    {
      "record": "Tracking",
      "type": "CNAME",
      "name": "links.example.com",
      "value": "<proxy-target>",
      "ttl": "Auto",
      "status": "not_started"
    }
  ]
}