---
title: "Update custom role"
method: PATCH
path: "/api/v1/roles/{id}"
tags: ["Roles"]
---

# Update custom role

`PATCH /api/v1/roles/{id}`

Update a custom role's name, description, or permission set. **System roles cannot be edited** — return `400 Bad Request`.

Editing a role applies to every member and API key currently using it.

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateRoleRequest — At least one field is required. Slug and scope cannot be changed after creation.
  - `name` string
  - `description` string
  - `permissions` string[]

## Response `200`

Role updated

- object
  - `success` boolean
  - `data` Role
    - `id` string, uuid, required
    - `account_id` string, uuid — Empty for built-in system roles
    - `name` string, required
    - `slug` string, required
    - `description` string
    - `scope` 'account' | 'project', required — Whether the role grants account-level or project-level permissions
    - `permissions` string[], required — Permission strings (e.g. `vm.create`, `project.members.view`). See [List Permissions](#tag/Permissions/operation/listPermissions).
    - `is_system` boolean, required — `true` for built-in roles (Owner, Admin, Member, Operator, etc.) which cannot be edited or deleted. `false` for custom roles.
    - `created_by` string, uuid
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400` — Invalid request parameters
- `404` — Resource not found

---

[API](https://skmtc.dev/rafftechnologies/apis/raff-api.md) · [All operations](https://skmtc.dev/rafftechnologies/apis/raff-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rafftechnologies/raff-api/revisions/2f4df56be77c/schema)
