API bug? Spaces not allowed in user/profile/organization?

Am I missing documentation that would explain why spaces would not be allowed in the organization field when creating a user with the Users API?

Using CreateUserWithPassword in curl I am entirely successful when there are no spaces in the organization field of the json like this:


But when I use this:

{"profile":{"email":"help@me.com","login":"help@me.com","firstName":"Firstname","lastName":"Lastname","organization":"My Company LLC"},"credentials":{"password":{"value":"mypassword"},"recovery_question":{"question":"something","answer":"different"}}}

…I get scolded with a

{"errorCode":"E0000003","errorSummary":"The request body was not well-formed.","errorLink":"E0000003","errorId":"oaehWVoh6c5Rs2VSOV2sh0GiQ","errorCauses":[]}

Are there other fields where this “rule” applies? Are there other “rules” I won’t find out until I get deeper into a database import?

Update: Here’s another. What the heck? How many unwritten rules am I going to find out about in this process, and who cares if I leave the first and last names blank in the API? Prince can’t have an account?

"errorCauses":[{"errorSummary":"firstName: The field cannot be left blank"},{"errorSummary":"lastName: The field cannot be left blank"}

For some fields, look at the profile editor in the admin console. It will tell you - for example - that the firstName and lastName attributes are REQUIRED. (You can change this requirement using the admin console).

Can’t comment on the organization issue.

[EDIT] PS: Perhaps using the schemas API will help you determine in advance what input validation might be required? https://developer.okta.com/docs/reference/api/schemas/