← Home
PATCH/hyax-api/v1/redirects/:id

Update redirect

Change where a redirect leads, its type, or both. A new `to` is checked the same way as a new redirect. Send `statusCode: 301` to make a checked temporary redirect permanent.

Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.

Request body

FieldRequiredDescription
toNoNew destination path or `https://` URL
statusCodeNo`301` | `302` | `307` | `308`

Request

curl -X PATCH 'https://platform.hyax.com/hyax-api/v1/redirects/clx_example_id' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "statusCode": 301
  }'

Response

{
  "success": true,
  "data": { "id": "clx…", "from": "/2019/05/old-post", "to": "/article/new-post", "statusCode": 301 }
}