Skip to main content
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,
  "archivedAt": "2023-11-07T05:31:56Z",
  "fieldGroups": [
    {
      "groupType": "default_group",
      "richTextType": "text",
      "richText": "<string>",
      "fields": [
        {
          "objectTypeId": "<string>",
          "hidden": true,
          "defaultValue": "<string>",
          "name": "<string>",
          "description": "<string>",
          "dependentFields": [
            {
              "dependentCondition": {
                "rangeStart": "<string>",
                "values": [
                  "<string>"
                ],
                "value": "<string>",
                "operator": "eq",
                "rangeEnd": "<string>"
              },
              "dependentField": {}
            }
          ],
          "label": "<string>",
          "placeholder": "<string>",
          "fieldType": "email",
          "required": true,
          "validation": {
            "useDefaultBlockList": true,
            "blockedEmailDomains": [
              "<string>"
            ]
          }
        }
      ]
    }
  ],
  "configuration": {
    "createNewContactForNewEmail": true,
    "editable": true,
    "allowLinkToResetKnownValues": true,
    "lifecycleStages": [
      {
        "objectTypeId": "<string>",
        "value": "<string>"
      }
    ],
    "postSubmitAction": {
      "type": "thank_you",
      "value": "<string>"
    },
    "language": "af",
    "prePopulateKnownValues": true,
    "cloneable": true,
    "notifyContactOwner": true,
    "recaptchaEnabled": true,
    "archivable": true,
    "notifyRecipients": [
      "<string>"
    ]
  },
  "displayOptions": {
    "renderRawHtml": true,
    "cssClass": "<string>",
    "theme": "default_style",
    "submitButtonText": "<string>",
    "style": {
      "labelTextSize": "<string>",
      "legalConsentTextColor": "<string>",
      "fontFamily": "<string>",
      "legalConsentTextSize": "<string>",
      "backgroundWidth": "<string>",
      "helpTextSize": "<string>",
      "submitFontColor": "<string>",
      "labelTextColor": "<string>",
      "submitAlignment": "left",
      "submitSize": "<string>",
      "helpTextColor": "<string>",
      "submitColor": "<string>"
    }
  },
  "legalConsentOptions": {
    "type": "none"
  }
}'
{
  "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 HubGratuito
Sales HubSales HubGratuito
Service HubService HubGratuito
Content HubContent HubStarter

Ámbitos Requeridos

Esta API requiere uno de los siguientes ámbitos:
  • forms

Authorizations

Authorization
string
header
required

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

Path Parameters

formId
string
required

Body

application/json
formType
enum<string>
default:hubspot
required
Available options:
hubspot
id
string
required
name
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
archived
boolean
required
fieldGroups
object[]
required
configuration
object
required
displayOptions
object
required

Options for styling the form.

  • none
  • legitimate_interest
archivedAt
string<date-time>

Response

successful operation

formType
enum<string>
default:hubspot
required
Available options:
hubspot
id
string
required
name
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
archived
boolean
required
fieldGroups
object[]
required
configuration
object
required
displayOptions
object
required

Options for styling the form.

  • none
  • legitimate_interest
archivedAt
string<date-time>
I