Skip to content

Update domain aliases or proxy origin settings

PATCH
/api/v1/domains/{id}
curl --request PATCH \
--url https://app.routeseam.com/api/v1/domains/1 \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <X-Api-Key>' \
--data '{ "include_www": true, "origin": "https://example.com", "preserve_host": true }'

Turning include_www on is rejected with 422 when it would complete a redirect loop — www.<hostname> starts resolving to this domain, which may be where another domain already points. The error message names no domain, because the one that would loop is not necessarily yours.

id
required
integer
Media typeapplication/json
object
include_www
boolean
origin

Proxy domains only

string format: uri
preserve_host

Proxy domains only

boolean
Examplegenerated
{
"include_www": true,
"origin": "https://example.com",
"preserve_host": true
}

OK

Media typeapplication/json
object
domain
required
object
id
required
integer
hostname
required
string
status
required
string
Allowed values: pending_dns dns_verified tls_provisioning active dns_failed tls_failed suspended disabled
include_www
required
boolean
mode

Present for private-beta proxy domains

string
Allowed values: proxy
origin

Present for proxy domains

string format: uri
preserve_host
boolean
beta_enabled
boolean
ownership_verified_at
string | null format: date-time
dns_records

Proxy A and unique TXT records; keep both after activation.

Array<object>
object
type
string
Allowed values: A TXT
name
string
value
string
dns_verified_at
required
string | null format: date-time
tls_status
required

E.g. issued / failed

string | null
created_at
required
string format: date-time
dns

Present while status is not active — the record to add

object
type
string
Allowed value: A
name
string
Allowed value: @
value

ROUTESEAM_IP

string
Example
{
"domain": {
"status": "pending_dns",
"mode": "proxy",
"dns_records": [
{
"type": "A"
}
],
"dns": {
"type": "A",
"name": "@"
}
}
}

Missing or invalid API key

Media typeapplication/json

The ONLY error envelope — produced by Api::V1::BaseController#render_error_response

object
error
required
string
errors
Array<string>
validation_errors
object
key
additional properties
Array<string>
Example
{
"error": "Invalid API key",
"errors": [],
"validation_errors": {}
}

Not found (cross-tenant ids are indistinguishable from missing ones)

Media typeapplication/json

The ONLY error envelope — produced by Api::V1::BaseController#render_error_response

object
error
required
string
errors
Array<string>
validation_errors
object
key
additional properties
Array<string>
Example
{
"error": "Not found",
"errors": [],
"validation_errors": {}
}

Validation failed (validation_errors keyed by attribute)

Media typeapplication/json

The ONLY error envelope — produced by Api::V1::BaseController#render_error_response

object
error
required
string
errors
Array<string>
validation_errors
object
key
additional properties
Array<string>
Examplegenerated
{
"error": "example",
"errors": [
"example"
],
"validation_errors": {
"additionalProperty": [
"example"
]
}
}

Over 300 requests/minute for this key

Media typeapplication/json

The ONLY error envelope — produced by Api::V1::BaseController#render_error_response

object
error
required
string
errors
Array<string>
validation_errors
object
key
additional properties
Array<string>
Example
{
"error": "Rate limit exceeded",
"errors": [],
"validation_errors": {}
}