Skip to main content
GET
/
url-mappings
/
v3
/
url-mappings
/
{url_mapping_id}
Get the URL mapping by ID
curl --request GET \
  --url https://api.hubapi.com/url-mappings/v3/url-mappings/{url_mapping_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": 123,
  "portalId": 123,
  "created": 123,
  "updated": 123,
  "routePrefix": "<string>",
  "destination": "<string>",
  "redirectStyle": 301,
  "contentGroupId": 123,
  "isOnlyAfterNotFound": true,
  "isRegex": true,
  "isMatchFullUrl": true,
  "isMatchQueryString": true,
  "isPattern": true,
  "isTrailingSlashOptional": true,
  "isProtocolAgnostic": true,
  "name": "<string>",
  "precedence": 123,
  "deletedAt": 123,
  "siteId": 123
}

Authorizations

Authorization
string
header
required

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

Path Parameters

url_mapping_id
string
required

The ID of the URL mapping.

Query Parameters

casing
enum<string>

Use the casing=snake parameter to change the API's casing for all query parameters and JSON fields to snake_case, rather than camelCase, which is the default.

Available options:
snake

Response

successful operation

id
integer<int64>

The unique ID of the URL mapping.

portalId
integer

The HubSpot account ID.

created
integer<int64>

When the URL mapping was first created, in milliseconds since the epoch.

updated
integer<int64>

When the URL mapping was last updated, in milliseconds since the epoch.

routePrefix
string

The incoming URL, path, or pattern to match.

destination
string

The URL to redirect to.

redirectStyle
enum<integer> | null

The type of redirect this mapping creates: 301 (permanent) or 302 (temporary).

Available options:
301,
302
contentGroupId
integer | null

The ID of the content group (aka blog) that this URL mapping exists for, if any. Otherwise null.

isOnlyAfterNotFound
boolean

If true, the URL mapping will only be applied if a live page matching the URL is not found. If false, the URL mapping will take precedence over any existing page.

isRegex
boolean

Deprecated. Indicates whether this mapping was created as a regular expression pattern (this option is no longer supported for new mappings).

isMatchFullUrl
boolean

If true, the 'routePrefix' should match on the entire URL including the domain.

isMatchQueryString
boolean

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

isPattern
boolean

If true, this is a flexible pattern based URL Mapping.

isTrailingSlashOptional
boolean

If true, trailing slashes are optional in the route prefix match.

isProtocolAgnostic
boolean

If true, the mapping will work for both HTTP and HTTPS protocols.

name
string

An name used to identify the type of pattern this is. Used mostly for blog and other internally-created mappings.

precedence
integer

If a URL matches more than one mapping, the one with the lower precedence applies.

deletedAt
integer<int64>

When the URL mapping was deleted, in milliseconds since the epoch. Will be 0 if the URL mapping was never deleted. Use a DELETE request to properly soft delete a URL mapping - do not set this value directly.

siteId
integer | null

The site ID if applicable.