Saltar al contenido principal
PUT
/
marketing
/
v3
/
forms
/
{formId}
Actualizar una definición de formulario
curl --request PUT \
  --url https://api.hubapi.com/marketing/v3/forms/{formId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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",
    "notifyContactOwner": true,
    "notifyRecipients": [
      "<string>"
    ],
    "postSubmitAction": {
      "type": "redirect_url",
      "value": "<string>"
    },
    "prePopulateKnownValues": true,
    "recaptchaEnabled": true,
    "lifecycleStages": [
      {
        "objectTypeId": "<string>",
        "value": "<string>"
      }
    ]
  },
  "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"
}
'
{
  "id": "6eae0163-5362-4c0e-809c-b99a18678adc",
  "name": "Register for updates",
  "createdAt": "2020-09-22T05:12:27.505Z",
  "updatedAt": "2020-09-22T07:17:31.627Z",
  "archived": false,
  "fieldGroups": [
    {
      "groupType": "default_group",
      "richTextType": "text",
      "fields": [
        {
          "objectTypeId": "0-1",
          "name": "email",
          "label": "Email",
          "required": true,
          "hidden": false,
          "fieldType": "email",
          "validation": {
            "blockedEmailDomains": [],
            "useDefaultBlockList": false
          }
        }
      ]
    },
    {
      "groupType": "default_group",
      "richTextType": "text",
      "fields": [
        {
          "objectTypeId": "0-1",
          "name": "firstname",
          "label": "First name",
          "required": false,
          "hidden": false,
          "fieldType": "single_line_text"
        },
        {
          "objectTypeId": "0-1",
          "name": "lastname",
          "label": "Last name",
          "required": false,
          "hidden": false,
          "fieldType": "single_line_text"
        }
      ]
    }
  ],
  "configuration": {
    "language": "en",
    "cloneable": true,
    "postSubmitAction": {
      "type": "thank_you",
      "value": "Thanks for submitting the form."
    },
    "editable": true,
    "archivable": true,
    "recaptchaEnabled": true,
    "notifyContactOwner": false,
    "notifyRecipients": [
      "2886602"
    ],
    "createNewContactForNewEmail": false,
    "prePopulateKnownValues": true,
    "allowLinkToResetKnownValues": false,
    "lifecycleStages": [
      {
        "objectTypeId": "0-1",
        "value": "subscriber"
      },
      {
        "objectTypeId": "0-2",
        "value": "subscriber"
      }
    ]
  },
  "displayOptions": {
    "renderRawHtml": false,
    "theme": "default_style",
    "submitButtonText": "Submit",
    "style": {
      "fontFamily": "arial, helvetica, sans-serif",
      "backgroundWidth": "100%",
      "labelTextColor": "#33475b",
      "labelTextSize": "13px",
      "helpTextColor": "#7C98B6",
      "helpTextSize": "11px",
      "legalConsentTextColor": "#33475b",
      "legalConsentTextSize": "14px",
      "submitColor": "#ff7a59",
      "submitAlignment": "left",
      "submitFontColor": "#ffffff",
      "submitSize": "12px"
    },
    "cssClass": "hs-form stacked"
  },
  "legalConsentOptions": {
    "type": "explicit_consent_to_process",
    "communicationConsentText": "<p>Fancy Forms, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please tick below to say how you would like us to contact you:</p>",
    "communicationsCheckboxes": [
      {
        "required": false,
        "subscriptionTypeId": 3883363,
        "label": "<p>I agree to receive other communications from Fancy Forms, LLC.</p>"
      }
    ],
    "consentToProcessText": "<p>In order to provide you the content requested, we need to store and process your personal data. If you consent to us storing your personal data for this purpose, please tick the checkbox below.</p>",
    "consentToProcessCheckboxLabel": "<p>I agree to allow Fancy Forms, LLC to store and process my personal data.</p>",
    "privacyText": "<p>You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.</p>"
  },
  "formType": "hubspot"
}

Productos compatibles

Se requiere uno de los siguientes productos o productos de ediciones superiores.
Marketing HubMarketing Hub -Gratuito
Sales HubSales Hub -Gratuito
Service HubService Hub -Gratuito
Content HubContent Hub -Gratuito

Autorizaciones

Authorization
string
header
requerido

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

Parámetros de ruta

formId
string
requerido

El identificador único del formulario.

Cuerpo

application/json
formType
enum<string>
predeterminado:hubspot
requerido
Opciones disponibles:
hubspot
id
string
requerido
name
string
requerido
createdAt
string<date-time>
requerido
updatedAt
string<date-time>
requerido
archived
boolean
requerido
fieldGroups
object[]
requerido
configuration
object
requerido
displayOptions
object
requerido

Options for styling the form.

archivedAt
string<date-time>

Respuesta

successful operation

formType
enum<string>
predeterminado:hubspot
requerido
Opciones disponibles:
hubspot
id
string
requerido
name
string
requerido
createdAt
string<date-time>
requerido
updatedAt
string<date-time>
requerido
archived
boolean
requerido
fieldGroups
object[]
requerido
configuration
object
requerido
displayOptions
object
requerido

Options for styling the form.

archivedAt
string<date-time>
Last modified on January 26, 2026