API reference
//
Give a person a role
Assigns one person the role named in the URL. A 201 carries no body - read the role's members afterwards if you need the resulting record.
A person may hold only one role per account. Naming someone who already holds one is refused with a 400 and a message saying so, and the way to move them is to remove the existing assignment first. A 400 is also what you get when user_id is missing altogether.
The person has to belong to the same account as the role, and an administrator cannot assign a role to themselves.
Security
default
- Mock serverhttps://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/account/role/{role_id}/user
- Your Rosterfy accounthttps://example.rosterfy.com/api/v2/account/role/{role_id}/user
curl -i -X POST \
'https://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/account/role/{role_id}/user' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Rosterfy-Platform: admin' \
-d '{
"user_id": 23453473
}'