> ## 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: c7293f4e-0162-4a44-be1c-a57ab993e689
---

# Submit data to a form (unauthenticated)

> Send form submission data to a HubSpot form, specified by form ID. This endpoint supports cross-origin (CORS) AJAX requests.

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>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['forms']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v3/forms-v3-legacy.json POST /submissions/v3/integration/submit/{portalId}/{formGuid}
openapi: 3.0.0
info:
  title: Forms API v3 Legacy
  version: 3.0.0
  description: >-
    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.hsforms.com
    description: HubSpot Forms API Server
security: []
paths:
  /submissions/v3/integration/submit/{portalId}/{formGuid}:
    post:
      summary: Submit data to a form (unauthenticated)
      description: >-
        Send form submission data to a HubSpot form, specified by form ID. This
        endpoint supports cross-origin (CORS) AJAX requests.
      operationId: submitFormUnauthenticated
      parameters:
        - name: portalId
          in: path
          required: true
          description: The HubSpot account that the form belongs to.
          schema:
            type: string
        - name: formGuid
          in: path
          required: true
          description: The unique ID of the form you're sending data to.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FormSubmissionRequest'
      responses:
        '200':
          description: Form submission successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormSubmissionResponse'
        '400':
          description: Bad request - validation errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormSubmissionErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FormSubmissionRequest:
      type: object
      properties:
        submittedAt:
          type: string
          description: >-
            A millisecond timestamp representing the time of the form
            submission. This can be used to backdate the submission, but using a
            time more than one month old will result in an error.
        fields:
          type: array
          description: >-
            A list of form field names and the values for those fields, up to
            1000 fields can be included.
          maxItems: 1000
          items:
            $ref: '#/components/schemas/FormField'
        context:
          $ref: '#/components/schemas/FormContext'
        legalConsentOptions:
          $ref: '#/components/schemas/LegalConsentOptions'
        skipValidation:
          type: boolean
          description: >-
            Whether or not to skip validation based on the form settings.
            Defaults to false. Note: This parameter is deprecated.
          deprecated: true
      required:
        - fields
    FormSubmissionResponse:
      type: object
      properties:
        redirectUri:
          type: string
          description: >-
            If the submission was accepted, and the form has a redirect URI set
            in its settings, this will be that redirect URI
        inlineMessage:
          type: string
          description: >-
            If the submission was accepted, and the form has an inline thank you
            message set in its settings, this will be the HTML for that message
    FormSubmissionErrorResponse:
      type: object
      properties:
        errors:
          type: array
          description: A list of errors with the submission data
          items:
            $ref: '#/components/schemas/FormSubmissionError'
    Error:
      type: object
      properties:
        category:
          type: string
          description: The error category
        correlationId:
          type: string
          description: A unique identifier for the request
        message:
          type: string
          description: A human readable message describing the error
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        errors:
          type: array
          description: Further information about the error
          items:
            $ref: '#/components/schemas/ErrorDetail'
        context:
          type: object
          description: Context about the error condition
        links:
          type: object
          description: A map of link names to associated URIs
      required:
        - category
        - correlationId
        - message
    FormField:
      type: object
      properties:
        objectTypeId:
          type: string
          description: The object type ID (e.g., '0-1' for contacts, '0-2' for companies)
        name:
          type: string
          description: The name of the field
        value:
          type: string
          description: The value for the field
      required:
        - objectTypeId
        - name
        - value
    FormContext:
      type: object
      properties:
        hutk:
          type: string
          description: >-
            The tracking cookie token value used for HubSpot lead activity
            tracking.
        ipAddress:
          type: string
          description: The IP address of the visitor filling out the form.
        pageName:
          type: string
          description: The name or title of the page the submission happened on.
        pageUri:
          type: string
          description: The URI of the page the submission happened on.
        pageId:
          type: string
          description: The ID of a page created on the HubSpot CMS.
        sfdcCampaignId:
          type: string
          description: >-
            If the form is for an account using the HubSpot Salesforce
            Integration, you can include the ID of a Salesforce campaign.
        goToWebinarWebinarKey:
          type: string
          description: >-
            If the form is for an account using the HubSpot GoToWebinar
            Integration, you can include the ID of a webinar.
    LegalConsentOptions:
      type: object
      properties:
        consent:
          $ref: '#/components/schemas/ConsentOption'
        legitimateInterest:
          $ref: '#/components/schemas/LegitimateInterestOption'
    FormSubmissionError:
      type: object
      properties:
        message:
          type: string
          description: A human readable message describing the error
        errorType:
          type: string
          enum:
            - BLOCKED_EMAIL
            - DUPLICATE_SUBSCRIPTION_TYPE_ID
            - FIELD_NOT_IN_FORM_DEFINITION
            - FORM_HAS_RECAPTCHA_ENABLED
            - INPUT_TOO_LARGE
            - INVALID_EMAIL
            - INVALID_GOTOWEBINAR_WEBINAR_KEY
            - INVALID_HUTK
            - INVALID_IP_ADDRESS
            - INVALID_LEGAL_OPTION_FORMAT
            - INVALID_METADATA
            - INVALID_NUMBER
            - INVALID_PAGE_URI
            - INVALID_DOMAIN
            - INVALID_LEGAL_CONSENT_OPTIONS
            - INVALID_TIMESTAMP
            - MAX_NUMBER_OF_SUBMITTED_VALUES_EXCEEDED
            - MISSING_PROCESSING_CONSENT
            - MISSING_PROCESSING_CONSENT_TEXT
            - MISSING_COMMUNICATION_CONSENT_TEXT
            - MISSING_LEGITIMATE_INTEREST_TEXT
            - NUMBER_OUT_OF_RANGE
            - PORTAL_NOT_OBJECT_TYPE_OWNER
            - REQUIRED_FIELD
            - VALUE_NOT_IN_FIELD_DEFINITION
          description: The coded error type
      required:
        - message
        - errorType
    ErrorDetail:
      type: object
      properties:
        message:
          type: string
          description: A human readable message describing the error
        in:
          type: string
          description: The name of the field or parameter in which the error was found
        code:
          type: string
          description: The status code associated with the error detail
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        context:
          type: object
          description: Context about the error condition
      required:
        - message
    ConsentOption:
      type: object
      properties:
        consentToProcess:
          type: boolean
          description: Whether or not the visitor checked the Consent to process checkbox
        text:
          type: string
          description: >-
            The text displayed to the visitor for the Consent to process
            checkbox
        communications:
          type: array
          items:
            $ref: '#/components/schemas/CommunicationConsent'
      required:
        - consentToProcess
        - text
    LegitimateInterestOption:
      type: object
      properties:
        value:
          type: boolean
          description: This must be true when using the 'legitimateInterest' option
        subscriptionTypeId:
          type: integer
          description: >-
            The ID of the specific subscription type that this forms indicates
            interest to
        legalBasis:
          type: string
          enum:
            - CUSTOMER
            - LEAD
          description: >-
            Whether this form indicates legitimate interest from a prospect/lead
            or from a client
        text:
          type: string
          description: The privacy text displayed to the visitor
      required:
        - value
        - subscriptionTypeId
        - legalBasis
        - text
    CommunicationConsent:
      type: object
      properties:
        value:
          type: boolean
          description: >-
            Whether or not the visitor checked the checkbox for this
            subscription type
        subscriptionTypeId:
          type: integer
          description: The ID of the specific subscription type
        text:
          type: string
          description: >-
            The text displayed to the visitor for this specific subscription
            checkbox
      required:
        - value
        - subscriptionTypeId
        - text

````