Zum Hauptinhalt springen
POST
/
cms
/
url-redirects
/
2026-03
cURL
curl --request POST \
  --url https://api.hubapi.com/cms/url-redirects/2026-03 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "destination": "<string>",
  "redirectStyle": 123,
  "routePrefix": "<string>",
  "isMatchFullUrl": true,
  "isMatchQueryString": true,
  "isOnlyAfterNotFound": true,
  "isPattern": true,
  "isProtocolAgnostic": true,
  "isTrailingSlashOptional": true,
  "precedence": 123
}
'
{
  "created": "2023-11-07T05:31:56Z",
  "destination": "<string>",
  "id": "<string>",
  "isMatchFullUrl": true,
  "isMatchQueryString": true,
  "isOnlyAfterNotFound": true,
  "isPattern": true,
  "isProtocolAgnostic": true,
  "isTrailingSlashOptional": true,
  "precedence": 123,
  "redirectStyle": 123,
  "routePrefix": "<string>",
  "updated": "2023-11-07T05:31:56Z"
}

Supported products

Autorisierungen

Authorization
string
header
erforderlich

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
destination
string
erforderlich

The destination URL, where the target URL should be redirected if it matches the routePrefix.

redirectStyle
integer<int32>
erforderlich

The type of redirect to create. Options include: 301 (permanent), 302 (temporary), or 305 (proxy).

routePrefix
string
erforderlich

The target incoming URL, path, or pattern to match for redirection.

isMatchFullUrl
boolean

Whether the routePrefix should match on the entire URL, including the domain.

isMatchQueryString
boolean

Whether the routePrefix should match on the entire URL path, including the query string.

isOnlyAfterNotFound
boolean

Whether the URL redirect mapping should apply only if a live page on the URL isn't found. If False, the URL redirect mapping will take precedence over any existing page.

isPattern
boolean

Whether the routePrefix should match based on pattern.

isProtocolAgnostic
boolean

Whether the routePrefix should match both HTTP and HTTPS protocols.

isTrailingSlashOptional
boolean

Whether a trailing slash will be ignored.

precedence
integer<int32>

Used to prioritize URL redirection. If a given URL matches more than one redirect, the one with the lower precedence will be used.

Antwort

successful operation

created
string<date-time>
erforderlich

The date and time when the URL mapping was initially created.

destination
string
erforderlich

The destination URL, where the target URL should be redirected if it matches the routePrefix.

id
string
erforderlich

The unique ID of this URL redirect.

isMatchFullUrl
boolean
erforderlich

Whether the routePrefix should match on the entire URL, including the domain.

isMatchQueryString
boolean
erforderlich

Whether the routePrefix should match on the entire URL path, including the query string.

isOnlyAfterNotFound
boolean
erforderlich

Whether the URL redirect mapping should apply only if a live page on the URL isn't found. If False, the URL redirect mapping will take precedence over any existing page.

isPattern
boolean
erforderlich

Whether the routePrefix should match based on pattern.

isProtocolAgnostic
boolean
erforderlich

Whether the routePrefix should match both HTTP and HTTPS protocols.

isTrailingSlashOptional
boolean
erforderlich

Whether a trailing slash will be ignored.

precedence
integer<int32>
erforderlich

Used to prioritize URL redirection. If a given URL matches more than one redirect, the one with the lower precedence will be used.

redirectStyle
integer<int32>
erforderlich

The type of redirect to create. Options include: 301 (permanent), 302 (temporary), or 305 (proxy). Find more details here.

routePrefix
string
erforderlich

The target incoming URL, path, or pattern to match for redirection.

updated
string<date-time>
erforderlich

The date and time when the URL mapping was last modified.

Last modified on April 9, 2026