Passer au contenu principal
PATCH
/
marketing
/
v3
/
forms
/
{formId}
Mettre à jour partiellement une définition de formulaire
curl --request PATCH \
  --url https://api.hubapi.com/marketing/v3/forms/{formId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "archived": true,
  "configuration": {
    "allowLinkToResetKnownValues": true,
    "archivable": true,
    "cloneable": true,
    "createNewContactForNewEmail": true,
    "editable": true,
    "language": "af",
    "lifecycleStages": [
      {
        "objectTypeId": "<string>",
        "value": "<string>"
      }
    ],
    "notifyContactOwner": true,
    "notifyRecipients": [
      "<string>"
    ],
    "postSubmitAction": {
      "type": "redirect_url",
      "value": "<string>"
    },
    "prePopulateKnownValues": true,
    "recaptchaEnabled": true,
    "embedType": "V3"
  },
  "displayOptions": {
    "renderRawHtml": true,
    "style": {
      "backgroundWidth": "<string>",
      "fontFamily": "<string>",
      "helpTextColor": "<string>",
      "helpTextSize": "<string>",
      "labelTextColor": "<string>",
      "labelTextSize": "<string>",
      "legalConsentTextColor": "<string>",
      "legalConsentTextSize": "<string>",
      "submitAlignment": "center",
      "submitColor": "<string>",
      "submitFontColor": "<string>",
      "submitSize": "<string>"
    },
    "submitButtonText": "<string>",
    "theme": "canvas",
    "cssClass": "<string>"
  },
  "fieldGroups": [
    {
      "fields": [
        {
          "dependentFields": [
            {
              "dependentCondition": {
                "operator": "between",
                "rangeEnd": "<string>",
                "rangeStart": "<string>",
                "value": "<string>",
                "values": [
                  "<string>"
                ]
              },
              "dependentField": "<unknown>"
            }
          ],
          "fieldType": "email",
          "hidden": true,
          "label": "<string>",
          "name": "<string>",
          "objectTypeId": "<string>",
          "required": true,
          "validation": {
            "blockedEmailDomains": [
              "<string>"
            ],
            "useDefaultBlockList": true
          },
          "defaultValue": "<string>",
          "description": "<string>",
          "placeholder": "<string>"
        }
      ],
      "groupType": "default_group",
      "richTextType": "image",
      "richText": "<string>"
    }
  ],
  "legalConsentOptions": {
    "type": "none"
  },
  "name": "<string>"
}
'
{
  "formType": "hubspot",
  "id": "<string>",
  "name": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "archived": true,
  "fieldGroups": [
    {
      "fields": [
        {
          "dependentFields": [
            {
              "dependentCondition": {
                "operator": "between",
                "rangeEnd": "<string>",
                "rangeStart": "<string>",
                "value": "<string>",
                "values": [
                  "<string>"
                ]
              },
              "dependentField": "<unknown>"
            }
          ],
          "fieldType": "email",
          "hidden": true,
          "label": "<string>",
          "name": "<string>",
          "objectTypeId": "<string>",
          "required": true,
          "validation": {
            "blockedEmailDomains": [
              "<string>"
            ],
            "useDefaultBlockList": true
          },
          "defaultValue": "<string>",
          "description": "<string>",
          "placeholder": "<string>"
        }
      ],
      "groupType": "default_group",
      "richTextType": "image",
      "richText": "<string>"
    }
  ],
  "configuration": {
    "allowLinkToResetKnownValues": true,
    "archivable": true,
    "cloneable": true,
    "createNewContactForNewEmail": true,
    "editable": true,
    "language": "af",
    "lifecycleStages": [
      {
        "objectTypeId": "<string>",
        "value": "<string>"
      }
    ],
    "notifyContactOwner": true,
    "notifyRecipients": [
      "<string>"
    ],
    "postSubmitAction": {
      "type": "redirect_url",
      "value": "<string>"
    },
    "prePopulateKnownValues": true,
    "recaptchaEnabled": true,
    "embedType": "V3"
  },
  "displayOptions": {
    "renderRawHtml": true,
    "style": {
      "backgroundWidth": "<string>",
      "fontFamily": "<string>",
      "helpTextColor": "<string>",
      "helpTextSize": "<string>",
      "labelTextColor": "<string>",
      "labelTextSize": "<string>",
      "legalConsentTextColor": "<string>",
      "legalConsentTextSize": "<string>",
      "submitAlignment": "center",
      "submitColor": "<string>",
      "submitFontColor": "<string>",
      "submitSize": "<string>"
    },
    "submitButtonText": "<string>",
    "theme": "canvas",
    "cssClass": "<string>"
  },
  "legalConsentOptions": {
    "type": "none"
  },
  "archivedAt": "2023-11-07T05:31:56Z"
}

Produits pris en charge

Exige l'un des produits suivants ou un produit supérieur.
Marketing HubMarketing Hub -Gratuit
Sales HubSales Hub -Gratuit
Service HubService Hub -Gratuit
Content HubContent Hub -Gratuit

Autorisations

Authorization
string
header
requis

The access token received from the authorization server in the OAuth 2.0 flow.

Paramètres de chemin

formId
string
requis

L'ID du formulaire à mettre à jour.

Corps

application/json
archived
boolean

Si ce formulaire est archivé.

configuration
object
displayOptions
object
fieldGroups
object[]

Les champs du formulaire, regroupés en lignes.

Configuration des options de consentement légal et de conformité au traitement des données. Types pris en charge : aucun, intérêt légitime, consentement explicite au traitement, consentement implicite au traitement.

name
string

Le nom du formulaire. Doit être unique pour un hub.

Réponse

successful operation

formType
enum<string>
défaut:hubspot
requis
Options disponibles:
hubspot
id
string
requis
name
string
requis
createdAt
string<date-time>
requis
updatedAt
string<date-time>
requis
archived
boolean
requis
fieldGroups
object[]
requis
configuration
object
requis
displayOptions
object
requis
archivedAt
string<date-time>
Last modified on February 12, 2026