# Error When Posting Deals via API

**URL:** <https://community.hubspot.com/t/error-when-posting-deals-via-api/12714>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [February 1, 2019, 1:21pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714 "2019-02-01T13:21:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron10XCG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aaron10xcg/32/38459_2.png) [@Aaron10XCG](https://community.hubspot.com/u/Aaron10XCG)\
**Post date:** [February 1, 2019, 1:21pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/1 "2019-02-01T13:21:56Z")

</div>

This is my first HubSpot integration. I am working on a integration an ERP application with HubSpot for a client and am having some issues with uploading deals. Here is the error I get:

{“validationResults”:[{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”}],“status”:“error”,“message”:“Property values were not valid”,“correlationId”:“f2f9a04c-1e3d-4342-b3e4-319c9d96a689”,“requestId”:“4aee1cf82efebd317d92e594bd051f0f”}

Any feedback to get me moving would be much appreciated.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [February 1, 2019, 5:17pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/2 "2019-02-01T17:17:28Z")

</div>

Welcome, @Aaron10XCG.

Happy to help. To troubleshoot effectively, though, I’ll need a bit more information. Would you share:

1. Confirm whether your client account is **2495654**.
2. The full request URL you used, including the method.
3. The raw request body, including the headers.

The error you shared suggests you are trying to pass values for properties which do not yet exist in the client account. I can cross-reference your payload with the properties in that account. If this is indeed the issue, you may first need to create those properties manually or via the [Deal Properties API](https://developers.hubspot.com/docs/methods/deals/create_deal_property).

---

<div class="post-metadata">

**Author:** ![koseto](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/koseto/32/18373_2.png) [@koseto](https://community.hubspot.com/u/koseto)\
**Post date:** [February 4, 2019, 1:57pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/3 "2019-02-04T13:57:33Z")

</div>

Thank you for replying,  
I am uisng the online sample: [https://developers.hubspot.com/docs/methods/deals/create\_deal](https://developers.hubspot.com/docs/methods/deals/create_deal)  
Here is the raw conversation:  
Request:

POST [http://api.hubapi.com/deals/v1/deal?hapikey=demo](http://api.hubapi.com/deals/v1/deal?hapikey=bef84ce8-ca77-419c-9181-89e0a87ef657) HTTP/1.1  
User-Agent: EssEtlProcess  
Content-Type: application/json  
Host: [api.hubapi.com](http://api.hubapi.com)  
Content-Length: 416  
Expect: 100-continue  
Connection: Keep-Alive

{“associations”:{“associatedCompanyIds”:[8954037],“associatedVids”:[27136]},“properties”:[{“property”:“dealname”,“value”:“Tim’s Newer Deal”},{“property”:“dealstage”,“value”:“appointmentscheduled”},{“property”:“pipeline”,“value”:“default”},{“property”:“hubspot\_owner\_id”,“value”:“24”},{“property”:“closedate”,“value”:1409443200000},{“property”:“amount”,“value”:“60000”},{“property”:“dealtype”,“value”:“newbusiness”}]}  
Response:

HTTP/1.1 400 Bad Request  
Date: Mon, 04 Feb 2019 13:56:17 GMT  
Content-Type: application/json;charset=utf-8  
Content-Length: 892  
Connection: keep-alive  
Set-Cookie: \_\_cfduid=d7300a715b67238480a683ed576a3b3511549288577; expires=Tue, 04-Feb-20 13:56:17 GMT; path=/; [domain=.hubapi.com](http://domain=.hubapi.com); HttpOnly  
X-Trace: 2B99B15F1C93BE77BCCA127EA919AB0DE957A83566000000000000000000  
X-HubSpot-RateLimit-Daily: 40000  
X-HubSpot-RateLimit-Daily-Remaining: 39998  
X-HubSpot-RateLimit-Secondly: 10  
X-HubSpot-RateLimit-Secondly-Remaining: 9  
Access-Control-Allow-Credentials: false  
Server: cloudflare  
CF-RAY: 4a3da3cb789e8291-ATL

{“validationResults”:[{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”}],“status”:“error”,“message”:“Property values were not valid”,“correlationId”:“b93165d3-f2f9-44f0-82fa-d1f2ae76279e”,“requestId”:“0e1977b47d73c6fe347e2f5fbed801f8”}

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [February 4, 2019, 7:15pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/4 "2019-02-04T19:15:09Z")

</div>

Thank you for clarifying, @koseto.

The issue is that some of the property values you are trying to pass do not exist in the demo account. Any developer can access and manipulate the data in that account and, to be frank, many of the examples no longer work. As such, it’s no longer the best way to test HubSpot APIs.

Instead, I recommend [creating a test account](https://developers.hubspot.com/docs/faq/how-do-i-create-a-test-account) in your developer account and using the test account’s API key. That way, only you have access to the account and can customize the properties to fit your testing needs.

Apologies for the inconvenience. Please let me know if I can clarify further.

---

<div class="post-metadata">

**Author:** ![Aaron10XCG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aaron10xcg/32/38459_2.png) [@Aaron10XCG](https://community.hubspot.com/u/Aaron10XCG)\
**Post date:** [February 4, 2019, 4:43pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/5 "2019-02-04T16:43:08Z")

</div>

Account Number is **4071983**. I have been able to upload files manually so I know the fields should be there, but perhaps there are some slight variations in the names we need to review.

Here is the sample “Create Deal” from the Hubspot dev documentation:

[https://developers.hubspot.com/docs/methods/deals/create\_deal](https://developers.hubspot.com/docs/methods/deals/create_deal)

Request:

POST [http://api.hubapi.com/deals/v1/deal?hapikey=demo](http://api.hubapi.com/deals/v1/deal?hapikey=demo) HTTP/1.1

User-Agent: EssEtlProcess

Content-Type: application/json

Host: [api.hubapi.com](http://api.hubapi.com/)

Content-Length: 284

Expect: 100-continue

Connection: Keep-Alive

{“associations”:{“associatedCompanyIds”:[8954037],“associatedVids”:[27136]},“properties”:[{“property”:“dealname”,“value”:“Tim’s Newer Deal2”},{“property”:“dealstage”,“value”:“appointmentscheduled”},{“property”:“closedate”,“value”:1546267648544},{“property”:“amount”,“value”:“60000”}]}

Response:

HTTP/1.1 400 Bad Request

Date: Mon, 04 Feb 2019 16:35:00 GMT

Content-Type: application/json;charset=utf-8

Content-Length: 589

Connection: keep-alive

Set-Cookie: \_\_cfduid=d98588cec38a915f7588e31f1d4d2ea421549298100; expires=Tue, 04-Feb-20 16:35:00 GMT; path=/; domain=.[hubapi.com](http://hubapi.com/); HttpOnly

X-Trace: 2B12F68966FBC351C60940AAFFDC5AA4D55EFF1616000000000000000000

X-HubSpot-RateLimit-Daily: 160000

X-HubSpot-RateLimit-Daily-Remaining: 18049

X-HubSpot-RateLimit-Secondly: 60

X-HubSpot-RateLimit-Secondly-Remaining: 57

Access-Control-Allow-Credentials: false

Server: cloudflare

CF-RAY: 4a3e8c45db79b9ca-ATL

{“validationResults”:[{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”}],“status”:“error”,“message”:“Property values were not valid”,“correlationId”:“99fb1dc3-bf8d-4698-b0b1-ea873ef18cc9”,“requestId”:“35c1aa6f4e377de4b0f8acb89b6bc2de”}

---

<div class="post-metadata">

**Author:** ![Aaron10XCG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aaron10xcg/32/38459_2.png) [@Aaron10XCG](https://community.hubspot.com/u/Aaron10XCG)\
**Post date:** [February 4, 2019, 7:16pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/6 "2019-02-04T19:16:03Z")

</div>

The account number is **407183**.

I am uisng the online sample: [https://developers.hubspot.com/docs/methods/deals/create\_deal](https://developers.hubspot.com/docs/methods/deals/create_deal)  
Here is the raw conversation:  
Request:  
POST [http://api.hubapi.com/deals/v1/deal?hapikey=demo](http://api.hubapi.com/deals/v1/deal?hapikey=demo) HTTP/1.1  
User-Agent: EssEtlProcess  
Content-Type: application/json  
Host: [api.hubapi.com](http://api.hubapi.com)  
Content-Length: 416  
Expect: 100-continue  
Connection: Keep-Alive  
{“associations”:{“associatedCompanyIds”:[8954037],“associatedVids”:[27136]},“properties”:[{“property”:“dealname”,“value”:“Tim’s Newer Deal”},{“property”:“dealstage”,“value”:“appointmentscheduled”},{“property”:“pipeline”,“value”:“default”},{“property”:“hubspot\_owner\_id”,“value”:“24”},{“property”:“closedate”,“value”:1409443200000},{“property”:“amount”,“value”:“60000”},{“property”:“dealtype”,“value”:“newbusiness”}]}  
Response:  
HTTP/1.1 400 Bad Request  
Date: Mon, 04 Feb 2019 13:56:17 GMT  
Content-Type: application/json;charset=utf-8  
Content-Length: 892  
Connection: keep-alive  
Set-Cookie: \_\_cfduid=d7300a715b67238480a683ed576a3b3511549288577; expires=Tue, 04-Feb-20 13:56:17 GMT; path=/; [domain=.hubapi.com](http://domain=.hubapi.com); HttpOnly  
X-Trace: 2B99B15F1C93BE77BCCA127EA919AB0DE957A83566000000000000000000  
X-HubSpot-RateLimit-Daily: 40000  
X-HubSpot-RateLimit-Daily-Remaining: 39998  
X-HubSpot-RateLimit-Secondly: 10  
X-HubSpot-RateLimit-Secondly-Remaining: 9  
Access-Control-Allow-Credentials: false  
Server: cloudflare  
CF-RAY: 4a3da3cb789e8291-ATL  
{“validationResults”:[{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”}],“status”:“error”,“message”:"Property values were not

valid",“correlationId”:“b93165d3-f2f9-44f0-82fa-d1f2ae76279e”,“requestId”:“0e1977b47d73c6fe347e2f5fbed801f8”}

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [February 4, 2019, 7:22pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/7 "2019-02-04T19:22:02Z")

</div>

Hi, @Aaron10XCG.

Account **407183** was deactivated in 2014, so it’s not possible to use that account.

Furthermore, it’s the API key that matters, so if you are using `hapikey=demo`, then your calls are going to the demo account, which is different than **407183**.

---

<div class="post-metadata">

**Author:** ![Aaron10XCG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aaron10xcg/32/38459_2.png) [@Aaron10XCG](https://community.hubspot.com/u/Aaron10XCG)\
**Post date:** [February 4, 2019, 7:26pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/8 "2019-02-04T19:26:45Z")

</div>

Sorry about that, missed a number. 4071983.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [February 4, 2019, 7:39pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/9 "2019-02-04T19:39:09Z")

</div>

Thanks, @Aaron10XCG.

I was able to create [this test deal](https://app.hubspot.com/contacts/4071983/deal/505114725/?interaction=note) with the following data:

```auto
{
 "associations": {
 "associatedCompanyIds": [],
 "associatedVids": []
 },
 "properties": [
 {
 "value": "Developer Support Test Deal",
 "name": "dealname"
 },
 {
 "value": "appointmentscheduled",
 "name": "dealstage"
 },
 {
 "value": "default",
 "name": "pipeline"
 },
 {
 "value": "123",
 "name": "amount"
 }
 ]
}

```

While the test data in our documentation is a great place to start, I generally don’t recommend pasting it _directly_ into requests. Values for properties can differ widely between accounts and the example values often throw errors.

For example, account **4071983** does not have a `newbusiness` option for the `dealtype` property (seen [here](https://app.hubspot.com/property-settings/4071983/deal/dealtype)), so your request would fail for that reason alone.

---

<div class="post-metadata">

**Author:** ![Aaron10XCG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aaron10xcg/32/38459_2.png) [@Aaron10XCG](https://community.hubspot.com/u/Aaron10XCG)\
**Post date:** [February 4, 2019, 3:36pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/10 "2019-02-04T15:36:32Z")

</div>

The account number we are using is 4071983. Exact method and error is from koseto, who is also working on this project.

Here is the what we are trying:

POST [http://api.hubapi.com/deals/v1/deal?hapikey=demo](http://api.hubapi.com/deals/v1/deal?hapikey=demo) HTTP/1.1

User-Agent: EssEtlProcess

Content-Type: application/json

Host: [api.hubapi.com](http://api.hubapi.com)

Content-Length: 284

Expect: 100-continue

Connection: Keep-Alive

{“associations”:{“associatedCompanyIds”:[8954037],“associatedVids”:[27136]},“properties”:[{“property”:“dealname”,“value”:“Tim’s Newer Deal2”},{“property”:“dealstage”,“value”:“appointmentscheduled”},{“property”:“closedate”,“value”:1546267648544},{“property”:“amount”,“value”:“60000”}]}

Response:

HTTP/1.1 400 Bad Request

Date: Mon, 04 Feb 2019 16:35:00 GMT

Content-Type: application/json;charset=utf-8

Content-Length: 589

Connection: keep-alive

Set-Cookie: \_\_cfduid=d98588cec38a915f7588e31f1d4d2ea421549298100; expires=Tue, 04-Feb-20 16:35:00 GMT; path=/; [domain=.hubapi.com](http://domain=.hubapi.com); HttpOnly

X-Trace: 2B12F68966FBC351C60940AAFFDC5AA4D55EFF1616000000000000000000

X-HubSpot-RateLimit-Daily: 160000

X-HubSpot-RateLimit-Daily-Remaining: 18049

X-HubSpot-RateLimit-Secondly: 60

X-HubSpot-RateLimit-Secondly-Remaining: 57

Access-Control-Allow-Credentials: false

Server: cloudflare

CF-RAY: 4a3e8c45db79b9ca-ATL

{“validationResults”:[{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”},{“isValid”:false,“message”:“Property \”\" does not exist",“error”:“PROPERTY\_DOESNT\_EXIST”,“name”:“”}],“status”:“error”,“message”:“Property values were not valid”,“correlationId”:“99fb1dc3-bf8d-4698-b0b1-ea873ef18cc9”,“requestId”:“35c1aa6f4e377de4b0f8acb89b6bc2de”}

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [March 15, 2019, 1:41pm UTC](https://community.hubspot.com/t/error-when-posting-deals-via-api/12714/11 "2019-03-15T13:41:14Z")

</div>

Hi, @Aaron10XCG and @koseto.

Sincere apologies for the delayed response.

To be transparent, I missed your reply. This is partially because I was not tagged in any of the posts. It’s really easy for these kinds of replies to fall through the cracks, so please tag me in future messages with @IsaacTakushi.

I’m not sure if you’re still unable to create deals, but I’m now seeing one issue that did not jump out to me before.

You are attempting to pass deal property values with the `property` and `value` fields when the [Deals API](https://developers.hubspot.com/docs/methods/deals/create_deal) only accepts `name` and `value` pairs. Even if your internal deal property names were correct, placing them in a `property` field would throw a `400` error.
