There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Enroll a contact into a workflow

Last updated May 15, 2023

POST /automation/v2/workflows/:workflowId/enrollments/contacts/:email

Note: The Workflows API currently only supports contact-based workflows.

Method Details

HTTP Methods:

POST

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Add a contact to a workflow.

You will want to use this in the event that a contact meets a set of criteria that makes enrolling them in a workflow relevant to them, for example downloading a whitepaper and then getting enrolled in a workflow that sends emails based on the content of that whitepaper.

Required Parameters How to use Description
OAuth access token or private app access token Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.
Workflow ID Used in the request URL The ID of the workflow you wish to see metadata for.
Email Address Used in the request URL The email of the contact you wish to enroll in the workflow.
Optional Parameters How to use Description
None None No optional parameters for this method.

If the request succeeds, you'll get an HTTP 204 response.