# Object didn't pass validation for format organization-name

**URL:** <https://community.auth0.com/t/object-didnt-pass-validation-for-format-organization-name/117417>\
**Category:** Get Help\
**Tags:** organizations-management-api, management-api\
**Created:** [September 29, 2023, 3:07pm UTC](https://community.auth0.com/t/object-didnt-pass-validation-for-format-organization-name/117417 "2023-09-29T15:07:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FrankDurdin](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@FrankDurdin](https://community.auth0.com/u/FrankDurdin)\
**Post date:** [September 29, 2023, 3:07pm UTC](https://community.auth0.com/t/object-didnt-pass-validation-for-format-organization-name/117417/1 "2023-09-29T15:07:13Z")

</div>

I am attempting to create an organization using the ManagementAPIv2 from my local machine. I have attempted it in both NodeJs and Curl for testing. Both of which provided the same outcome.

Every time I try to create an organization I am returned with the following error message (From NodeJS, but the same message on Curl);

```auto
statusCode: 400,
[start:dev] error: 'Bad Request',
[start:dev] message: "Payload validation error: 'Object didn't pass validation for format organization-name: ORG_NAME' on property name (The name of this organization).",
[start:dev] errorCode: 'invalid_body'

```

The API does have the proper permissions associated with its token, and It returns other pieces of information just fine like an authentication token. I assume it has something to do with the formatting of my request but as per the docs everything is in line and I have used the bare minimum requirements for creation. My code is as follows (Removing sensitive tokens and addresses);

```auto
curl --request POST \
  --url https://XXXXXXX/api/v2/organizations \
  --header 'authorization: Bearer XXXXXX' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{ "name": "testingName" }'

```

(Use Various names as well; Testing Name, testingname, testingName, abc, etc.)

If anyone can help point me in the right direction it would be greatly appreciated, thank you!

 ![Screenshot 2023-09-29 at 10.59.24 AM](https://global.discourse-cdn.com/auth0/original/3X/0/e/0e4b4ff1cfbb7461163209420ee287d4df74bf6a.png)

---

<div class="post-metadata">

**Author:** ![sylvainf](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sylvainf/32/35478_2.png) [@sylvainf](https://community.auth0.com/u/sylvainf)\
**Post date:** [September 29, 2023, 4:24pm UTC](https://community.auth0.com/t/object-didnt-pass-validation-for-format-organization-name/117417/3 "2023-09-29T16:24:27Z")

</div>

Hi @FrankDurdin ,

I get the same error when sending names with spaces or uppercase characters. This is a human readable name but different from the “friendly name” field (in GUI or API) but once I fixed the uppercase characters and spaces in my name, it worked. You mentioned that “testingname” was not working either, did you get the exact same error?

> “Name” must only contain lowercase characters, ‘-’, and ‘\_’, and start with a letter or number

---

<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:** [September 29, 2023, 4:42pm UTC](https://community.auth0.com/t/object-didnt-pass-validation-for-format-organization-name/117417/4 "2023-09-29T16:42:19Z")

</div>

Hi @FrankDurdin,

Welcome to the Auth0 Community!

When creating an Organization, the name property must only contain lowercase characters, ‘-’, and ‘\_’, and start with a letter or number. In this case, setting “testingName” as the name is not allowed as it contains uppercase letters. See below.

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

I hope this helps!

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:** [October 13, 2023, 4:42pm UTC](https://community.auth0.com/t/object-didnt-pass-validation-for-format-organization-name/117417/5 "2023-10-13T16:42:53Z")

</div>

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