> ## 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: 6ed218e4-ba73-4dba-a83c-e3dfdea9c550
---

# Update the schema of a specified custom object.

> Update attributes of a custom object schema, such as properties and labels, using the object type ID or fully qualified name.

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="ENTERPRISE" salesLevel="ENTERPRISE" serviceLevel="ENTERPRISE" cmsLevel="ENTERPRISE" />
  </Accordion>

  <Accordion title="Required Scopes" icon="key">
    <ScopesList
      scopes={[
  'crm.schemas.custom.write'
]}
    />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml specs/legacy/v3/crm-schemas-v3.json PATCH /crm-object-schemas/v3/schemas/{objectType}
openapi: 3.0.1
info:
  title: Schemas
  description: >-
    The CRM uses schemas to define how custom objects should store and represent
    information in the HubSpot CRM. Schemas define details about an object's
    type, properties, and associations. The schema can be uniquely identified by
    its **object type ID**.
  version: v3
  x-hubspot-product-tier-requirements:
    marketing: ENTERPRISE
    sales: ENTERPRISE
    service: ENTERPRISE
    cms: ENTERPRISE
    commerce: ENTERPRISE
    crmHub: ENTERPRISE
    dataHub: ENTERPRISE
  x-hubspot-api-use-case: >-
    Create a new object for storing information about cars at a car dealership.
    Your object definition could include properties to store information as well
    as the filters available on the custom object index page.
  x-hubspot-related-documentation:
    - name: Custom Object Guide
      url: >-
        https://developers.hubspot.com/docs/guides/api/crm/objects/custom-objects
  x-hubspot-introduction: >-
    Use the custom objects schema API to define new types of CRM records in your
    account. After setting up an object schema, you'll then be able to create
    records for that custom object both in HubSpot and using the objects API.
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Advanced
  - name: Basic
  - name: Batch
paths:
  /crm-object-schemas/v3/schemas/{objectType}:
    patch:
      tags:
        - Basic
      summary: Update the schema of a specified custom object.
      description: >-
        Update attributes of a custom object schema, such as properties and
        labels, using the object type ID or fully qualified name.
      operationId: patch-/crm-object-schemas/v3/schemas/{objectType}_update
      parameters:
        - name: objectType
          in: path
          description: Fully qualified name or object type ID of your schema.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        description: Attributes to update in your schema.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ObjectTypeDefinitionPatch'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectTypeDefinition'
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - crm.schemas.custom.write
components:
  schemas:
    ObjectTypeDefinitionPatch:
      type: object
      properties:
        allowsSensitiveProperties:
          type: boolean
          description: >-
            Determines if the object type can include properties that are marked
            as sensitive.
        clearDescription:
          type: boolean
          description: >-
            Indicates whether the description of the object type should be
            cleared.
        description:
          type: string
          description: A brief explanation of the object type.
        labels:
          $ref: '#/components/schemas/ObjectTypeDefinitionLabels'
        primaryDisplayProperty:
          type: string
          description: >-
            The name of the primary property for this object. This will be
            displayed as primary on the HubSpot record page for this object
            type.
        requiredProperties:
          type: array
          description: >-
            The names of properties that should be **required** when creating an
            object of this type.
          items:
            type: string
        restorable:
          type: boolean
          description: Specifies if the object type can be restored after being deleted.
        searchableProperties:
          type: array
          description: >-
            Names of properties that will be indexed for this object type in by
            HubSpot's product search.
          items:
            type: string
        secondaryDisplayProperties:
          type: array
          description: >-
            The names of secondary properties for this object. These will be
            displayed as secondary on the HubSpot record page for this object
            type.
          items:
            type: string
      description: Defines attributes to update on an object type.
      example:
        primaryDisplayProperty: my_object_property
        requiredProperties:
          - my_object_property
        searchableProperties:
          - my_object_property
    ObjectTypeDefinition:
      required:
        - id
        - labels
        - name
        - requiredProperties
      type: object
      properties:
        allowsSensitiveProperties:
          type: boolean
          description: >-
            Indicates whether the object type allows properties that contain
            sensitive data.
        archived:
          type: boolean
          description: Indicates whether the object type is archived.
        createdAt:
          type: string
          description: When the object type was created.
          format: date-time
        description:
          type: string
          description: A description of the object type.
        fullyQualifiedName:
          type: string
          description: >-
            An assigned unique ID for the object, including portal ID and object
            name.
        id:
          type: string
          description: >-
            A unique ID for this object type. Will be defined as
            {meta-type}-{unique ID}.
        labels:
          $ref: '#/components/schemas/ObjectTypeDefinitionLabels'
        name:
          type: string
          description: A unique name for this object. For internal use only.
        objectTypeId:
          type: string
          description: A unique identifier for the object type.
        portalId:
          type: integer
          description: The ID of the account that this object type is specific to.
          format: int32
        primaryDisplayProperty:
          type: string
          description: >-
            The name of the primary property for this object. This will be
            displayed as primary on the HubSpot record page for this object
            type.
        requiredProperties:
          type: array
          description: >-
            The names of properties that should be **required** when creating an
            object of this type.
          items:
            type: string
        searchableProperties:
          type: array
          description: >-
            Names of properties that will be indexed for this object type in by
            HubSpot's product search.
          items:
            type: string
        secondaryDisplayProperties:
          type: array
          description: >-
            The names of secondary properties for this object. These will be
            displayed as secondary on the HubSpot record page for this object
            type.
          items:
            type: string
        updatedAt:
          type: string
          description: When the object type was last updated.
          format: date-time
      description: Defines an object type.
      example:
        createdAt: '2020-02-20T18:07:11.390Z'
        id: '123456'
        labels:
          plural: My objects
          singular: My object
        metaType: PORTAL_SPECIFIC
        name: my_object
        portalId: 12345678
        primaryDisplayProperty: my_object_property
        requiredProperties:
          - my_object_property
        searchableProperties:
          - my_object_property
        updatedAt: '2020-02-21T14:13:28.818002Z'
    ObjectTypeDefinitionLabels:
      type: object
      properties:
        plural:
          type: string
          description: >-
            The word for multiple objects. (There’s no way to change this
            later.)
        singular:
          type: string
          description: The word for one object. (There’s no way to change this later.)
      description: Singular and plural labels for the object. Used in CRM display.
      example:
        plural: My objects
        singular: My object
    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:
            crm.objects.custom.highly_sensitive.read.v2: ''
            crm.objects.custom.read: ''
            crm.objects.custom.sensitive.read.v2: ''
            crm.schemas.custom.read: ''
            crm.schemas.custom.write: ''
            oauth: ''

````