---
title: "POST /accounts/user/role/update/"
method: POST
path: "/accounts/user/role/update/"
tags: ["accounts"]
---

# POST /accounts/user/role/update/

`POST /accounts/user/role/update/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/accounts/user/role/update/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Update user role at organization or workspace level

## Request body

- UserRoleUpdate
  - `user_id` string, uuid, required
  - `new_role` 'Owner' | 'Admin' | 'Member' | 'Viewer' | 'workspace_admin' | 'workspace_member' | 'workspace_viewer', required
  - `workspace_id` string, uuid, nullable

## Response `200`

OK

- UserRoleUpdateResponse
  - `status` boolean, required
  - `result` UserRoleUpdateResult, required
    - `message` string, required
    - `user_id` string, uuid, required
    - `new_role` string, required
    - `workspace_role` string, nullable
    - `workspace` string, nullable
    - `level` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
