create_hosted_form
Define a form FormMaker hosts and embeds.
generate_form hands you code to own. This is the other option: a form FormMaker renders and
hosts, ready to drop onto any site with an embed snippet or share as a link.
You give it fields and where submissions should go — a HubSpot form (contact) or a custom-object
form you already made (object). It stores the definition and returns a formId. Nothing is written
to HubSpot until someone actually submits the rendered form; this just describes it.
The embed snippet comes from the dashboard once the form exists.
Starting from a template
Pass template (from list_form_templates) instead of fields and the form is built from that
starter set.
Matching a website's brand
Pass brandUrl and FormMaker reads that page's colours and typography and applies them as the
form's theme — so an embedded form doesn't look bolted on. Anything it can't find is left to the
widget's own defaults rather than guessed at.
Create a form FormMaker hosts and embeds
Define a form FormMaker will render and host — for an embed snippet or a share URL — and store it. Returns a formId. Submissions reuse an existing target: `contact` posts to a HubSpot form (its public submit endpoint), `object` posts to a custom-object form you already made with create_object_form. This tool adds no new submission path. Fields, labels, and theme are presentation; nothing here writes to HubSpot until someone submits the rendered form. Give `template` instead of `fields` to start from a ready-made form, and `brandUrl` to theme it to a website automatically. `steps` and `mode` control the form's shape — how it is split across screens, and whether it asks one question at a time. To change a form's title, colours or button text later without recreating it, use `update_hosted_form`.
Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | required | — |
fields | object[] | optional | The form's fields. Omit when `template` is given. |
template | string | optional | A template id from list_form_templates, e.g. "contact-us". Supplies the fields. |
brandUrl | string | optional | A public website URL. Its colours and typography are extracted and applied as the form's theme. |
steps | integer[] | optional | Split the form across steps, as field counts per step — [2, 3] puts the first two fields on step one and the next three on step two. Must account for every field. Omit for a single-page form. |
mode | "conversational" | optional | Presentation. "conversational" asks one question per screen — tappable choices instead of dropdowns, a progress bar, and keyboard control. Use it from about four questions upwards, and especially where the form qualifies someone before asking for their contact details. Below four questions a stacked form is faster to finish and converts better, so omit this. A template supplies its own; this overrides it. |
submit | object | object | required | — |