> ## 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: ffa6135c-091c-4224-af21-d7493e5b4e5d
---

# Create a form

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={[
  'forms'
]}
    />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml specs/legacy/v3/marketing-forms-v3.json POST /marketing/v3/forms
openapi: 3.0.1
info:
  title: Forms
  description: Basepom for all HubSpot Projects
  version: v3
  x-hubspot-product-tier-requirements:
    marketing: FREE
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
  x-hubspot-api-use-case: >-
    Programmatically change certain parts of a HubSpot form based on more
    complex use-cases or data from a third-party service (displaying a field
    dynamically based on data you're querying from an external source).
  x-hubspot-related-documentation:
    - name: Forms Guide
      url: https://developers.hubspot.com/docs/guides/api/marketing/forms
  x-hubspot-introduction: >-
    Use the forms API to create and manage forms in your HubSpot account, which
    you can then embed on your website to collect form submissions from website
    visitors.
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Basic
paths:
  /marketing/v3/forms:
    post:
      tags:
        - Basic
      operationId: post-/marketing/v3/forms_/marketing/v3/forms
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FormDefinitionCreateRequestBase'
        required: true
      responses:
        '201':
          description: successful operation
          headers:
            Location:
              description: URL of the newly created resource
              style: simple
              explode: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormDefinitionBase'
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - forms
components:
  schemas:
    FormDefinitionCreateRequestBase:
      properties: {}
      oneOf:
        - $ref: '#/components/schemas/HubSpotFormDefinitionCreateRequest'
    FormDefinitionBase:
      properties: {}
      oneOf:
        - $ref: '#/components/schemas/HubSpotFormDefinition'
    HubSpotFormDefinitionCreateRequest:
      required:
        - archived
        - configuration
        - createdAt
        - displayOptions
        - fieldGroups
        - formType
        - legalConsentOptions
        - name
        - updatedAt
      type: object
      properties:
        archived:
          type: boolean
        archivedAt:
          type: string
          format: date-time
        configuration:
          $ref: '#/components/schemas/HubSpotFormConfiguration'
        createdAt:
          type: string
          format: date-time
        displayOptions:
          $ref: '#/components/schemas/FormDisplayOptions'
        fieldGroups:
          type: array
          items:
            $ref: '#/components/schemas/FieldGroup'
        formType:
          type: string
          default: hubspot
          enum:
            - hubspot
        legalConsentOptions:
          oneOf:
            - $ref: '#/components/schemas/LegalConsentOptionsNone'
            - $ref: '#/components/schemas/LegalConsentOptionsLegitimateInterest'
            - $ref: '#/components/schemas/LegalConsentOptionsExplicitConsentToProcess'
            - $ref: '#/components/schemas/LegalConsentOptionsImplicitConsentToProcess'
        name:
          type: string
        updatedAt:
          type: string
          format: date-time
      x-hubspot-sub-type-impl: true
    HubSpotFormDefinition:
      required:
        - archived
        - configuration
        - createdAt
        - displayOptions
        - fieldGroups
        - formType
        - id
        - legalConsentOptions
        - name
        - updatedAt
      type: object
      properties:
        archived:
          type: boolean
        archivedAt:
          type: string
          format: date-time
        configuration:
          $ref: '#/components/schemas/HubSpotFormConfiguration'
        createdAt:
          type: string
          format: date-time
        displayOptions:
          $ref: '#/components/schemas/FormDisplayOptions'
        fieldGroups:
          type: array
          items:
            $ref: '#/components/schemas/FieldGroup'
        formType:
          type: string
          default: hubspot
          enum:
            - hubspot
        id:
          type: string
        legalConsentOptions:
          oneOf:
            - $ref: '#/components/schemas/LegalConsentOptionsNone'
            - $ref: '#/components/schemas/LegalConsentOptionsLegitimateInterest'
            - $ref: '#/components/schemas/LegalConsentOptionsExplicitConsentToProcess'
            - $ref: '#/components/schemas/LegalConsentOptionsImplicitConsentToProcess'
        name:
          type: string
        updatedAt:
          type: string
          format: date-time
      x-hubspot-sub-type-impl: true
    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
    HubSpotFormConfiguration:
      required:
        - allowLinkToResetKnownValues
        - archivable
        - cloneable
        - createNewContactForNewEmail
        - editable
        - language
        - lifecycleStages
        - notifyContactOwner
        - notifyRecipients
        - postSubmitAction
        - prePopulateKnownValues
        - recaptchaEnabled
      type: object
      properties:
        allowLinkToResetKnownValues:
          type: boolean
          description: >-
            Whether to add a reset link to the form. This removes any
            pre-populated content on the form and creates a new contact on
            submission.
        archivable:
          type: boolean
          description: Whether the form can be archived.
        cloneable:
          type: boolean
          description: Whether the form can be cloned.
        createNewContactForNewEmail:
          type: boolean
          description: >-
            Whether to create a new contact when a form is submitted with an
            email address that doesn’t match any in your existing contacts
            records.
        editable:
          type: boolean
          description: Whether the form can be edited.
        embedType:
          type: string
          enum:
            - V3
            - V4
        language:
          type: string
          description: The language of the form.
          enum:
            - af
            - ar-eg
            - bg
            - bn
            - ca-es
            - cs
            - da
            - de
            - el
            - en
            - en-gb
            - es
            - es-mx
            - fi
            - fr
            - fr-ca
            - he-il
            - hr
            - hu
            - id
            - it
            - ja
            - ko
            - lt
            - ms
            - nl
            - no-no
            - pl
            - pt
            - pt-br
            - ro
            - ru
            - sk
            - sl
            - sv
            - th
            - tl
            - tr
            - uk
            - vi
            - zh-cn
            - zh-hk
            - zh-tw
        lifecycleStages:
          type: array
          items:
            $ref: '#/components/schemas/LifecycleStage'
        notifyContactOwner:
          type: boolean
          description: >-
            Whether to send a notification email to the contact owner when a
            submission is received.
        notifyRecipients:
          type: array
          description: >-
            The list of user IDs to receive a notification email when a
            submission is received.
          items:
            type: string
        postSubmitAction:
          $ref: '#/components/schemas/FormPostSubmitAction'
        prePopulateKnownValues:
          type: boolean
          description: >-
            Whether contact fields should pre-populate with known information
            when a contact returns to your site.
        recaptchaEnabled:
          type: boolean
          description: Whether CAPTCHA (spam prevention) is enabled.
    FormDisplayOptions:
      required:
        - renderRawHtml
        - style
        - submitButtonText
        - theme
      type: object
      properties:
        cssClass:
          type: string
          description: >-
            Custom CSS class name(s) to apply to the form element for additional
            styling.
        renderRawHtml:
          type: boolean
          description: >-
            Whether the form will render as raw HTML as opposed to inside an
            iFrame.
        style:
          $ref: '#/components/schemas/FormStyle'
        submitButtonText:
          type: string
          description: The text displayed on the form submit button.
        theme:
          type: string
          description: >-
            The theme used for styling the input fields. This will not apply if
            the form is added to a HubSpot CMS page.
          enum:
            - canvas
            - default_style
            - legacy
            - linear
            - round
            - sharp
    FieldGroup:
      required:
        - fields
        - groupType
        - richTextType
      type: object
      properties:
        fields:
          type: array
          description: The form fields included in the group
          items:
            oneOf:
              - $ref: '#/components/schemas/EmailField'
              - $ref: '#/components/schemas/PhoneField'
              - $ref: '#/components/schemas/MobilePhoneField'
              - $ref: '#/components/schemas/SingleLineTextField'
              - $ref: '#/components/schemas/MultiLineTextField'
              - $ref: '#/components/schemas/NumberField'
              - $ref: '#/components/schemas/SingleCheckboxField'
              - $ref: '#/components/schemas/MultipleCheckboxesField'
              - $ref: '#/components/schemas/DropdownField'
              - $ref: '#/components/schemas/RadioField'
              - $ref: '#/components/schemas/DatepickerField'
              - $ref: '#/components/schemas/FileField'
              - $ref: '#/components/schemas/PaymentLinkRadioField'
        groupType:
          type: string
          description: >-
            The type of field grouping. Values: default_group (standard fields),
            progressive, and queued.
          enum:
            - default_group
            - progressive
            - queued
        richText:
          type: string
          description: >-
            A block of rich text or an image. Those can be used to add extra
            information for the customers filling in the form. If the field
            group includes fields, the rich text will be displayed before the
            fields.
        richTextType:
          type: string
          description: >-
            The type of rich text included. The default value is text. Values:
            text, image.
          enum:
            - image
            - text
    LegalConsentOptionsNone:
      title: none
      required:
        - type
      type: object
      properties:
        type:
          type: string
          description: >-
            The legal consent type. Set to "none" to indicate no legal consent
            configuration is required for this form.
          default: none
          enum:
            - none
      x-hubspot-sub-type-impl: true
    LegalConsentOptionsLegitimateInterest:
      title: legitimate_interest
      required:
        - lawfulBasis
        - privacyText
        - subscriptionTypeIds
        - type
      type: object
      properties:
        lawfulBasis:
          type: string
          description: >-
            The lawful basis for data processing under legitimate interest.
            Values: lead (processing for lead generation), client (processing
            for existing clients), other (other legitimate interests). Default:
            lead.
          enum:
            - client
            - lead
            - other
        privacyText:
          type: string
          description: Text explaining the privacy policy and data handling practices.
        subscriptionTypeIds:
          type: array
          items:
            type: integer
            format: int64
        type:
          type: string
          description: The legal consent type.
          default: legitimate_interest
          enum:
            - legitimate_interest
      x-hubspot-sub-type-impl: true
    LegalConsentOptionsExplicitConsentToProcess:
      title: explicit_consent_to_process
      required:
        - communicationsCheckboxes
        - privacyText
        - type
      type: object
      properties:
        communicationConsentText:
          type: string
          description: >-
            Text explaining communication consent preferences. Informs users
            about how their contact information will be used for communications.
        communicationsCheckboxes:
          type: array
          items:
            $ref: '#/components/schemas/LegalConsentCheckbox'
        consentToProcessCheckboxLabel:
          type: string
          description: Label text for the consent to process checkbox.
        consentToProcessFooterText:
          type: string
          description: Footer text for the consent to process section.
        consentToProcessText:
          type: string
          description: Text explaining the consent to process personal data.
        privacyText:
          type: string
          description: >-
            Text explaining the privacy policy and data handling practices.
            Required field that informs users about their privacy rights and how
            their data is protected.
        type:
          type: string
          description: The legal consent type.
          default: explicit_consent_to_process
          enum:
            - explicit_consent_to_process
      x-hubspot-sub-type-impl: true
    LegalConsentOptionsImplicitConsentToProcess:
      title: implicit_consent_to_process
      required:
        - communicationsCheckboxes
        - privacyText
        - type
      type: object
      properties:
        communicationConsentText:
          type: string
          description: Text explaining communication consent preferences.
        communicationsCheckboxes:
          type: array
          items:
            $ref: '#/components/schemas/LegalConsentCheckbox'
        consentToProcessText:
          type: string
          description: Text explaining the consent to process personal data.
        privacyText:
          type: string
          description: Text explaining the privacy policy and data handling practices.
        type:
          type: string
          description: The legal consent type.
          default: implicit_consent_to_process
          enum:
            - implicit_consent_to_process
      x-hubspot-sub-type-impl: true
    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
    LifecycleStage:
      required:
        - objectTypeId
        - value
      type: object
      properties:
        objectTypeId:
          type: string
          description: The objectTypeId for both contact and company
        value:
          type: string
          description: >-
            The internal name of the contact's lifecycle stage set when
            submitting a form
    FormPostSubmitAction:
      required:
        - type
        - value
      type: object
      properties:
        type:
          type: string
          description: >-
            The action to take after submit. The default action is displaying a
            thank you message.
          enum:
            - redirect_url
            - thank_you
        value:
          type: string
          description: The thank you text or the page to redirect to.
    FormStyle:
      required:
        - backgroundWidth
        - fontFamily
        - helpTextColor
        - helpTextSize
        - labelTextColor
        - labelTextSize
        - legalConsentTextColor
        - legalConsentTextSize
        - submitAlignment
        - submitColor
        - submitFontColor
        - submitSize
      type: object
      properties:
        backgroundWidth:
          type: string
          description: >-
            The width of the form background. Accepts percentage (e.g., "100%")
            or pixel values (e.g., "600px").
        fontFamily:
          type: string
          description: >-
            Font family used throughout the form (e.g., "arial, helvetica,
            sans-serif").
        helpTextColor:
          type: string
          description: Hex color code for help text displayed below form fields.
        helpTextSize:
          type: string
          description: Font size for help text. Accepts pixel values (e.g., "11px").
        labelTextColor:
          type: string
          description: Hex color code for field labels.
        labelTextSize:
          type: string
          description: Font size for field labels. Accepts pixel values (e.g., "11px").
        legalConsentTextColor:
          type: string
          description: Hex color code for legal consent text.
        legalConsentTextSize:
          type: string
          description: >-
            Font size for legal consent text. Accepts pixel values (e.g.,
            "14px").
        submitAlignment:
          type: string
          description: >-
            Horizontal alignment of the submit button. Values: left, center,
            right.
          enum:
            - center
            - left
            - right
        submitColor:
          type: string
          description: Hex color code for the submit button background.
        submitFontColor:
          type: string
          description: Hex color code for the submit button text.
        submitSize:
          type: string
          description: >-
            Font size for submit button text. Accepts pixel values (e.g.,
            "12px").
    EmailField:
      title: email
      required:
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - required
        - validation
      type: object
      properties:
        defaultValue:
          type: string
          description: >-
            The value filled in by default. This value will be submitted unless
            the customer modifies it.
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: email
          enum:
            - email
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
        validation:
          $ref: '#/components/schemas/EmailFieldValidation'
      x-hubspot-sub-type-impl: true
    PhoneField:
      title: phone
      required:
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - required
        - useCountryCodeSelect
        - validation
      type: object
      properties:
        defaultValue:
          type: string
          description: >-
            The value filled in by default. This value will be submitted unless
            the customer modifies it.
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: phone
          enum:
            - phone
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
        useCountryCodeSelect:
          type: boolean
          description: Whether to display a country code drop down next to the phone field.
        validation:
          $ref: '#/components/schemas/PhoneFieldValidation'
      x-hubspot-sub-type-impl: true
    MobilePhoneField:
      title: mobile_phone
      required:
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - required
        - validation
      type: object
      properties:
        defaultValue:
          type: string
          description: >-
            The value filled in by default. This value will be submitted unless
            the customer modifies it.
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: mobile_phone
          enum:
            - mobile_phone
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
        validation:
          $ref: '#/components/schemas/PhoneFieldValidation'
      x-hubspot-sub-type-impl: true
    SingleLineTextField:
      title: single_line_text
      required:
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - required
      type: object
      properties:
        defaultValue:
          type: string
          description: >-
            The value filled in by default. This value will be submitted unless
            the customer modifies it.
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: single_line_text
          enum:
            - single_line_text
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
      x-hubspot-sub-type-impl: true
    MultiLineTextField:
      title: multi_line_text
      required:
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - required
      type: object
      properties:
        defaultValue:
          type: string
          description: >-
            The value filled in by default. This value will be submitted unless
            the customer modifies it.
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: multi_line_text
          enum:
            - multi_line_text
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
      x-hubspot-sub-type-impl: true
    NumberField:
      title: number
      required:
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - required
      type: object
      properties:
        defaultValue:
          type: string
          description: >-
            The value filled in by default. This value will be submitted unless
            the customer modifies it.
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: number
          enum:
            - number
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
        validation:
          $ref: '#/components/schemas/NumberFieldValidation'
      x-hubspot-sub-type-impl: true
    SingleCheckboxField:
      title: single_checkbox
      required:
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - required
      type: object
      properties:
        defaultValue:
          type: string
          description: >-
            The value filled in by default. This value will be submitted unless
            the customer modifies it.
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: single_checkbox
          enum:
            - single_checkbox
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
      x-hubspot-sub-type-impl: true
    MultipleCheckboxesField:
      title: multiple_checkboxes
      required:
        - defaultValues
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - options
        - required
      type: object
      properties:
        defaultValues:
          type: array
          description: >-
            The values selected by default. Those values will be submitted
            unless the customer modifies them.
          items:
            type: string
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: multiple_checkboxes
          enum:
            - multiple_checkboxes
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        options:
          type: array
          description: The list of available choices for this field.
          items:
            $ref: '#/components/schemas/EnumeratedFieldOption'
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
      x-hubspot-sub-type-impl: true
    DropdownField:
      title: dropdown
      required:
        - defaultValues
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - options
        - required
      type: object
      properties:
        defaultValues:
          type: array
          description: >-
            The values selected by default. Those values will be submitted
            unless the customer modifies them.
          items:
            type: string
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: dropdown
          enum:
            - dropdown
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        options:
          type: array
          description: The list of available choices for this field.
          items:
            $ref: '#/components/schemas/EnumeratedFieldOption'
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
      x-hubspot-sub-type-impl: true
    RadioField:
      title: radio
      required:
        - defaultValues
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - options
        - required
      type: object
      properties:
        defaultValues:
          type: array
          description: >-
            The values selected by default. Those values will be submitted
            unless the customer modifies them.
          items:
            type: string
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: radio
          enum:
            - radio
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        options:
          type: array
          description: The list of available choices for this field.
          items:
            $ref: '#/components/schemas/EnumeratedFieldOption'
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
      x-hubspot-sub-type-impl: true
    DatepickerField:
      title: datepicker
      required:
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - required
      type: object
      properties:
        defaultValue:
          type: string
          description: >-
            The value filled in by default. This value will be submitted unless
            the customer modifies it.
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: datepicker
          enum:
            - datepicker
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
      x-hubspot-sub-type-impl: true
    FileField:
      title: file
      required:
        - allowMultipleFiles
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - required
      type: object
      properties:
        allowMultipleFiles:
          type: boolean
          description: Whether to allow the upload of multiple files.
        defaultValue:
          type: string
          description: >-
            The value filled in by default. This value will be submitted unless
            the customer modifies it.
        dependentFields:
          type: array
          description: >-
            A list of other fields to make visible based on the value filled in
            for this field.
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional text helping the customer to complete the field.
        fieldType:
          type: string
          description: Determines how the field will be displayed and validated.
          default: file
          enum:
            - file
        hidden:
          type: boolean
          description: >-
            Whether a field should be hidden or not. Hidden fields won't appear
            on the form, but can be used to pass a value to a property without
            requiring the customer to fill it in.
        label:
          type: string
          description: The main label for the form field.
        name:
          type: string
          description: >-
            The identifier of the field. In combination with the object type ID,
            it must be unique.
        objectTypeId:
          type: string
          description: >-
            A unique ID for this field's CRM object type. For example a CONTACT
            field will have the object type ID 0-1.
        placeholder:
          type: string
          description: The prompt text showing when the field isn't filled in.
        required:
          type: boolean
          description: Whether a value for this field is required when submitting the form.
      x-hubspot-sub-type-impl: true
    PaymentLinkRadioField:
      title: payment_link_radio
      required:
        - defaultValues
        - dependentFields
        - fieldType
        - hidden
        - label
        - name
        - objectTypeId
        - options
        - required
      type: object
      properties:
        defaultValues:
          type: array
          items:
            type: string
        dependentFields:
          type: array
          items:
            $ref: '#/components/schemas/DependentField'
        description:
          type: string
          description: Additional descriptive text about the field.
        fieldType:
          type: string
          description: The field type identifier.
          default: payment_link_radio
          enum:
            - payment_link_radio
        hidden:
          type: boolean
          description: Whether the field is a hidden field.
        label:
          type: string
          description: >-
            The visible label displayed with the field to describe its purpose
            to form users.
        name:
          type: string
          description: >-
            The internal API name used to identify this field in API requests
            and responses.
        objectTypeId:
          type: string
          description: >-
            The CRM object type this field is associated with (e.g., contacts,
            deals).
        options:
          type: array
          items:
            $ref: '#/components/schemas/EnumeratedFieldOption'
        required:
          type: boolean
          description: Whether users must select an option before submitting the form.
      x-hubspot-sub-type-impl: true
    LegalConsentCheckbox:
      required:
        - label
        - required
        - subscriptionTypeId
      type: object
      properties:
        label:
          type: string
          description: The main label for the form field.
        required:
          type: boolean
          description: Whether this checkbox is required when submitting the form.
        subscriptionTypeId:
          type: integer
          description: >-
            The ID of the subscription type associated with this consent
            checkbox.
          format: int64
    DependentField:
      required:
        - dependentCondition
        - dependentField
      type: object
      properties:
        dependentCondition:
          $ref: '#/components/schemas/DependentFieldFilter'
        dependentField:
          description: >-
            A form field that will be conditionally displayed based on whether
            the dependent condition is met.
          oneOf:
            - $ref: '#/components/schemas/EmailField'
            - $ref: '#/components/schemas/PhoneField'
            - $ref: '#/components/schemas/MobilePhoneField'
            - $ref: '#/components/schemas/SingleLineTextField'
            - $ref: '#/components/schemas/MultiLineTextField'
            - $ref: '#/components/schemas/NumberField'
            - $ref: '#/components/schemas/SingleCheckboxField'
            - $ref: '#/components/schemas/MultipleCheckboxesField'
            - $ref: '#/components/schemas/DropdownField'
            - $ref: '#/components/schemas/RadioField'
            - $ref: '#/components/schemas/DatepickerField'
            - $ref: '#/components/schemas/FileField'
            - $ref: '#/components/schemas/PaymentLinkRadioField'
    EmailFieldValidation:
      required:
        - blockedEmailDomains
        - useDefaultBlockList
      type: object
      properties:
        blockedEmailDomains:
          type: array
          description: A list of email domains to block.
          items:
            type: string
        useDefaultBlockList:
          type: boolean
          description: Whether to block the free email providers.
    PhoneFieldValidation:
      required:
        - maxAllowedDigits
        - minAllowedDigits
      type: object
      properties:
        maxAllowedDigits:
          type: integer
          description: >-
            The maximum number of digits allowed in the phone number. Default:
            20. Must be greater than or equal to minAllowedDigits.
          format: int32
        minAllowedDigits:
          type: integer
          description: >-
            The minimum number of digits required in the phone number. Default:
            7. Must be less than or equal to maxAllowedDigits.
          format: int32
    NumberFieldValidation:
      required:
        - maxAllowedDigits
        - minAllowedDigits
      type: object
      properties:
        maxAllowedDigits:
          type: integer
          description: >-
            The maximum number of digits allowed for number field input. Must be
            greater than or equal to minAllowedDigits.
          format: int32
        minAllowedDigits:
          type: integer
          description: >-
            The minimum number of digits required for valid number field input.
            Must be less than or equal to maxAllowedDigits.
          format: int32
    EnumeratedFieldOption:
      required:
        - displayOrder
        - label
        - value
      type: object
      properties:
        description:
          type: string
          description: Additional descriptive text about the option.
        displayOrder:
          type: integer
          description: The order the choices will be displayed in.
          format: int32
        label:
          type: string
          description: The visible label for this choice.
        value:
          type: string
          description: The value which will be submitted if this choice is selected.
    DependentFieldFilter:
      required:
        - operator
        - rangeEnd
        - rangeStart
        - value
        - values
      type: object
      properties:
        operator:
          type: string
          description: >-
            The comparison operator used to evaluate the dependent field
            condition. Supports equality (eq, neq), string operations (contains,
            doesnt_contain, str_starts_with, str_ends_with), numeric comparisons
            (lt, lte, gt, gte), range checks (between, not_between), set
            operations (set_any, set_not_any, set_eq, set_neq), and time-based
            conditions (within_time, within_time_reverse).
          enum:
            - between
            - contains
            - doesnt_contain
            - eq
            - gt
            - gte
            - is_not_empty
            - lt
            - lte
            - neq
            - not_between
            - set_all
            - set_any
            - set_eq
            - set_neq
            - set_not_all
            - set_not_any
            - str_ends_with
            - str_starts_with
            - within_time
            - within_time_reverse
        rangeEnd:
          type: string
          description: >-
            The end value for range-based operators (between, not_between). Must
            be provided together with rangeStart.
        rangeStart:
          type: string
          description: >-
            The start value for range-based operators (between, not_between).
            Must be provided together with rangeEnd.
        value:
          type: string
          description: >-
            The single value to compare against when using operators like eq,
            neq, contains, lt, gt, and other single-value comparison operators.
        values:
          type: array
          items:
            type: string
  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:
            forms: ''

````