PATCH /domains/{id}
Turn click or open tracking on, or change the tracking subdomain. Name, region and return-path cannot change.
Parameters
idpath · string · requiredIdempotency-Keyheader · string · optional — Makes this call safe to retry. Send the same key with the same body and the original response is replayed instead of the work happening twice. Keys are 1-256 characters and are remembered for 7 days. While the first attempt is still running, a second call with that key returns 409 idempotency_in_flight (Resend calls this concurrent_idempotent_requests); the same key with a different body returns 409 idempotency_payload_mismatch (Resend: invalid_idempotent_request).
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
| click_tracking | boolean | no | |
| open_tracking | boolean | no | |
| tracking_subdomain | string | null | no |
Responses
200— Success400— Validation error401— Missing API key403— Forbidden404— Not found409— Conflict429— Rate limited500— Internal server error
Response headers
ratelimit-limit— Messages this API key may spend in one 60-second window.ratelimit-remaining— Messages left in the current window.ratelimit-reset— Seconds until the current window resets and the budget refills.
200 body
| Field | Type | Required | Notes |
|---|---|---|---|
| click_tracking | boolean | yes | |
| created_at | string | yes | |
| dkim_selector | string | yes | |
| id | string | yes | |
| name | string | yes | |
| open_tracking | boolean | yes | |
| records | array<object> | yes | |
| records[].checked_at | string | null | yes | |
| records[].fix | string | yes | |
| records[].name | string | yes | |
| records[].name_relative | string | yes | |
| records[].priority | integer | null | yes | |
| records[].record | "SPF" | "DKIM" | "DMARC" | "RETURN_PATH" | "TRACKING" | "RECEIVING" | … | yes | |
| records[].status | "pending" | "verified" | "failed" | "recommended" | yes | |
| records[].ttl | integer | yes | |
| records[].type | "TXT" | "MX" | "CNAME" | "CAA" | yes | |
| records[].value | string | yes | |
| region | "us" | "eu" | yes | |
| status | "pending" | "verified" | "failed" | "partially_verified" | "partially_failed" | yes | |
| tracking_issues | array<object> | yes | |
| tracking_issues[].fix | string | yes | |
| tracking_issues[].message | string | yes | |
| tracking_issues[].record | "TRACKING" | "TRACKING_CAA" | yes | |
| tracking_subdomain | string | yes | |
| verified_at | string | null | yes |
Errors
Codes in the catalogue that answer with one of this operation’s error statuses. Every one of them carries a fix.
- validation_error 400
- invalid_idempotency_key 400
- invalid_cursor 400
- domain_already_exists 409
- domain_verified_elsewhere 409
- domain_not_verified 403
- account_suspended 403
- account_sandboxed 403
- trust_throttled 429
- missing_api_key 401
- session_required 401
- human_action_required 403
- csrf_origin_rejected 403
- mfa_required 401
- plan_not_purchasable 400
- trial_already_used 409
- plan_already_active 409
- term_not_on_sale 409
- subscription_active 409
- billing_customer_missing 404
- stripe_signature_invalid 400
- invalid_api_key 403
- restricted_api_key 403
- insufficient_role 403
- invite_email_mismatch 403
- already_in_account 409
- domain_scope_violation 403
- not_found 404
- session_expired 404
- idempotency_in_flight 409
- idempotency_payload_mismatch 409
- rate_ceiling_exceeded 429
- daily_quota_exceeded 429
- monthly_quota_exceeded 429
- rate_limit_exceeded 429
- approval_required 403
- trust_paused 403
- kill_switch_active 403
- internal_server_error 500
- support_ticket_not_found 404
- support_closed 409
- support_reopen_expired 409
- support_merge_conflict 409
- support_upload_rejected 400
- support_rate_limited 429