POST User sessions & access
Set a user role
Change the role stored on a user.
Change the role stored on a user.
Use a trusted backend API token, or an authorized administrator user token. In applications that share a user pool, the stored role applies across that pool.
Request
Parameters
Values in the path and query string.
appid path string TalkLabs ID required
The application the user belongs to.
Example:your-app-id userid path string customer-defined required
The user whose role is being changed.
Example:u-8842 Request
JSON body
Send as application/json.
role string required
Required "user", "moderator", or "admin". Fail closed: anything else is a 400.
Request example
{
"role": "<role>"
} Response
Status codes
Every JSON response uses the API result envelope.
200 OK ApiResult 400 Bad Request ApiResult 403 Forbidden ApiResult 404 Not Found ApiResult 500 Internal Server Error ApiResult