Domainee Docs
Domains

Update a domain

PATCH /v1/domains/{id} — change origin, mode, or routing flags.

PATCH /v1/domains/{id}

Updates any combination of: originUrl, mode, keepHost, redirectWww, redirectStatus, metadata. Hostname is immutable — delete and re-create if you need to change it.

Request

curl -X PATCH https://api.domainee.dev/v1/domains/$DOMAIN_ID \
  -H "Authorization: Bearer $DOMAINEE_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "originUrl": "https://new-origin.fly.dev" }'

Body parameters

FieldNotes
originUrlNew origin URL. Must be https:// or http://. SSRF-checked.
mode"proxy" or "redirect".
keepHostForward original Host header (proxy mode).
redirectWwwAlso serve and 301 the www variant.
redirectStatus301 or 302 for redirect mode.
metadataReplace the metadata object wholesale.

Response — 200 OK

Returns the updated Domain object.

Cache propagation

The edge proxy caches resolver lookups for 60 seconds. Changes to originUrl / mode / keepHost propagate within that window without any extra action.

Errors

StatusCodeWhen
400bad_requestInvalid originUrl or unknown field
400preflight_failedNew originUrl resolved to a private/loopback IP
404not_foundThe id doesn't exist or doesn't belong to your workspace

On this page