---
title: "Update a role"
method: PATCH
path: "/v0.1/merchants/{merchant_code}/roles/{role_id}"
tags: ["Roles"]
---

# Update a role

`PATCH /v0.1/merchants/{merchant_code}/roles/{role_id}`

Update a custom role.

## Path parameters

- `merchant_code` string, required
- `role_id` string, required

## Request body

- object
  - `name` string — User-defined name of the role.
  - `permissions` string[] — User's permissions.
  - `description` string — User-defined description of the role.

## Response `200`

Returns the updated Role object if the update succeeded.

- Role — A custom role that can be used to assign set of permissions to members.
  - `id` string, required — Unique identifier of the role.
  - `name` string, required — User-defined name of the role.
  - `description` string — User-defined description of the role.
  - `permissions` string[], required — List of permission granted by this role.
  - `is_predefined` boolean, required — True if the role is provided by SumUp.
  - `metadata` Metadata — Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.
  - `created_at` string, date-time, required — The timestamp of when the role was created.
  - `updated_at` string, date-time, required — The timestamp of when the role was last updated.

## Other responses

- `400` — Invalid request.
- `404` — Merchant not found.

---

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