Skip to main content
POST
Create a new redirect.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

project
string
required

Body

application/json
oldUrl
string
required

Path or URL to redirect from. Required when creating a redirect.

newUrl
string
required

Target path or URL. Required when creating a redirect.

matchType
enum<string>
required

How oldUrl is matched: exact (default) for a literal match, pattern for a wildcard/pattern match. Optional.

Available options:
exact,
pattern

Response

200 - application/json

Ok

Generic types for Document:

  • T - the type of _id
  • TQueryHelpers - Object with any helpers that should be mixed into the Query type
  • DocType - the type of the actual Document created
updatedAt
string
required
createdAt
string
required
matchType
enum<string>
required
Available options:
exact,
pattern
newUrl
string
required
oldUrl
string
required
project
object
required