Create a new form

POST /forms/v2/forms

Method Details

HTTP Methods:

POST

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

For a given portal, create a new form in a given HubSpot portal. Forms are standard website forms that can be used to generate website leads.

For any form, there may be a set of fields groups with fields associated with that form in question. You can specify all of the fields that you'd like to be a part of any form that you're creating with this API call.

Field groups are used to group fields together in a row. All fields in the same fieldgroup will be displayed on the same row.

You should also note that you can create multiple forms with the same name - this will work fine, return 200 and allow the form to be created.

Required Parameters How to use Description
OAuth Access Token or API Key Authorization: Bearer {token} header
or hapikey={key} query parameter.
Used to authenticate the request. Please see this page for more details about authentication.
Form Data Used in the request body The data for the form that you're creating. This can include any number of data points, including fields. For an example of this data, please see the JSON code sample for POSTing and creating a new form below.
Optional Parameters How to use Description
Form Fields and Groups Used in the request body When creating a new form, you have the ability to also add some fields that you'd like to be a part of the form you're creating. Thses fields will show up in the form through the HubSpot user interface, where you can customizeyour forms further. For an example of the data structure for adding form fields to your form on creation with this method, please see the example below.

Example URL:  https://api.hubapi.com/forms/v2/forms?hapikey=demo