post
https://{yourinstance}.makaira.io/redirects/debug
Test a URL against all redirects
Tests a given URL against all configured redirect rules and returns which redirect(s) would match and which one would be applied.
Requires authentication.
Request
POST /redirects/debug
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL path to test against all redirect rules. |
Example Request
{
"url": "/old-page"
}Response
Response Body
| Field | Type | Description |
|---|---|---|
count | integer | Total number of matching redirects. |
matched | object | The redirect that would be applied (highest priority match). Contains id, target, and code. |
redirects | array | All matching redirects, including their source, target, code, priority, and id. |
Example Response
{
"count": 1,
"matched": {
"id": 42,
"target": "/new-page",
"code": 301
},
"redirects": [
{
"id": 42,
"source": "/old-page",
"target": "/new-page",
"code": 301,
"priority": 0
}
]
}No Match
When no redirect matches the given URL:
{
"count": 0,
"matched": null,
"redirects": []
}
