Create redirects in bulk

Create redirects in bulk

Creates multiple redirect rules in a single request.

Requires authentication.

Request

POST /redirects/bulk

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

An array of redirect objects:

FieldTypeRequiredDescription
sourcestringYesSource path to redirect from. Must start with /.
targetstringYesTarget path to redirect to. Must start with /.
codeintegerYesHTTP redirect status code (e.g. 301, 302).
priorityintegerNoPriority for this redirect.

Example Request

[
  {
    "source": "/old-page-1",
    "target": "/new-page-1",
    "code": 301
  },
  {
    "source": "/old-page-2",
    "target": "/new-page-2",
    "code": 301
  }
]

Response

Response Body

FieldTypeDescription
Successbooleantrue if all redirects were created successfully.
ErrorarrayList of errors, if any.

Example Response

{
  "Success": true,
  "Error": []
}
Body Params
file
required

The CSV file to upload. Expected CSV format: source, target, code, priority /old-path, /new-path, 301, 1 ...

Headers
string
required

Makaira Instance ID

Response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json