The create a deal endpoint is used to create and track deals in HubSpot. It also allows you to connect HubSpot with an external CRM or other sales management software.
What's a use case for this endpoint? Your company uses HubSpot along with an external CRM and website hosting platform. Your sales team uses the create a deal endpoint to make sure that certain sales activity in the CRM will automatically create a deal in HubSpot. Additionally, when a contact submits a sales qualification form on your website, this endpoint creates a deal in HubSpot.
You can (but are not required to) create associations between deals and other CRM objects the same way you would create an association between companies and contacts.
You can pass any custom property value to the Deals API as long as you create the property first.
dealstage property is required when creating a deal. It's also recommended (though not required) that you always specify the
pipeline property, especially on accounts with multiple pipelines. If left unspecified, the default pipeline is assumed. You can manage pipelines and dealstages through the CRM Pipelines API.
This endpoint returns a 200 response when a new deal is successfully created. Otherwise, you'll get a 4xx error with failure details in the response body.
If the object IDs in the
associations data are invalid, the deal will still be created and you will get a 200 response with appropriate details. However, you'll also receive the additional
associationCreateFailures field in the response, which will include details about those association failures. (See the example
associationCreateFailures to the right.)