> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: 63930cdf-23af-4561-96e7-d681dc40e179
---

# Create a mapping

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

export const ScopesList = ({scopes = [], description = "This API requires one of the following scopes:"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

export const SupportedProducts = ({marketing, sales, service, cms, data, commerce, marketingLevel, salesLevel, serviceLevel, cmsLevel, dataLevel, commerceLevel}) => {
  const translations = {
    description: "Requires one of the following products or higher.",
    productNames: {
      marketing: "Marketing Hub",
      sales: "Sales Hub",
      service: "Service Hub",
      cms: "Content Hub",
      data: "Data Hub",
      commerce: "Revenue Hub"
    },
    tiers: {
      free: "Free",
      starter: "Starter",
      professional: "Professional",
      enterprise: "Enterprise"
    }
  };
  const translateTier = tier => {
    if (!tier) return '';
    const lowerTier = tier.toLowerCase();
    return translations.tiers[lowerTier] || tier;
  };
  const products = [{
    name: marketing ? translations.productNames.marketing : '',
    level: translateTier(marketingLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/marketing-bolt.svg",
    alt: "Marketing Hub"
  }, {
    name: sales ? translations.productNames.sales : '',
    level: translateTier(salesLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/sales-star.svg",
    alt: "Sales Hub"
  }, {
    name: service ? translations.productNames.service : '',
    level: translateTier(serviceLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/service-heart.svg",
    alt: "Service Hub"
  }, {
    name: cms ? translations.productNames.cms : '',
    level: translateTier(cmsLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/content-play.svg",
    alt: "Content Hub"
  }, {
    name: data ? translations.productNames.data : '',
    level: translateTier(dataLevel),
    icon: "https://developers.hubspot.com/hubfs/Knowledge_Base_2023-24-25/subscription_key_icons/operations_icon.svg",
    alt: "Data Hub"
  }, {
    name: commerce ? translations.productNames.commerce : '',
    level: translateTier(commerceLevel),
    icon: "https://developers.hubspot.com/hubfs/Knowledge_Base/subscription_key_icons/commerce_icon.svg",
    alt: "Revenue Hub"
  }].filter(product => product.name && product.level);
  if (products.length === 0) return null;
  return <div>
      <div className="text-sm mb-2">{translations.description}</div>
      <div className={`grid ${products.length === 1 ? 'grid-cols-1' : 'grid-cols-2'} gap-1.5`}>
        {products.map((product, index) => <div key={index} style={{
    display: 'flex',
    alignItems: 'center'
  }}>
            <img src={product.icon} alt={product.alt} className="w-3.5 h-3.5 mr-1.5 mt-2.5 mb-2.5 flex-shrink-0 align-middle" />
            <span className="font-medium mr-1 text-sm">{product.name} -</span>
            <span className="text-sm">{product.level}</span>
          </div>)}
      </div>
    </div>;
};

<AccordionGroup>
  <Accordion title="Supported products" defaultOpen="true" icon="cubes">
    <SupportedProducts marketing={true} sales={true} service={true} cms={true} marketingLevel="FREE" salesLevel="FREE" serviceLevel="FREE" cmsLevel="FREE" />
  </Accordion>

  <Accordion title="Required Scopes" icon="key">
    <ScopesList
      scopes={[
  'content'
]}
    />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml specs/2026-03/cms-url-mappings-v2026-03.json POST /url-mappings/2026-03/url-mappings
openapi: 3.0.1
info:
  title: Url Mappings
  description: Basepom for all HubSpot Projects
  version: 2026-03
  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
security: []
tags:
  - name: Basic
paths:
  /url-mappings/2026-03/url-mappings:
    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-03/url-mappings_/url-mappings/v3/url-mappings
      parameters: []
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/UrlMapping'
        required: true
      responses:
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - content
components:
  schemas:
    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
    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
      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
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    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: ''

````