APIs & Integrations

Not applicable

Create deals by API

Hi, when send info to create deal by API, return null, without any errors.

0 Upvotes
5 Replies 5
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Create deals by API

Hi @lugzweb,

Can you send your headers? Are you setting Content Type: application/json? Deals also requires access to the CRM; does the portal you’re trying to create a deal in have access to the CRM?

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Create deals by API

Hi @lugzweb,

That endpoint is intended for pulling a deal record (GET) or updating an existing deal record (PUT). If you’re looking to create a new deal record, you should send a POST request to: https://api.hubapi.com/deals/v1/deal/:id

0 Upvotes
Not applicable

Create deals by API

I send POST request by curl to this endpoint https://api.hubapi.com/deals/v1/deal?hapikey=key, but also result is null without any errors, maybe problem is in account settings?

0 Upvotes
Not applicable

Create deals by API

I send to endpoint
"https://api.hubapi.com/deals/v1/deal/$id?hapikey=$key"

params are json string
{
“associations”: {
“associatedVids”: [
33333
]
},
“properties”: [
{
“value”: “Test name”,
“name”: “dealname”
},
{
“value”: “qualifiedtobuy”,
“name”: “dealstage”
},
{
“value”: “default”,
“name”: “pipeline”
},
{
“value”: “24”,
“name”: “hubspot_owner_id”
}
]
}

and response is null

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Create deals by API

Hi @lugzweb,

Creating a deal using the Create a Deal endpoint should return a 200 response code and the deal details. Can you give me some info on the request you’re making and the response you’re seeing?

Create a Deal | Deals API

POST /deals/v1/deal/ - For a given portal, create a deal. This is particularly useful if you're integrating with a CRM or another application that has a similar notion of a deal. Note that you can create associations between Deals and Contacts and...

0 Upvotes