GET
/
marketing
/
v3
/
forms
/
Obtenez une liste de formulaires
curl --request GET \
  --url https://api.hubapi.com/marketing/v3/forms/ \
  --header 'Authorization: Bearer <token>'
{
  "results": [
    {
      "id": "b6336282-50ec-465e-894e-e368146fa25f",
      "name": "Contact us",
      "createdAt": "2020-09-22T05:15:12.311Z",
      "updatedAt": "2020-09-22T05:15:35.361Z",
      "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"
            }
          ]
        },
        {
          "groupType": "default",
          "richTextType": "text",
          "fields": [
            {
              "objectTypeId": "0-1",
              "name": "lastname",
              "label": "Last name",
              "required": false,
              "hidden": false,
              "fieldType": "single_line_text"
            }
          ]
        },
        {
          "groupType": "default",
          "richTextType": "text",
          "fields": [
            {
              "objectTypeId": "0-1",
              "name": "message",
              "label": "Message",
              "required": false,
              "hidden": false,
              "fieldType": "multi_line_text"
            }
          ]
        }
      ],
      "configuration": {
        "language": "en",
        "cloneable": true,
        "postSubmitAction": {
          "type": "thank_you",
          "value": "Thanks for submitting the form."
        },
        "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"
    },
    {
      "id": "c7cd13be-3024-4bc8-8582-4a87678b5acc",
      "name": "Pop-up form: Sign up now popup",
      "formType": "flow",
      "createdAt": "2020-09-22T05:19:42.276Z",
      "updatedAt": "2020-09-22T05:20:29.356Z",
      "archived": false
    },
    {
      "id": "ad4497f3-b80a-4369-a7d0-cade0e4c202d",
      "name": "Collected form: .visitorRegistration",
      "formType": "captured",
      "createdAt": "2020-09-22T05:18:40.533Z",
      "updatedAt": "2020-09-22T05:18:40.533Z",
      "archived": false
    }
  ],
  "paging": {
    "next": {
      "after": "Mw%3D%3D",
      "link": "https://api.hubspot.com/marketing/v3/forms?portalId=103268800&limit=3&formTypes=ALL&hs_static_app=api-goggles&hs_static_app_version=1.4854&after=Mw%3D%3D"
    }
  }
}
Produits pris en charge
Exige l'un des produits suivants ou un produit supérieur.
Marketing HubMarketing HubGratuit
Sales HubSales HubGratuit
Service HubService HubGratuit
Content HubContent HubStarter

Portées requises

Cette API requiert l’une des portées suivantes :
  • forms

Authorizations

Authorization
string
header
required

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

Query Parameters

after
string

Le jeton de curseur de pagination de la dernière ressource lue avec succès sera renvoyé en tant que propriété JSON paging.next.after d'une réponse paginée contenant plus de résultats.

limit
integer

Le nombre maximum de résultats à afficher par page.

archived
boolean

S'il faut renvoyer uniquement les résultats qui ont été archivés.

formTypes
enum<string>[]

Les types de formulaires à inclure dans les résultats.

Response

200
application/json

successful operation

The response is of type object.