Creating contacts with form API - appending different email ids to same contact

Hi team,

We have an issue while creating contacts in Hubspot using API.

We are using the following API to create contact,

METHOD - POST

URL - https://forms.hubspot.com/uploads/form/v2/${portalId}/${formId}

Payload -

{value_txt:"radio=a&checkbox=&email=a@gmail.com&hs_context={“hutk”:“1b3566fejsk36ba41efff7c22cc3”,“ipAddress”:null,“pageUrl”:“https://example.domain.com/s/test/ytt",“pageName”:"test”}}

Here, in payload, if we make two API calls passing the same hutk with different email ids then email ids get appended for the same contact as an additional email. Previously it used to work fine.

If we do not pass the hutk, then two different contacts are created as expected.

Hi @SurveySparrow ,

The HUTK cookie is used to identify an user. So HubSpot assumes that if the same HUTK value is passed, that it is still the same user but using a different email address.

This can be overwritten, as described in this post, but I would advise against it as it also disables the tracking data.