put
https://{yourinstance}.makaira.io/redirects/
Update a redirect by ID
Updates an existing redirect rule.
Requires authentication.
Request
PUT /redirects/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The ID of the redirect rule to update. |
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
source | string | No | Source path to redirect from. Must start with /. |
target | string | No | Target path to redirect to. Must start with /. |
code | integer | No | HTTP redirect status code (e.g. 301, 302). |
priority | integer | No | Priority used when multiple redirects match. |
Example Request
{
"target": "/updated-page",
"code": 302
}Response
Returns the updated redirect object.
Example Response
{
"id": 42,
"source": "/old-page",
"target": "/updated-page",
"code": 302,
"priority": 0
} 200OK

