# \`upsert\` param doesn't work as expected for /api/v2/jobs/users-imports

**URL:** <https://community.auth0.com/t/upsert-param-doesnt-work-as-expected-for-api-v2-jobs-users-imports/98742>\
**Category:** Get Help\
**Tags:** jobs, management-api\
**Created:** [January 23, 2023, 8:15pm UTC](https://community.auth0.com/t/upsert-param-doesnt-work-as-expected-for-api-v2-jobs-users-imports/98742 "2023-01-23T20:15:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![di1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/di1/32/42931_2.png) [@di1](https://community.auth0.com/u/di1)\
**Post date:** [January 23, 2023, 8:15pm UTC](https://community.auth0.com/t/upsert-param-doesnt-work-as-expected-for-api-v2-jobs-users-imports/98742/1 "2023-01-23T20:15:02Z")

</div>

Hey guys,

I was playing around the [/api/v2/jobs/users-imports](https://auth0.com/docs/api/management/v2#!/Jobs/post_users_imports) and noticed an issue related to the `upsert` param.

 ![Screenshot 2023-01-23 at 12.07.06 PM](https://global.discourse-cdn.com/auth0/original/3X/6/4/6436649f4ffb9c920e65fb2a7f431bce988883b0.jpeg)

In my Python script, when I set the param `upsert: True`, I got some errors for importing “The user already exist and upsert parameter is false”. When I changed it to `upsert: "true"`, it works as expected, ignoring the existing records. I guess this param is not respected as a boolean but simply checking a string value of `"true"`.

---

<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:** [January 24, 2023, 9:01pm UTC](https://community.auth0.com/t/upsert-param-doesnt-work-as-expected-for-api-v2-jobs-users-imports/98742/3 "2023-01-24T21:01:44Z")

</div>

Hi @di1 ,

> [@di1](#):
>
> In my Python script, when I set the param `upsert: True`, I got some errors for importing “The user already exist and upsert parameter is false”. When I changed it to `upsert: "true"`, it works as expected, ignoring the existing records. I guess this param is not respected as a boolean but simply checking a string value of `"true"`.

Thank you for sharing your findings with us!

I tested your use case and believe what you said is correct. If `upsert` is set to anything else except for `'true'`, it will be evaluated as default, that is, `'upsert':'false'`.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/e/c/ec423e9fb1a0242434671dec340b2a6143574d2d.jpeg)

---

<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:** [February 6, 2023, 9:56pm UTC](https://community.auth0.com/t/upsert-param-doesnt-work-as-expected-for-api-v2-jobs-users-imports/98742/4 "2023-02-06T21:56:30Z")

</div>


