> ## Documentation Index
> Fetch the complete documentation index at: /docs/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 via the Mailofly API.

### Path Parameters

**id** `string` *required*

The unique identifier of the domain.

### Body Parameters

**click\_tracking** `boolean`

Enable or disable automatic link click tracking.

**open\_tracking** `boolean`

Enable or disable open tracking pixel insertion.

**tls\_mode** `string`

Enforcement mode: `opportunistic` or `enforced`.

**tracking\_subdomain** `string`

Custom branded tracking subdomain prefix (e.g. `links` for `links.yourdomain.com`).

### Response

**data** `object`

**id** `string`

The domain ID.

**domain** `string`

Domain name.

**click\_tracking** `boolean`

Click tracking state.

**open\_tracking** `boolean`

Open tracking state.

**tls\_mode** `string`

TLS mode.

**tracking\_subdomain** `string`

Tracking subdomain prefix.

```bash cURL theme={null}
curl -X PATCH https://api.mailofly.com/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"
  }'
```

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.