I am trying to POST a user via API, but I am receiving a 422 Error (Semantic Error, meaning the request is syntactically correct) from the API. This only happens with the POST request for the User. I am able to GET Users via API, but unable to POST a new user. Here is the endpoint I am using: Users - Canvas LMS REST API Documentation.
I have verified that I have the correct scopes and that my auth token is not expired.
I am using Postman to test this request, and it generated this cURL:
curl --location --request POST 'https://<org-url>/api/v1/accounts/1/user' \
--header 'Authorization: Bearer: <access-token>' \
--header 'Content-Type: application/json' \
--header 'Content-Type: text/plain' \
"name": "System Test",
"sortable_name": "Test, System",
I would greatly appreciate some direction for solving this. Thanks!
Hey @kurt4 ,
I didn't test it, but I think your Post link has to end in users (plural) instead of user. I believe that would cause a 422 unprocessable error.
curl --location --request POST 'https://<org-url>/api/v1/accounts/1/users'