POST
/
submissions
/
v3
/
integration
/
secure
/
submit
/
{portalId}
/
{formGuid}
Submit data to a form (supporting authentication)
curl --request POST \
  --url https://api.hsforms.com/submissions/v3/integration/secure/submit/{portalId}/{formGuid} \
  --header 'Content-Type: application/json' \
  --data '{
  "submittedAt": "<string>",
  "fields": [
    {
      "objectTypeId": "<string>",
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "context": {
    "hutk": "<string>",
    "ipAddress": "<string>",
    "pageName": "<string>",
    "pageUri": "<string>",
    "pageId": "<string>",
    "sfdcCampaignId": "<string>",
    "goToWebinarWebinarKey": "<string>"
  },
  "legalConsentOptions": {
    "consent": {
      "consentToProcess": true,
      "text": "<string>",
      "communications": [
        {
          "value": true,
          "subscriptionTypeId": 123,
          "text": "<string>"
        }
      ]
    },
    "legitimateInterest": {
      "value": true,
      "subscriptionTypeId": 123,
      "legalBasis": "CUSTOMER",
      "text": "<string>"
    }
  },
  "skipValidation": true
}'
{
  "redirectUri": "<string>",
  "inlineMessage": "<string>"
}

Required Scopes

This API requires one of the following scopes:
  • forms

Path Parameters

portalId
string
required

The HubSpot portal the form belongs to.

formGuid
string
required

The ID of the form you're sending data to.

Body

application/json
fields
object[]
required

A list of form field names and the values for those fields, up to 1000 fields can be included.

Maximum length: 1000
submittedAt
string

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.

context
object
skipValidation
boolean
deprecated

Whether or not to skip validation based on the form settings. Defaults to false. Note: This parameter is deprecated.

Response

Form submission successful

redirectUri
string

If the submission was accepted, and the form has a redirect URI set in its settings, this will be that redirect URI

inlineMessage
string

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