# PATCH /domains/{domain_id} (Resend API)
Base URL: https://api.resend.com
Auth: Authorization: Bearer <RESEND_API_KEY>
Last verified: 2026-09-03

> Update an existing domain

## Critical Gotchas
* All requests must include a `User-Agent` header (e.g. `User-Agent: my-app/1.0`) or the API returns HTTP 403.
* The `to` field is an array of strings, even when sending to a single recipient.

## cURL
curl -X PATCH 'https://api.resend.com/domains/domain-id' \
  -H "Authorization: Bearer $RESEND_API_KEY" \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{"open_tracking":true,"click_tracking":true}'

## Parameters
| Name | In | Type | Required | Description |
| :--- | :--- | :--- | :--- | :--- |
| domain_id | path | string | Yes | The ID of the domain. |
| open_tracking | body | boolean | No | Track the open rate of each email. |
| click_tracking | body | boolean | No | Track clicks within the body of each HTML email. |
| tls | body | string | No | enforced \| opportunistic. |

## Response (200 OK)
{"id":"d91cd9bd-1176-453e-8fc1-35364d380206","object":"domain"}

---
Need an API key? Get one at https://resend.com/signup