> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Domain

> Update settings, tracking configuration, or TLS preferences for a sending domain.

Configure tracking subdomains, open tracking, click tracking, and TLS enforcement for a domain.

### Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the domain.
</ParamField>

### Body Parameters

<ParamField body="click_tracking" type="boolean">
  Enable or disable automatic link click tracking.
</ParamField>

<ParamField body="open_tracking" type="boolean">
  Enable or disable open tracking pixel insertion.
</ParamField>

<ParamField body="tls_mode" type="string">
  Enforcement mode: `opportunistic` or `enforced`.
</ParamField>

<ParamField body="tracking_subdomain" type="string">
  Custom branded tracking subdomain prefix (e.g. `links` for `links.yourdomain.com`).
</ParamField>

### Response

<ResponseField name="data" type="object">
  <ResponseField name="id" type="string">The domain ID.</ResponseField>
  <ResponseField name="domain" type="string">Domain name.</ResponseField>
  <ResponseField name="click_tracking" type="boolean">Click tracking state.</ResponseField>
  <ResponseField name="open_tracking" type="boolean">Open tracking state.</ResponseField>
  <ResponseField name="tls_mode" type="string">TLS mode.</ResponseField>
  <ResponseField name="tracking_subdomain" type="string">Tracking subdomain prefix.</ResponseField>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.mailofly.com/api/v1/domains/dom_123 \
    -H "Authorization: Bearer mf_live_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "click_tracking": true,
      "open_tracking": true,
      "tls_mode": "enforced",
      "tracking_subdomain": "track"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": "dom_123",
      "domain": "example.com",
      "click_tracking": true,
      "open_tracking": true,
      "tls_mode": "enforced",
      "tracking_subdomain": "track"
    }
  }
  ```
</ResponseExample>


## Related topics

- [Custom Domains](/receiving/custom-domains.md)
- [Manage Domains](/domains/managing-domains.md)
- [Add domain](/getting-started/add-domain.md)
- [Subdomain vs Root Domain](/guides/deliverability/subdomain-vs-root-domain.md)
- [mailofly.dev Domain Error](/guides/domains/mailofly-dev-domain-error.md)
