Skip to main content
PATCH
/
custom-tracking-domains
/
{hostname}
/
{scope}
Update Custom Tracking Domain
const options = {
  method: 'PATCH',
  headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({name: '<string>'})
};

fetch('https://api.mailchannels.net/tx/v1/custom-tracking-domains/{hostname}/{scope}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "created_at": "2023-11-07T05:31:56Z",
  "hostname": "<string>",
  "name": "<string>"
}

Headers

X-Api-Key
string
required

Path Parameters

hostname
string
required
scope
enum<string>
required
Available options:
click,
open,
unsubscribe

Body

application/json
name
string

New label for this custom tracking domain

Maximum string length: 64
Pattern: ^[a-z0-9-]+$
status
enum<string>

New status; active ↔ disabled

Available options:
active,
disabled

Response

Custom tracking domain updated

created_at
string<date-time>
required

ISO 8601 timestamp when the domain was registered

hostname
string
required

The registered domain hostname

name
string
required

The label for this custom tracking domain

scope
enum<string>
required

The event type this domain handles

Available options:
click,
open,
unsubscribe
status
enum<string>
required

Current status of the custom tracking domain

Available options:
active,
disabled