# Management API (Create Users) Recognizes a Boolean value as Text

**URL:** <https://community.auth0.com/t/management-api-create-users-recognizes-a-boolean-value-as-text/100812>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [February 19, 2023, 3:52pm UTC](https://community.auth0.com/t/management-api-create-users-recognizes-a-boolean-value-as-text/100812 "2023-02-19T15:52:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwarner](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@rwarner](https://community.auth0.com/u/rwarner)\
**Post date:** [February 19, 2023, 3:52pm UTC](https://community.auth0.com/t/management-api-create-users-recognizes-a-boolean-value-as-text/100812/1 "2023-02-19T15:52:11Z")

</div>

I am receiving a Payload validation error but can’t seem to identify the issue. Everything looks fine from my side. I am using Xano for reference. I can successfully execute this call as a test from the Autho0 Management API docs with a production token so there is no issue there. Why doesn’t it like this value?

 ![image](https://global.discourse-cdn.com/auth0/original/3X/5/5/55d527dd43e168f77be796bbe1a755aea74c32bc.png)

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [February 21, 2023, 11:33pm UTC](https://community.auth0.com/t/management-api-create-users-recognizes-a-boolean-value-as-text/100812/3 "2023-02-21T23:33:42Z")

</div>

Hi @rwarner,

Thanks for reaching out to the Auth0 Community!

The error indicates that the request passed a string instead of a boolean:  
Actual behavior:  
`email_verified: "true"`

Expected behavior:  
`email_verified: true`

I was able to reproduce this error as well:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/f/9/f9e29e6455c8e82a8c893b0649e375612054874f.png)

With that, I recommend double-checking that your Update a user request passes a boolean value for the `email_verified` property.

I hope this helps!

Please reach out if you have any further questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![rwarner](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@rwarner](https://community.auth0.com/u/rwarner)\
**Post date:** [February 22, 2023, 2:05pm UTC](https://community.auth0.com/t/management-api-create-users-recognizes-a-boolean-value-as-text/100812/4 "2023-02-22T14:05:05Z")

</div>

Hi Rueben. I understand the error. My point is that _I am_ passing a boolean value and it is returning this error. Thoughts?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [February 22, 2023, 6:09pm UTC](https://community.auth0.com/t/management-api-create-users-recognizes-a-boolean-value-as-text/100812/5 "2023-02-22T18:09:11Z")

</div>

Hi @rwarner,

Thank you for your reply.

Could you please share with me the full request you made?

It seems that, somewhere in the code, the `true` value is not being treated as a boolean.

I look forward to your reply.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [February 22, 2023, 6:17pm UTC](https://community.auth0.com/t/management-api-create-users-recognizes-a-boolean-value-as-text/100812/6 "2023-02-22T18:17:38Z")

</div>

Hi @rwarner,

Here is also an example script I ran that worked.

Could you also please try this script and let me know if it works for you?

Take note that I used Passwordless Email as my connection.

```auto
var axios = require('axios');
var data = JSON.stringify({
  "connection": "email",
  "email": "test@example.com",
  "email_verified": true
});

var config = {
  method: 'post',
  url: 'https://{{auth0_domain}}/api/v2/users',
  headers: { 
    'Authorization': 'Bearer {{auth0_token}}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 8, 2023, 6:18pm UTC](https://community.auth0.com/t/management-api-create-users-recognizes-a-boolean-value-as-text/100812/7 "2023-03-08T18:18:24Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
