APIs & Integrations

hiltonrrn
Participant

Create contact associated with a deal in one request through API

Hi there,

I don't know if make sense to you guys, but I'm wondering if there's a way to Hubspot create a new contact, a new deal associated with this new contact through only one request, for example, using the submit form data method (https://developers.hubspot.com/docs/methods/forms/submit_form).

The idea is push the deal information combined with the
contact array and send it to Hubspot. And it would create the association automatically.

Anyone knows if there simple a way to do this, without the back and forth of contact and deal ID's? Or it is necessary create the new contact first, and then get the contact ID, and then create a new deal, and get the deal ID and finally, associated a contact with a deal through the endpoint?

Cheers,

0 Upvotes
2 Replies 2
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Create contact associated with a deal in one request through API

Hi @hiltonrrn,

It's not possible to create both objects and an association in a single request. You're correct that a request to create each object, and one to create the association, is currently required for two brand new objects. Going forward, the team is looking to increase the batch create/update/associate functionality of the API to mitigate this issue.

0 Upvotes
hiltonrrn
Participant

Create contact associated with a deal in one request through API

Thanks @Derek_Gervais! I'll keep up with the Hubspot news.

0 Upvotes