openapi: 3.0.1 info: title: HubSpot CMS URL Mappings description: Basepom for all HubSpot Projects version: 2026-09 x-hubspot-product-tier-requirements: marketing: FREE sales: FREE service: FREE cms: FREE commerce: FREE crmHub: FREE dataHub: FREE servers: - url: https://api.hubapi.com tags: - name: Basic paths: /url-mappings/2026-09/url-mappings: get: tags: - Basic summary: List URL mappings description: Retrieve a list of URL mappings from the HubSpot account. This endpoint provides access to URL mapping configurations, which can be used to manage and redirect URLs within the HubSpot CMS. It is useful for understanding how URLs are structured and redirected in your content management setup. operationId: get-/url-mappings/2026-09/url-mappings_/url-mappings/v3/url-mappings parameters: [] responses: '200': description: successful operation content: '*/*': schema: type: array items: $ref: '#/components/schemas/UrlMapping' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - content post: tags: - Basic summary: Create URL mapping description: Create a new URL mapping in your HubSpot account. This endpoint allows you to define URL redirections and mappings, which can be useful for managing site navigation and SEO. The request body must include all required properties of the UrlMapping schema. operationId: post-/url-mappings/2026-09/url-mappings_/url-mappings/v3/url-mappings parameters: [] requestBody: content: '*/*': schema: $ref: '#/components/schemas/UrlMapping' required: true responses: default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - content /url-mappings/2026-09/url-mappings/{id}: get: tags: - Basic summary: Retrieve URL mapping description: Retrieve a specific URL mapping by its unique identifier. This endpoint is useful for obtaining details about a particular URL mapping configuration within your HubSpot account. It requires the ID of the URL mapping as a path parameter. operationId: get-/url-mappings/2026-09/url-mappings/{id}_/url-mappings/v3/url-mappings/{id} parameters: - name: id in: path description: '' required: true style: simple explode: false schema: pattern: \d+ type: integer format: int64 responses: '200': description: successful operation content: '*/*': schema: $ref: '#/components/schemas/UrlMapping' default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - content delete: tags: - Basic summary: Delete URL mapping description: Delete a specific URL mapping in your HubSpot account using its unique identifier. This operation will remove the URL mapping permanently, and it requires appropriate write and delete permissions. operationId: delete-/url-mappings/2026-09/url-mappings/{id}_/url-mappings/v3/url-mappings/{id} parameters: - name: id in: path description: '' required: true style: simple explode: false schema: pattern: \d+ type: integer format: int64 responses: '204': description: No content content: {} default: description: '' $ref: '#/components/responses/Error' security: - oauth2: - content - oauth2: - cms-url-redirects-delete components: schemas: Error: required: - category - correlationId - message type: object properties: category: type: string description: The error category context: type: object additionalProperties: type: array items: type: string description: Context about the error condition example: '{invalidPropertyName=[propertyValue], missingScopes=[scope1, scope2]}' correlationId: type: string description: A unique identifier for the request. Include this value with any error reports or support tickets format: uuid example: aeb5f871-7f07-4993-9211-075dc63e7cbf errors: type: array description: further information about the error items: $ref: '#/components/schemas/ErrorDetail' links: type: object additionalProperties: type: string description: A map of link names to associated URIs containing documentation about the error or recommended remediation steps message: type: string description: A human readable message describing the error along with remediation steps where appropriate example: An error occurred subCategory: type: string description: A specific category that contains more specific detail about the error description: Represents an error response returned by the API when an operation fails. This component is used in various endpoints to provide detailed information about the error encountered. example: message: Invalid input (details will vary based on the error) correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf category: VALIDATION_ERROR links: knowledge-base: https://www.hubspot.com/products/service/knowledge-base ErrorDetail: required: - message type: object properties: code: type: string description: The status code associated with the error detail context: type: object additionalProperties: type: array items: type: string description: Context about the error condition example: '{missingScopes=[scope1, scope2]}' in: type: string description: The name of the field or parameter in which the error was found. message: type: string description: A human readable message describing the error along with remediation steps where appropriate subCategory: type: string description: A specific category that contains more specific detail about the error description: Represents detailed information about an error that occurred in the API. This component is used to provide additional context and specifics about errors, typically as part of an error response. UrlMapping: required: - cdnPurgeEmbargoTime - contentGroupId - cosObjectType - created - createdById - deletedAt - destination - id - internallyCreated - isActive - isMatchFullUrl - isMatchQueryString - isOnlyAfterNotFound - isPattern - isProtocolAgnostic - isRegex - isTrailingSlashOptional - label - lastUsedAt - name - note - portalId - precedence - redirectStyle - routePrefix - updated - updatedById type: object properties: cdnPurgeEmbargoTime: type: integer description: A Unix timestamp in milliseconds indicating the embargo time for CDN purge related to the URL mapping. format: int64 contentGroupId: type: integer description: A 64-bit integer representing the content group associated with the URL mapping. format: int64 cosObjectType: type: string description: A string representing the type of content object associated with the URL mapping. Valid values include various content types such as 'CONTENT', 'LAYOUT', 'FILE', etc. enum: - ACCESS_GROUP_MEMBERSHIP - APP_PAGE - BLOCK - BLOG - BLOG_AUTHOR - BRAND_BUSINESS_UNIT - BRAND_SETTINGS - CONTACT_MEMBERSHIP - CONTENT - CONTENT_EMBED - CONTENT_FOLDER - CONTENT_GROUP - CRM_OBJECT - CRM_OBJECT_TYPE - CUSTOM_WIDGET - CUSTOMER_PORTAL - DATA_QUERY - DESIGN_FOLDER - DOMAIN - DOMAIN_SETTINGS - EMAIL_ADDRESS - EXTENSION_RESOURCE - FILE - FOLDER - FOLLOW_ME - FORM - GLOBAL_CONTENT - GLOBAL_STYLES_THEME - HUBDB_TABLE - HUBDB_TABLE_ROW - IMAGE - JS_PROJECT_COMPONENT - KNOWLEDGE_BASE - KNOWLEDGE_CATEGORY - KNOWLEDGE_CATEGORY_TRANSLATION - KNOWLEDGE_HOMEPAGE_CATEGORY - LAYOUT - LAYOUT_SECTION - LIST_MEMBERSHIP - MARKETPLACE_LISTING - PASSWORD_PROTECTED - PAYMENT - PERSONALIZATION_TOKEN - PLACEMENT - PROJECT - QUOTE_TEMPLATE - RAW_ASSET - REDIRECT_URL - SECTION - SERVERLESS_FUNCTION - SITE_MAP - SITE_MENU - SITE_SETTINGS - SUBSCRIPTIONS_SETTINGS - TAG - THEME - THEME_SETTINGS - UNRESTRICTED_ACCESS - URL_MAPPING - VIDEO_PLAYER - WIDGET - WORKFLOW created: type: integer description: A Unix timestamp in milliseconds indicating when the URL mapping was created. format: int64 createdById: type: integer description: The identifier of the user who created the URL mapping. format: int32 deletedAt: type: integer description: A Unix timestamp in milliseconds indicating when the URL mapping was deleted. format: int64 destination: type: string description: The destination URL to which the routePrefix is redirected. id: type: integer description: The unique identifier for the URL mapping, represented as a 64-bit integer. format: int64 internallyCreated: type: boolean description: A boolean indicating if the URL mapping was created internally by the system. isActive: type: boolean description: A boolean indicating if the URL mapping is currently active. isMatchFullUrl: type: boolean description: A boolean indicating if the full URL should be matched. isMatchQueryString: type: boolean description: A boolean indicating if the query string should be matched. isOnlyAfterNotFound: type: boolean description: A boolean indicating if the mapping should only be applied after a 404 Not Found response. isPattern: type: boolean description: A boolean indicating if the routePrefix is a pattern. isProtocolAgnostic: type: boolean description: A boolean indicating if the mapping should ignore the URL protocol (http/https). isRegex: type: boolean description: A boolean indicating if the routePrefix should be treated as a regular expression. isTrailingSlashOptional: type: boolean description: A boolean indicating if the trailing slash in the URL is optional. label: type: string description: A label for the URL mapping. lastUsedAt: type: integer format: int64 name: type: string description: The name of the URL mapping. note: type: string description: A string containing notes about the URL mapping. portalId: type: integer description: The identifier for the HubSpot portal associated with this URL mapping. format: int32 precedence: type: integer description: An integer representing the precedence of the URL mapping, used to determine order of evaluation. format: int32 redirectStyle: type: integer description: An integer representing the style of redirection used. format: int32 routePrefix: type: string description: The prefix of the URL path that is being mapped. updated: type: integer description: A Unix timestamp in milliseconds indicating when the URL mapping was last updated. format: int64 updatedById: type: integer description: The identifier of the user who last updated the URL mapping. format: int32 responses: Error: description: An error occurred. content: '*/*': schema: $ref: '#/components/schemas/Error' securitySchemes: developer_hapikey: type: apiKey name: hapikey in: query oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://app.hubspot.com/oauth/authorize tokenUrl: https://api.hubapi.com/oauth/v1/token scopes: cms-url-redirects-delete: '' content: '' private_apps: type: apiKey name: private-app in: header private_apps_legacy: type: apiKey name: private-app-legacy in: header x-hubspot-product-tier-requirements: marketing: FREE sales: FREE service: FREE cms: FREE commerce: FREE crmHub: FREE dataHub: FREE