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);
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);
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!