Set a team member's role.
POST
/account/users/{user_id}/role
const url = 'https://api.siteqwality.com/account/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/role';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"role":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siteqwality.com/account/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/role \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "role": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” user_id
required
string format: uuid
Local user id
Request Body required
Section titled “Request Body required ” Media type application/json
Body for POST /account/users/{user_id}/role.
object
role
required
One of admin, member, viewer. owner is not assignable here:
ownership transfer is a separate operation.
string
Example generated
{ "role": "example"}Responses
Section titled “ Responses ”Role updated
Media type application/json
Response for the role update.
object
user_id
required
string format: uuid
role
required
string
Example generated
{ "user_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "role": "example"}Unknown role
Missing or invalid authentication
Caller is not a super admin
User not found in this account
Would leave the account with no Super Admin
Internal server error