---
title: "Update a company role"
method: PATCH
path: "/v1/companies/{company_id}/company_roles/{id}"
tags: ["Company role"]
---

# Update a company role

`PATCH /v1/companies/{company_id}/company_roles/{id}`

Updates a company role's `name`/`description` and, when a `permissions`
array is supplied, replaces the role's permission set. If any supplied
permission id does not exist a `404` is returned.

## Path parameters

- `company_id` string, uuid, required
- `id` string, required

## Parameters

- `#/paths/~1v1~1users/get/parameters/0` — unresolved $ref

## Request body

- object
  - `name` string
  - `description` string
  - `permissions` string[] — Full replacement set of permission ids for the role.

## Response `200`

The updated company role.

- CompanyRole — A custom role scoped to a company, carrying a set of permissions.
  - `id` string, uuid, required
  - `company_id` string, uuid, required
  - `name` string, required
  - `description` string, nullable
  - `permissions` object[] — Permissions granted by this role (only `id` and `name` are returned).
    - `id` string, uuid
    - `name` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `401` — Unauthorized
- `404` — Company role or a supplied permission not found
- `422` — Validation failed

---

[API](https://skmtc.net/cardda/apis/banking-api.md) · [All operations](https://skmtc.net/cardda/apis/banking-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cardda/banking-api/revisions/ff1aeb3fda8b/schema)
