---
title: "Updates the role with the specified id."
method: PUT
path: "/roles/{roleId}"
tags: ["roles"]
---

# Updates the role with the specified id.

`PUT /roles/{roleId}`

<Check title="Required Permissions" icon="key">The user must be an admin or have `workspace-manage-config:write` permissions.</Check>

## Path parameters

- `roleId` string, uuid, required

## Headers

- `Authorization` string, required

## Request body

- RoleForm — The POST/PUT model of the role.
  - `name` string, required — The name of the role. Must be unique.
  - `isAdminRole` boolean — Whether this is the admin role. Only one role can be the admin role.
  - `isGuestRole` boolean — Whether this is the guest role. Only one role can be the guest role.

## Response `200`

OK

- Role — The role model.
  - `name` string, required — The name of the role. Must be unique.
  - `isAdminRole` boolean — Whether this is the admin role. Only one role can be the admin role.
  - `isGuestRole` boolean — Whether this is the guest role. Only one role can be the guest role.
  - `id` string, uuid — The id of the role.
  - `isAgentRole` boolean — Whether this is a retained role from the legacy agent-as-user model. The role cannot be modified.
  - `isPreset` boolean — Whether this role is one of the preset roles. Preset roles can be edited, archived and deleted.
  - `isArchived` boolean — Whether the role has been archived.
  - `createdBy` string, uuid — The id of the user who created this role.
  - `createdOn` string, date-time — The date this role was created.
  - `updatedBy` string, uuid — The id of the user who updated this role.
  - `updatedOn` string, date-time — The date this role was last modified.

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
