---
title: "Update a sending domain's open/click tracking or receiving"
method: PATCH
path: "/v1/email-domains/{id}"
tags: ["Email Domains"]
---

# Update a sending domain's open/click tracking or receiving

`PATCH /v1/email-domains/{id}`

## Request

- Base URL: `https://api.honkio.ca`
- URL: `https://api.honkio.ca/v1/email-domains/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Requires `email_domains:m`.

## Path parameters

- `id` string, required

## Request body

- object: The settings to change: at least one of open_tracking, click_tracking or receiving.
  - `open_tracking` boolean, nullable: Track opens on this domain's email. Null restores the platform default.
  - `click_tracking` boolean, nullable: Track clicks on this domain's email. Null restores the platform default.
  - `receiving` boolean: Receive email at this domain. The domain must be verified for sending first; the response adds the inbound MX record to publish.

## Response `200`

The updated domain, with the DNS records to publish (the inbound MX while receiving is on).

- object: The updated domain, with the DNS records to publish (the inbound MX while receiving is on).
  - `id` string, required
  - `domain` string, required
  - `status` 'pending' | 'verifying' | 'verified' | 'failed' | 'temporarily_failed', required
  - `region` string, required
  - `verified_at` string, date-time, nullable, required
  - `last_checked_at` string, date-time, nullable, required
  - `failure_reason` string, nullable, required
  - `revalidation_failed_at` string, date-time, nullable, required
  - `open_tracking` boolean, nullable, required
  - `click_tracking` boolean, nullable, required
  - `receiving_status` 'off' | 'pending' | 'verified' | 'failed', required
  - `receiving_requested_at` string, date-time, nullable, required
  - `receiving_verified_at` string, date-time, nullable, required
  - `receiving_failure_reason` string, nullable, required
  - `receiving_revalidation_failed_at` string, date-time, nullable, required
  - `receiving_last_checked_at` string, date-time, nullable, required: When the inbound MX was last checked on its own; last_checked_at dates the sending check.
  - `receiving_warning` 'apex_mx' | 'null', nullable, required: apex_mx while receiving is on at a likely registrable apex: an MX there takes over the domain's own mail.
  - `created_at` string, date-time, required
  - `records` object[], required
    - `type` 'TXT' | 'MX', required
    - `name` string, required
    - `value` string, required
    - `purpose` 'dkim' | 'mail_from' | 'spf' | 'dmarc_recommended' | 'inbound', required
  - `receiving_missing` object[], required: The inbound MX, when this request just turned receiving on and it is not published yet; [] otherwise. A lookup only: POST /v1/email-domains/{id}/verify moves receiving_status.
    - `record` string, required
    - `expected` string, required

## Other responses

- `401`: Missing, invalid, revoked or expired API key.
- `402`: The account has no balance, or a LIVE key was used before the first top-up.
- `403`: ACCOUNT_NOT_VERIFIED: turning receiving on for a live domain needs a verified owner mobile number. Turning receiving off, and every other field, is unaffected. Also FORBIDDEN when the key lacks the permission this operation requires, or the account is suspended or closed.
- `404`: NOT_FOUND: no such domain on this account. A test key finds test-mode domains only, so a live domain answers it the same way; a live key finds both.
- `409`: RECEIVING_REQUIRES_VERIFIED_DOMAIN: receiving can only be turned on for a domain verified for sending.
- `422`: VALIDATION_ERROR: the request failed validation; details names the fields.
- `429`: Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).
- `500`: Unexpected server error.

---

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