Skip to main content
PATCH
/
cms
/
v3
/
url-redirects
/
{urlRedirectId}
Update a redirect
curl --request PATCH \
  --url https://api.hubapi.com/cms/v3/url-redirects/{urlRedirectId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "destination": "<string>",
  "id": "<string>",
  "isMatchFullUrl": true,
  "isMatchQueryString": true,
  "isOnlyAfterNotFound": true,
  "isPattern": true,
  "isProtocolAgnostic": true,
  "isTrailingSlashOptional": true,
  "precedence": 123,
  "redirectStyle": 123,
  "routePrefix": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "updated": "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>",
  "created": "2023-11-07T05:31:56Z",
  "updated": "2023-11-07T05:31:56Z"
}

Supported products

Authorizations

Authorization
string
header
required

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

Path Parameters

urlRedirectId
string
required

Body

application/json
destination
string
required

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

id
string
required

The unique ID of this URL redirect.

isMatchFullUrl
boolean
required

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

isMatchQueryString
boolean
required

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

isOnlyAfterNotFound
boolean
required

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
required

Whether the routePrefix should match based on pattern.

isProtocolAgnostic
boolean
required

Whether the routePrefix should match both HTTP and HTTPS protocols.

isTrailingSlashOptional
boolean
required

Whether a trailing slash will be ignored.

precedence
integer<int32>
required

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>
required

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

routePrefix
string
required

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

created
string<date-time>

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

updated
string<date-time>

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

Response

successful operation

destination
string
required

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

id
string
required

The unique ID of this URL redirect.

isMatchFullUrl
boolean
required

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

isMatchQueryString
boolean
required

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

isOnlyAfterNotFound
boolean
required

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
required

Whether the routePrefix should match based on pattern.

isProtocolAgnostic
boolean
required

Whether the routePrefix should match both HTTP and HTTPS protocols.

isTrailingSlashOptional
boolean
required

Whether a trailing slash will be ignored.

precedence
integer<int32>
required

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>
required

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

routePrefix
string
required

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

created
string<date-time>

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

updated
string<date-time>

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

Last modified on February 12, 2026