---
title: "Declare the tracking domain"
method: POST
path: "/api/v1/tracking-domain"
tags: ["Workspace"]
---

# Declare the tracking domain

`POST /api/v1/tracking-domain`

## Request

- Base URL: `https://mailcheer.com`
- URL: `https://mailcheer.com/api/v1/tracking-domain`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`

`{ "hostname": "click.your-domain.com" }`, or `{}` for the name suggested from a verified sending domain. Then add the CNAME to `clients.clickmailcheer.com` (DNS only): the domain becomes active as soon as a real HTTPS request comes back through it. Requires `emails:send`.

## Request body

- object
  - `hostname` string

## Response `201`

Declared.

- object
  - `object` 'tracking_domain'
  - `hostname` string, nullable
  - `status` string, nullable: pending_dns, verifying, issuing_certificate, active or failed.
  - `active` boolean
  - `reason` string, nullable
  - `detail` string, nullable
  - `dns_records` object[]
    - `type` string
    - `name` string
    - `value` string
    - `required` boolean
  - `links_origin` string, nullable: The address that links and the pixel of new emails carry today.
  - `created_at` string, date-time, nullable
  - `activated_at` string, date-time, nullable
  - `last_checked_at` string, date-time, nullable

## Other responses

- `409`: The workspace already has a tracking domain, or the name is taken.
- `422`: Name refused.

---

[API](https://skmtc.dev/mailcheer/apis/mailcheer-api.md) · [All operations](https://skmtc.dev/mailcheer/apis/mailcheer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailcheer/apis/mailcheer-api/revisions/ba64b7ef2170?raw)
