# Problem Creating Deal via API

**URL:** <https://community.hubspot.com/t/problem-creating-deal-via-api/18716>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [February 11, 2020, 6:59pm UTC](https://community.hubspot.com/t/problem-creating-deal-via-api/18716 "2020-02-11T18:59:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lchandler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lchandler/32/81360_2.png) [@lchandler](https://community.hubspot.com/u/lchandler)\
**Post date:** [February 11, 2020, 6:59pm UTC](https://community.hubspot.com/t/problem-creating-deal-via-api/18716/1 "2020-02-11T18:59:21Z")

</div>

Hello Hubspot Community,

I’m running into an issue when trying to create a new deal via the Deals API.

I’m making a post to [https://api.hubapi.com/deals/v1/deal?hapikey=my\_key\_here](https://api.hubapi.com/deals/v1/deal?hapikey=my_key_here) containing the following data:

{‘properties’: [{‘value’: ‘description here’, ‘name’: ‘description’}, {‘value’: ‘test - New Inquiry’, ‘name’: ‘dealname’}, {‘value’: ‘appointmentscheduled’, ‘name’: ‘dealstage’}, {‘value’: None, ‘name’: ‘hubspot\_owner\_id’}, {‘value’: None, ‘name’: ‘pipeline’}]}

and receiving a 200 response. The response contains a dealId, but when I go to [app.hubspot.com](http://app.hubspot.com) to view deals (which I’m accessing via the Sales menu dropdown), the new deal does not show up in the list, and can’t be found by searching either deal name or deal ID.

I’ve made sure the POST content-type is correct; there are no associationCreateFailures being returned in the response. Any help figuring out where this is going wrong would be much appreciated.

Thanks!

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [February 12, 2020, 2:34am UTC](https://community.hubspot.com/t/problem-creating-deal-via-api/18716/2 "2020-02-12T02:34:21Z")

</div>

Hey @lchandler,

That’s strange. In order for me to troubleshoot this, do you mind sharing with me the following:

1. The portal ID that you’re attempting to create a deal on

2. The 200 response body that you received (which would include the portal Id and the deal Id)

---

<div class="post-metadata">

**Author:** ![lchandler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lchandler/32/81360_2.png) [@lchandler](https://community.hubspot.com/u/lchandler)\
**Post date:** [February 12, 2020, 6:12pm UTC](https://community.hubspot.com/t/problem-creating-deal-via-api/18716/3 "2020-02-12T18:12:05Z")

</div>

@WendyGoh

I actually just discovered the problem - our key got changed somehow, ha. Everything’s working now; case closed.

Thank you for getting back to me, though!
