post
https://{yourinstance}.makaira.io/redirects
Create a new redirect
Creates a new redirect rule.
Requires authentication.
Request
POST /redirects
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
source | string | Yes | Source path to redirect from. Must start with /. |
target | string | Yes | Target path to redirect to. Must start with /. |
code | integer | Yes | HTTP redirect status code (e.g. 301 for permanent, 302 for temporary). |
priority | integer | No | Priority used when multiple redirects match. Higher values take precedence. |
Example Request
{
"source": "/old-page",
"target": "/new-page",
"code": 301,
"priority": 0
}Response
Returns the created redirect object.
Example Response
{
"id": 42,
"source": "/old-page",
"target": "/new-page",
"code": 301,
"priority": 0
} 200OK

