Add a redirect domain or private-beta proxy domain
const url = 'https://app.routeseam.com/api/v1/domains';const options = { method: 'POST', headers: {'X-Api-Key': '<X-Api-Key>', 'Content-Type': 'application/json'}, body: '{"hostname":"old.com","destination":"https://new.com","status_code":308,"preserve_path":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.routeseam.com/api/v1/domains \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <X-Api-Key>' \ --data '{ "hostname": "old.com", "destination": "https://new.com", "status_code": 308, "preserve_path": true }'Redirect mode requires destination. Proxy mode requires an allowlisted organization and origin, and defaults include_www to false. Register www separately. Proxy activation requires the returned unique TXT ownership proof and A record; mode cannot be changed after creation.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Destination URL; normalized server-side.
Defaults true for redirects; false required for proxy beta.
Proxy only. Public HTTPS DNS origin, port 443, no path/query/credentials.
object
Destination URL; normalized server-side.
Defaults true for redirects; false required for proxy beta.
Proxy only. Public HTTPS DNS origin, port 443, no path/query/credentials.
Example
{ "hostname": "old.com", "destination": "https://new.com", "status_code": 308, "preserve_path": true}Responses
Section titled “Responses”Created — dns instructions included until active
object
object
Present for private-beta proxy domains
Present for proxy domains
Proxy A and unique TXT records; keep both after activation.
object
E.g. issued / failed
Present while status is not active — the record to add
object
ROUTESEAM_IP
Example
{ "domain": { "status": "pending_dns", "mode": "proxy", "dns_records": [ { "type": "A" } ], "dns": { "type": "A", "name": "@" } }}Missing or invalid API key
The ONLY error envelope — produced by Api::V1::BaseController#render_error_response
object
object
Example
{ "error": "Invalid API key", "errors": [], "validation_errors": {}}API access has not been enabled; org suspended; or owner email unverified
The ONLY error envelope — produced by Api::V1::BaseController#render_error_response
object
object
Examplegenerated
{ "error": "example", "errors": [ "example" ], "validation_errors": { "additionalProperty": [ "example" ] }}Hostname already taken (by any organization)
The ONLY error envelope — produced by Api::V1::BaseController#render_error_response
object
object
Example
{ "error": "Hostname is already taken", "errors": [], "validation_errors": {}}Validation failed (validation_errors keyed by attribute)
The ONLY error envelope — produced by Api::V1::BaseController#render_error_response
object
object
Examplegenerated
{ "error": "example", "errors": [ "example" ], "validation_errors": { "additionalProperty": [ "example" ] }}Over 300 requests/minute for this key
The ONLY error envelope — produced by Api::V1::BaseController#render_error_response
object
object
Example
{ "error": "Rate limit exceeded", "errors": [], "validation_errors": {}}