curl --request POST \
--url https://api.hubapi.com/marketing/v3/forms/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formType": "hubspot",
"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": "409fa224-7fef-4507-b731-1eb3f508a3eb",
"name": "Join our mailing list",
"createdAt": "2020-09-22T07:13:28.102Z",
"updatedAt": "2020-09-22T07:13:28.102Z",
"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",
"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 joining our mailing list."
},
"editable": true,
"archivable": true,
"recaptchaEnabled": false,
"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": "none"
},
"formType": "hubspot"
}Agregar un nuevo formulario de hubspot
curl --request POST \
--url https://api.hubapi.com/marketing/v3/forms/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formType": "hubspot",
"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": "409fa224-7fef-4507-b731-1eb3f508a3eb",
"name": "Join our mailing list",
"createdAt": "2020-09-22T07:13:28.102Z",
"updatedAt": "2020-09-22T07:13:28.102Z",
"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",
"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 joining our mailing list."
},
"editable": true,
"archivable": true,
"recaptchaEnabled": false,
"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": "none"
},
"formType": "hubspot"
}Productos compatibles
Ámbitos Requeridos
formsThe access token received from the authorization server in the OAuth 2.0 flow.
hubspot Show child attributes
Los campos de formulario incluidos en el grupo
A form field used for collecting an email address.
Show child attributes
Una lista de otros campos que se harán visibles en función del valor introducido en este campo.
Show child attributes
A condition based on customer input
Show child attributes
between, contains, doesnt_contain, eq, gt, gte, is_not_empty, lt, lte, neq, not_between, set_all, set_any, set_eq, set_neq, set_not_all, set_not_any, str_ends_with, str_starts_with, within_time, within_time_reverse A form field used for collecting a phone number.
Show child attributes
Una lista de otros campos que se harán visibles en función del valor introducido en este campo.
Determina cómo se mostrará y validará el campo.
phone Indica si un campo debe estar oculto o no. Los campos ocultos no aparecerán en el formulario, pero se pueden utilizar para pasar un valor a una propiedad sin necesidad de que el cliente lo introduzca.
La etiqueta principal para el campo del formulario.
El identificador del campo. En combinación con el ID del tipo de objeto, debe ser único.
Un ID único para el tipo de objeto CRM de este campo. Por ejemplo, un campo CONTACTO tendrá el ID de tipo de objeto 0-1.
Si se requiere un valor para este campo al enviar el formulario.
Decidir si se muestra un menú desplegable de código de país junto al campo de teléfono.
El valor introducido por opción predeterminada. Se enviará este valor a menos que el cliente lo modifique.
Texto adicional que ayuda al cliente a rellenar el campo.
El mensaje que aparece cuando no se rellena el campo.
Determina cómo se mostrará y validará el campo.
email Decidir si un campo debe estar oculto o no. Los campos ocultos no aparecerán en el formulario, pero se pueden utilizar para pasar un valor a una propiedad sin necesidad de que el cliente lo introduzca.
La etiqueta principal para el campo del formulario.
El identificador del campo. En combinación con el ID del tipo de objeto, debe ser único.
Un ID único para el tipo de objeto CRM de este campo. Por ejemplo, un campo CONTACTO tendrá el ID de tipo de objeto 0-1.
Decidir si se requiere un valor para este campo al enviar el formulario.
Describes how an email address should be validated.
El valor introducido por opción predeterminada. Este valor se enviará a menos que el cliente lo modifique.
Texto adicional que ayuda al cliente a rellenar el campo.
El mensaje que aparece cuando no se rellena el campo.
default_group, progressive, queued El tipo de texto enriquecido incluido. El valor predeterminado es texto.
image, text Un bloque de texto enriquecido o una imagen. Estos pueden utilizarse para añadir información adicional para los clientes que completan el formulario. Si el grupo de campos incluye campos, el texto enriquecido se mostrará antes de los campos.
Show child attributes
Decidir si se agrega un enlace de restablecimiento al formulario. Esto elimina cualquier contenido escrito previamente en el formulario y crea un nuevo contacto en el envío.
Decidir si el formulario puede archivarse.
Decidir si el formulario puede clonarse.
Decidir si se crea un nuevo contacto cuando se envíe un formulario con una dirección de correo electrónico que no coincide con ninguna en sus registros de contactos existentes.
Decidir si el formulario puede editarse.
El idioma del formulario.
af, ar-eg, bg, bn, ca-es, cs, da, de, el, en, es, es-mx, fi, fr, fr-ca, he-il, hr, hu, id, it, ja, ko, lt, ms, nl, no-no, pl, pt, pt-br, ro, ru, sk, sl, sv, th, tl, tr, uk, vi, zh-cn, zh-hk, zh-tw Decidir si se envía un correo electrónico de notificación al propietario del contacto cuando se recibe una comunicación.
La lista de IDs de usuario que recibirán un correo electrónico de notificación cuando se reciba una comunicación.
What should happen after the customer submits the form.
Show child attributes
La acción a tomar después de enviar. La acción predeterminada es mostrar un mensaje de agradecimiento.
redirect_url, thank_you El texto de agradecimiento o la página a la que se redirigirá.
Decidir si los campos de contactos se rellenan previamente con información conocida cuando un contacto vuelve a tu sitio.
Decidir si CAPTCHA (prevención de spam) está activado.
Options for styling the form.
Show child attributes
Decidir si el formulario se mostrará como HTML sin formato en lugar de dentro de un iFrame.
Styling options for the form
Show child attributes
center, left, right El texto que aparece en el botón de envío del formulario.
El tema utilizado para dar estilo a los campos de entrada. Esto no se aplicará si el formulario se añade a una página CMS de HubSpot.
canvas, default_style, legacy, linear, round, sharp successful operation
hubspot Show child attributes
Los campos de formulario incluidos en el grupo
A form field used for collecting an email address.
Show child attributes
Una lista de otros campos que se harán visibles en función del valor introducido en este campo.
Show child attributes
A condition based on customer input
Show child attributes
between, contains, doesnt_contain, eq, gt, gte, is_not_empty, lt, lte, neq, not_between, set_all, set_any, set_eq, set_neq, set_not_all, set_not_any, str_ends_with, str_starts_with, within_time, within_time_reverse A form field used for collecting a phone number.
Show child attributes
Una lista de otros campos que se harán visibles en función del valor introducido en este campo.
Determina cómo se mostrará y validará el campo.
phone Indica si un campo debe estar oculto o no. Los campos ocultos no aparecerán en el formulario, pero se pueden utilizar para pasar un valor a una propiedad sin necesidad de que el cliente lo introduzca.
La etiqueta principal para el campo del formulario.
El identificador del campo. En combinación con el ID del tipo de objeto, debe ser único.
Un ID único para el tipo de objeto CRM de este campo. Por ejemplo, un campo CONTACTO tendrá el ID de tipo de objeto 0-1.
Si se requiere un valor para este campo al enviar el formulario.
Decidir si se muestra un menú desplegable de código de país junto al campo de teléfono.
El valor introducido por opción predeterminada. Se enviará este valor a menos que el cliente lo modifique.
Texto adicional que ayuda al cliente a rellenar el campo.
El mensaje que aparece cuando no se rellena el campo.
Determina cómo se mostrará y validará el campo.
email Decidir si un campo debe estar oculto o no. Los campos ocultos no aparecerán en el formulario, pero se pueden utilizar para pasar un valor a una propiedad sin necesidad de que el cliente lo introduzca.
La etiqueta principal para el campo del formulario.
El identificador del campo. En combinación con el ID del tipo de objeto, debe ser único.
Un ID único para el tipo de objeto CRM de este campo. Por ejemplo, un campo CONTACTO tendrá el ID de tipo de objeto 0-1.
Decidir si se requiere un valor para este campo al enviar el formulario.
Describes how an email address should be validated.
El valor introducido por opción predeterminada. Este valor se enviará a menos que el cliente lo modifique.
Texto adicional que ayuda al cliente a rellenar el campo.
El mensaje que aparece cuando no se rellena el campo.
default_group, progressive, queued El tipo de texto enriquecido incluido. El valor predeterminado es texto.
image, text Un bloque de texto enriquecido o una imagen. Estos pueden utilizarse para añadir información adicional para los clientes que completan el formulario. Si el grupo de campos incluye campos, el texto enriquecido se mostrará antes de los campos.
Show child attributes
Decidir si se agrega un enlace de restablecimiento al formulario. Esto elimina cualquier contenido escrito previamente en el formulario y crea un nuevo contacto en el envío.
Decidir si el formulario puede archivarse.
Decidir si el formulario puede clonarse.
Decidir si se crea un nuevo contacto cuando se envíe un formulario con una dirección de correo electrónico que no coincide con ninguna en sus registros de contactos existentes.
Decidir si el formulario puede editarse.
El idioma del formulario.
af, ar-eg, bg, bn, ca-es, cs, da, de, el, en, es, es-mx, fi, fr, fr-ca, he-il, hr, hu, id, it, ja, ko, lt, ms, nl, no-no, pl, pt, pt-br, ro, ru, sk, sl, sv, th, tl, tr, uk, vi, zh-cn, zh-hk, zh-tw Decidir si se envía un correo electrónico de notificación al propietario del contacto cuando se recibe una comunicación.
La lista de IDs de usuario que recibirán un correo electrónico de notificación cuando se reciba una comunicación.
What should happen after the customer submits the form.
Show child attributes
La acción a tomar después de enviar. La acción predeterminada es mostrar un mensaje de agradecimiento.
redirect_url, thank_you El texto de agradecimiento o la página a la que se redirigirá.
Decidir si los campos de contactos se rellenan previamente con información conocida cuando un contacto vuelve a tu sitio.
Decidir si CAPTCHA (prevención de spam) está activado.
Options for styling the form.
Show child attributes
Decidir si el formulario se mostrará como HTML sin formato en lugar de dentro de un iFrame.
Styling options for the form
Show child attributes
center, left, right El texto que aparece en el botón de envío del formulario.
El tema utilizado para dar estilo a los campos de entrada. Esto no se aplicará si el formulario se añade a una página CMS de HubSpot.
canvas, default_style, legacy, linear, round, sharp