# hs\_created\_by\_user\_id is null when I create deal using api

**URL:** <https://community.hubspot.com/t/hs-created-by-user-id-is-null-when-i-create-deal-using-api/103801>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [April 1, 2024, 6:44am UTC](https://community.hubspot.com/t/hs-created-by-user-id-is-null-when-i-create-deal-using-api/103801 "2024-04-01T06:44:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASyncUser](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@ASyncUser](https://community.hubspot.com/u/ASyncUser)\
**Post date:** [April 1, 2024, 6:44am UTC](https://community.hubspot.com/t/hs-created-by-user-id-is-null-when-i-create-deal-using-api/103801/1 "2024-04-01T06:44:55Z")

</div>

When I create or Update a deal using API then hs\_created\_by\_user\_id field is coming null.  
but when I create or Update through UI it is coming in resonse who created or updated that field.  
How should I get this through API??

Created through API

 ![ASyncUser_0-1711953811968.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/3/c330515f507045de17597c82c97ef156905b47ed.png)

Created through UI

 ![ASyncUser_1-1711953865286.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/4/b4b6f0494cb28a778abaccaffb70f32f23634309.png)

---

<div class="post-metadata">

**Author:** ![ChrisMagtoto](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@ChrisMagtoto](https://community.hubspot.com/u/ChrisMagtoto)\
**Post date:** [April 1, 2024, 8:39am UTC](https://community.hubspot.com/t/hs-created-by-user-id-is-null-when-i-create-deal-using-api/103801/2 "2024-04-01T08:39:48Z")

</div>

Hey, you are creating the the deal THROUGH the API and not through a user which explain why it’s null. What you can do is reference the source of the deal with “hs\_object\_source\_detail\_1” or “hs\_object\_source” to identify if it was created through the API.

---

<div class="post-metadata">

**Author:** ![ASyncUser](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@ASyncUser](https://community.hubspot.com/u/ASyncUser)\
**Post date:** [April 1, 2024, 1:11pm UTC](https://community.hubspot.com/t/hs-created-by-user-id-is-null-when-i-create-deal-using-api/103801/3 "2024-04-01T13:11:47Z")

</div>

I want a Id of user or Owner who created that deal

---

<div class="post-metadata">

**Author:** ![ChrisMagtoto](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@ChrisMagtoto](https://community.hubspot.com/u/ChrisMagtoto)\
**Post date:** [April 1, 2024, 1:20pm UTC](https://community.hubspot.com/t/hs-created-by-user-id-is-null-when-i-create-deal-using-api/103801/4 "2024-04-01T13:20:37Z")

</div>

It will only be filled if you create the deal using a user not with the API because API is not a user.
