---
title: "Update Custom Role"
method: PATCH
path: "/api/v1/roles/{role_id}"
tags: ["Team Management"]
---

# Update Custom Role

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

Updates a custom role's permission matrix. Every category is at least 'view' — omitted categories default to 'view'. System roles cannot be edited. The new matrix must not duplicate an existing role's. Requires a global API key.

## Request body

- UpdateRoleRequest — Request body for updating a custom role's permissions
  - `permissions` PermissionMatrix, required — Per-category access levels for a role. Every category is at least 'view'; categories omitted on create/update default to 'view'.
    - `content` 'none' | 'view' | 'write'
    - `prompts` 'none' | 'view' | 'write'
    - `competitors` 'none' | 'view' | 'write'
    - `analytics` 'none' | 'view' | 'write'
    - `integrations` 'none' | 'view' | 'write'
    - `brand_knowledge` 'none' | 'view' | 'write'
    - `team` 'none' | 'view' | 'write'
    - `billing` 'none' | 'view' | 'write'
    - `api` 'none' | 'view' | 'write'
    - `organization` 'none' | 'view' | 'write'

## Response `200`

Role updated successfully

- object
  - `success` boolean, required
  - `role` Role, required — A role available in your organization — a built-in system role or a custom role.
    - `role_id` string, required — Unique identifier of the role. Usable as `role_id` in invites and member role updates. Built-in system roles use GUID-shaped sentinel IDs (e.g. `00000000-0000-0000-0000-000000000001`), not RFC 4122 UUIDs.
    - `name` string, required — Display name of the role
    - `slug` string, required — Normalized name of the role (e.g. 'admin', 'content-manager')
    - `is_system` boolean, required — Whether this is a built-in system role (Admin, Editor, Viewer, Billing). System roles cannot be edited or deleted.
    - `permissions` PermissionMatrix, required — Per-category access levels for a role. Every category is at least 'view'; categories omitted on create/update default to 'view'.
      - `content` 'none' | 'view' | 'write'
      - `prompts` 'none' | 'view' | 'write'
      - `competitors` 'none' | 'view' | 'write'
      - `analytics` 'none' | 'view' | 'write'
      - `integrations` 'none' | 'view' | 'write'
      - `brand_knowledge` 'none' | 'view' | 'write'
      - `team` 'none' | 'view' | 'write'
      - `billing` 'none' | 'view' | 'write'
      - `api` 'none' | 'view' | 'write'
      - `organization` 'none' | 'view' | 'write'
    - `created_at` string, required — When the role was created

## Other responses

- `400` — Bad request - Invalid role ID format or permissions
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - Global API key required, or the role is a system role
- `404` — Not found - Role does not exist in your organization
- `409` — Conflict - Permissions duplicate an existing role's
- `500` — Internal server error

---

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