# Sometimes get 201 while creating user

**URL:** <https://community.auth0.com/t/sometimes-get-201-while-creating-user/81697>\
**Category:** Get Help\
**Tags:** create-user\
**Created:** [April 13, 2022, 3:45pm UTC](https://community.auth0.com/t/sometimes-get-201-while-creating-user/81697 "2022-04-13T15:45:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kchauhan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kchauhan/32/36577_2.png) [@kchauhan](https://community.auth0.com/u/kchauhan)\
**Post date:** [April 13, 2022, 3:45pm UTC](https://community.auth0.com/t/sometimes-get-201-while-creating-user/81697/1 "2022-04-13T15:45:30Z")

</div>

While creating user on post “api/v2/users”, sometimes returns 201 instead of 200 response. Looking for answers regarding when is the 201 response returned vs 200 during user creation.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [April 13, 2022, 6:09pm UTC](https://community.auth0.com/t/sometimes-get-201-while-creating-user/81697/4 "2022-04-13T18:09:39Z")

</div>

Hi @kchauhan ,

Welcome to the Auth0 Community!

`While creating user on post “api/v2/users”, sometimes returns 201 instead of 200 response. Looking for answers regarding when is the 201 response returned vs 200 during user creation.`

The following two articles talk about the difference between response codes 200 OK and 201 Created.

> **[200 OK - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200)**
>
> The HTTP 200 OK success status response code indicates that the request has succeeded. A 200 response is cacheable by default.

> **[201 Created - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201)**
>
> The HTTP 201 Created success status response code indicates that the request has
> succeeded and has led to the creation of a resource. The new resource, or a description
> and link to the new resource, is effectively created before the response is...

[The Auth0 Management API doc](https://auth0.com/docs/api/management/v2#!/Users/post_users) also mentioned that if successfully, 201 will be returned. I tested this on my end and only see the response code 201. So I believe that this POST endpoint should return 201 instead of 200.

On the dashboard → Monitoring → Logs, we can check the return code. If you remember any users were created with a return code of 200, please let us know and we will check this further.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 22, 2022, 9:26am UTC](https://community.auth0.com/t/sometimes-get-201-while-creating-user/81697/5 "2022-12-22T09:26:40Z")

</div>


