# Replace a role (/api/roles/update-role)

`PUT https://api.comecero.com/api/v1/roles/{role_id}`

Replaces a role with the one you send. This is `PUT`, not `POST`: send the whole role, including its `role_id` (`400` without it) and at least one permission. Fields you leave out are cleared. Secret and trusted tokens may call this with the `roles` update permission.

Request body: the `role_request` schema.

Responses: 200, 400, 401, 403, 404, 500.

Full schemas: operation `update_role` in /openapi.json.