List redirects
/api/v1/domains/{id}/redirectsOperates on your account only. Send your API key in the Authorization header. Responses use JSON.
Request
Set BASE_URL to this website’s HTTPS origin and API_KEY to your private key. Replace RESOURCE_ID with the ID returned by the API.
curl --request GET "${BASE_URL}/api/v1/domains/RESOURCE_ID/redirects" \
--header "Authorization: Bearer $API_KEY"Headers & parameters
AuthorizationrequiredBearer YOUR_API_KEY
idpath · stringrequiredNumeric domain ID; UUID for an order, operation or request.
Response
request_idstringrequiredIdentifier used to recover an outcome after a network failure.
itemsarrayrequireditems[].idintegeritems[].slugstringRedirect identifier used to create or update it.
items[].targetstringDestination HTTP(S) URL.
items[].enabledbooleanEnable or disable the selected feature.
items[].status_codeintegerHTTP status: 301/308 permanent, 302/307 temporary. 307/308 preserve the HTTP method.
items[].preserve_querybooleanPreserve query parameters in the destination URL.
items[].source_patternstringSource URL pattern for the redirect.
Response structure example · illustrative values
{
"request_id": "00000000-0000-4000-8000-000000000001",
"items": [
{
"id": 1,
"slug": "string",
"target": "string",
"enabled": false,
"status_code": 1,
"preserve_query": false,
"source_pattern": "string"
}
]
}Errors & statuses
error.code · error.message · request_id
401Invalid or revoked key.
404Resource not found in your account.
409Idempotency conflict or request in progress.
422Invalid parameters or business rule, including balance.
500Outcome may be uncertain. Poll the request.
503Temporarily unavailable. Respect Retry-After.