There's a new version of the HubSpot API

We're also working on a new documentation website, you're invited to check it out and give us your feedback.

Get the url mapping by ID

Last updated May 31, 2023

GET /url-mappings/v3/url-mappings/:url_mapping_id

Method Details

HTTP Methods:


Response Format:


Requires Authentication?


Rate Limited?






Get a specific URL mapping by ID.
Required Parameters How to use Description
OAuth access token or private app access token Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.
url_mapping_id Used in the request URL Unique identifier for a particular blog

Optional query string parameters

Parameter name Description
casing Use the casing=snake parameter to change the API's casing for returned JSON fields (below) to snake_case, rather than camelCase, which is the default. This option is provided for backwards-compatibility and ease of migration from Content v2 APIs, which used snake_case.

JSON Fields returned in the response

Field name Type Description
id string The unique id of the url mapping
portalId string The hub id
created long When the url mapping was first created, in milliseconds since the epoch
updated long 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 int The type of redirect this mapping creates: 301 (permanent) or 302 (temporary)
contentGroupId long 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.
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 long When the url mapping was deleted, in milliseconds since the epoch. Zero if the url mapping was never deleted. Use a DELETE request to properly soft delete a url mapping - do not set this value directly.