---
title: "Update User's Company Roles"
method: PATCH
path: "/user-company-roles/{id}"
tags: ["User", "Role", "Company"]
---

# Update User's Company Roles

`PATCH /user-company-roles/{id}`

Used to modify company roles for a user

## Path parameters

- `id` string, required

## Headers

- `If-Match` string

## Request body

- UserCompanyRoleUpdate
  - `add` UserCompanyRole[]
    - `role` 'owner' | 'editor' | 'viewer', required — The possible values for user role
    - `company_id` string, required — The company to which this role applies
  - `remove` UserCompanyRole[]
    - `role` 'owner' | 'editor' | 'viewer', required — The possible values for user role
    - `company_id` string, required — The company to which this role applies

## Response `200`

The complete list of roles after applying this update

- UserCompanyRoles
  - `roles` UserCompanyRole[], required
    - `role` 'owner' | 'editor' | 'viewer', required — The possible values for user role
    - `company_id` string, required — The company to which this role applies

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — User not found
- `default` — Unknown error

---

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