put
https://{subdomain}.td.commpeak.com/api/roles/
Update a user role and, optionally, the set of users assigned to it. Send the role id in the path.
When to use. Rename a role, change its level or two-factor type, or reassign which users belong to it.
Request body. Send only the fields you want to change.
name(string): Role name.level(integer): Role level.twofa_type(string): Two-factor authentication type for the role.userIds(array of integers): The complete set of user IDs that should belong to the role. The assignment is rewritten to match this list: users not in it are removed and new ones are added. Omit it to leave the current assignments unchanged.
Returns. { "role": <role> }, the updated role including its current userIds. Returns 404 if the role does not exist.
Example.
PUT /api/roles/9
{ "name": "Team lead", "level": 900, "twofa_type": "default", "userIds": [1, 2, 3] }
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…