Change a domain's settings

Turn click tracking and open tracking on or off for one domain, and set its TLS, as the domain's Configuration tab does.

On this page
PATCHhttps://app.usenotix.dev/api/v1/domains/{id}

Needs a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.

Turn click tracking and open tracking on or off for one domain, and set its TLS, as the domain's Configuration tab does. Give clickTracking, openTracking (true or false), tlsPolicy or any of them; a setting left out is unchanged, and an empty body answers 400.

tlsPolicy is OPPORTUNISTIC (TLS when the receiving server offers it) or ENFORCED (only over TLS). With ENFORCED, mail to a server without TLS bounces, and those bounces count toward the domain's bounce pause. Changing tlsPolicy needs a key made by a team admin today, as the setting is for admins on the dashboard; a member's key answers 403. If Notix cannot get ENFORCED ready the answer is 503 and nothing is saved; try again. customReturnPath answers 400: it is set when the domain is added (POST /v1/domains) and never changes. Click tracking sends each link through Notix to count clicks; open tracking adds a tracking pixel to count opens, which can lower delivery. The change applies to mail sent from now on, and a domain.updated webhook event is sent. Settings already as asked are answered as they are, with nothing written and no event. Nothing else about the domain can be changed here: not its sending state, region or DNS records.

Who can call it

Full access keys. A key limited to one domain may change that domain only; any other id answers 404. Read only, send-only and live AI keys answer 403 SCOPE_DENIED. Every team member can change tracking on the dashboard, so a key made by any member may change it; tlsPolicy needs a key made by a team admin today. Notix's own domains answer 403. Every change is recorded in the key's audit log (GET /v1/audit-log) with the domain's id and the settings given.

The team can change domain settings 30 times a minute through the API; past that the answer is 429 with Retry-After. Calls with a malformed body or id count too. When Notix cannot count the calls the answer is 503 SERVICE_UNAVAILABLE (try again shortly), never a 429.

Path parameters

idintegerrequired

Minimum 0. Maximum 2147483647.

Body parameters

clickTrackingboolean

Track the links in this domain's emails: each link is sent through Notix to count clicks.

openTrackingboolean

Add a tracking pixel to every email from this domain to count opens. It can lower delivery, and some mailbox providers open mail on their own.

tlsPolicystring

TLS for mail this domain sends. OPPORTUNISTIC uses TLS when the receiving server offers it. ENFORCED sends only over TLS: mail to a server without TLS bounces, and those bounces count toward the domain's bounce pause. Needs a key made by a team admin.

One of OPPORTUNISTIC, ENFORCED.

customReturnPathany

Not changeable: the custom return-path is set when the domain is added (POST /v1/domains). Any value answers 400.

Can be null.

trackingSubdomainstring

Use your own tracking domain: one label such as links, so tracked links and the open pixel use https://links.<domain>. Add the CNAME in the answer's trackingDomain.record. A different label replaces it; null removes it, and links in mail already sent through it stop working. Can be changed 5 times a day. Needs a key made by a team admin.

At most 63 characters. Can be null.

Headers

Authorizationstringrequired

Bearer followed by your API key.

Errors

400

No setting given, a field the route does not know, a value that is not allowed, `customReturnPath` (set when the domain is added, never changed), a `trackingSubdomain` that is not one label (or is the return-path label), custom tracking domains not available, or a body not sent as JSON.

403

`SCOPE_DENIED`: a read only, send-only or live AI key. Or a domain that belongs to Notix. Or `tlsPolicy` from a key not made by a team admin today.

404

No domain with this id for the calling team, or a key limited to one domain asked about another.

409

The tracking domain is already in use.

429

The team changed domain settings 30 times in the last minute, or the tracking subdomain was changed 5 times today.

503

Notix cannot count the team's calls just now, or TLS could not be enforced yet (nothing was saved); try again shortly.

Every error has the same shape. See all error codes.

curl -X PATCH "https://app.usenotix.dev/api/v1/domains/<id>" \
  -H "Authorization: Bearer $NOTIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "clickTracking": true,
  "openTracking": true,
  "tlsPolicy": "OPPORTUNISTIC",
  "customReturnPath": null,
  "trackingSubdomain": "links"
}'
Response200
{
  "id": 1,
  "name": "mail.example.com",
  "clickTracking": true,
  "openTracking": true,
  "tlsPolicy": "OPPORTUNISTIC",
  "customReturnPath": "string",
  "trackingDomain": {
    "label": "links",
    "hostname": "links.example.com",
    "status": "PENDING",
    "recordStatus": "NOT_FOUND",
    "record": {
      "type": "CNAME",
      "name": "links",
      "value": "track.usenotix.dev"
    },
    "message": "string"
  },
  "updatedAt": "string"
}
Open in ClaudeOpen in ChatGPT