HubSpot Developer Changelog

Update to Forms API v3 and the lifecycle stage

Written by David Adams | Dec 12, 2023 6:00:06 PM

This post serves as an update to the previous post on the lifecycle stage in forms. This post covers the details for the Forms API v3, which were missing from the previous post.

 

What's changing?

In order to set the lifecycle stage using the Forms v3 API, you must include a lifecycleStages field inside the configuration details:

"configuration" : { "lifecycleStages" : [ { "objectTypeId" : "0-1", "value" : "subscriber" }, { "objectTypeId" : "0-2", "value" : "subscriber" } ] }

You will need to include the stage for both contact ("objectTypeId" : "0-1") and company ("objectTypeId" : "0-2") to set the default lifecycle stage for the form. Including one object type without the other, or providing an invalid stage for either object, will result in the request failing with a "VALIDATION_ERROR" error category.

As with the v2 changes, you can no longer include a lifecyclestage field in the form definition or you will get an error. Existing forms that currently have the lifecyclestage field will not be modified, but cannot be updated without removing that field.

This change is already live for the Forms v3 API. If you're currently working with the lifecycle stage using the v3 API, you will need to update your integration to use the new lifecycleStages setting in configuration.

If you have any questions, please let us know in the original community thread.