apicheats.dev resend/llms.txt Raw .md
PATCH

/domains/{domain_id}

Resend API

Update an existing domain

Base URL
https://api.resend.com
Auth
Authorization: Bearer <RESEND_API_KEY>
Last verified
2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 234 tokens · Vary: Accept

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,  "tls": "opportunistic",  "capabilities": {    "sending": "enabled",    "receiving": "enabled"  },  "tracking_subdomain": "string"}'
Get a free Resend API key → sponsored

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.
capabilities body object No Configure the domain capabilities for sending and receiving emails. At least one capability must be enabled.
tracking_subdomain body string No The subdomain to use for click and open tracking.

Response 200 OK

{
  "id": "d91cd9bd-1176-453e-8fc1-35364d380206",
  "object": "domain"
}