Update the redirect (republishes edge config)
const url = 'https://app.routeseam.com/api/v1/domains/1/route';const options = { method: 'PATCH', headers: {'X-Api-Key': '<X-Api-Key>', 'Content-Type': 'application/json'}, body: '{"destination_url":"https://example.com","status_code":301,"preserve_path":true,"preserve_query":true,"enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://app.routeseam.com/api/v1/domains/1/route \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <X-Api-Key>' \ --data '{ "destination_url": "https://example.com", "status_code": 301, "preserve_path": true, "preserve_query": true, "enabled": true }'destination_url is rejected with 422 when following it through
RouteSeam domains returns to this domain within ten hops — self-loops,
two-hop loops, longer chains, and www. forms of a domain that has
include_www set. A non-standard port is not a loop, since the edge
serves only 80 and 443. The check reads how domains are configured, not
what is live, so a pending or disabled route still counts. The error
message names only your own hostname.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”OK
object
object
Example
{ "route": { "status_code": 301 }}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": {}}Not found (cross-tenant ids are indistinguishable from missing ones)
The ONLY error envelope — produced by Api::V1::BaseController#render_error_response
object
object
Example
{ "error": "Not found", "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": {}}