On this page
What HubSpot supports natively
| Detail (October 2026) | |
|---|---|
| API | v4 Automation API, flows endpoints, beta |
| Operations | Create (POST), read one or a batch, update (PUT), delete |
| Scope | automation; plus crm.objects.*.sensitive scopes if the workflow uses sensitive properties |
| Workflow types | CONTACT_FLOW for contact-based workflows; PLATFORM_FLOW for deals, tickets, custom objects and the rest |
| Paths | HubSpot publishes date-versioned beta paths (for example /automation/v4/2027-03-beta/flows in its current reference); copy the path from the reference you build against |
A create body includes type, objectTypeId, isEnabled, the actions list and enrollmentCriteria, and the reference schema lists further fields such as timeWindows, blockedDates and dataSources. HubSpot documents action and enrollment types in a separate reference.
How to create a workflow with the HubSpot API
- Build a model workflow in HubSpot that’s close to what you want, and GET it. Copying working action JSON is far more reliable than writing it from the schema.
- Collect what the definition references in the target portal. Properties are referenced by internal name (for example
hs_lead_status), so check each one exists there with the same internal name and option values. List, email, form, owner, pipeline and stage IDs are portal-specific and never carry over between portals. - Create dependencies first. Properties, lists and emails the workflow references must exist before you POST it. See creating a property with the API.
- POST with
isEnabled: false. Review the workflow in HubSpot, including enrollment and re-enrollment settings. - Test with one record, then turn it on.
How updates and deletes behave
- Updates are full replacements. A
PUTmust include the currentrevisionIdandtype, and anything from the earlier GET you leave out is removed. Omit an action and it’s deleted. - Stale revisions fail. If someone edits the workflow in HubSpot between your GET and PUT, fetch again.
- Deletes are permanent through the API; restoring needs HubSpot Support.
If you’re scripting this with an AI coding tool, see building HubSpot workflows with Claude Code for guardrails. To build new workflows without writing the definitions, IDs and ordering yourself, we recommend Jetstack AI Projects.
Where Jetstack AI fits
For a new workflow, use Projects. Describe the trigger, branches and actions in a brief; Jetty, the Projects assistant, turns it into a plan you approve, builds the properties and lists it depends on first, and deploys only after a separate approval. The workflow is created switched off, and the receipt confirms what HubSpot saved by reading it back. Projects is currently in limited release; see the quickstart.
When the workflow already exists somewhere, Jetstack’s CLI and API import it from the source portal with its dependencies, show what needs mapping in the target, and deploy it with the mapping you provide; see the CLI quick start. You can roll back a Portal reuse deployment: Jetstack shows you what will be removed first, then deletes the assets that deployment created in the destination portal. It won’t delete anything another deployment or Project still uses, and it skips assets that were changed after the deployment. Details are in the developer overview.
Sources
- Workflows API guide, beta (HubSpot Developers)
- Create a workflow, beta (HubSpot API reference)
- Workflow action and enrollment reference, beta (HubSpot Developers)
- CLI (Jetstack AI documentation)
Checked October 30, 2026. HubSpot changes its products often; tell us at team@jetstack.ai if something here is out of date.
API & developers
Do it from your own code or AI agent.
The Jetstack AI REST API, MCP server and CLI share API keys and scopes. Create and manage those keys in the app.
Read the developer docs