---
title: "Upsert a RBAC Role"
method: PUT
path: "/{workspace}/rbac/roles/{RBACRoleId}"
tags: ["RBACRoles"]
---

# Upsert a RBAC Role

`PUT /{workspace}/rbac/roles/{RBACRoleId}`

Create or Update RBAC Role using ID.

## Path parameters

- `workspace` string, required

## Request body

- RBACRole
  - `comment` string, nullable — Additional comment or description for the RBAC role.
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `is_default` boolean, nullable — Indicates whether the RBAC role is the default role.
  - `name` string, nullable, required — The name of the RBAC role.
  - `updated_at` integer, nullable — Unix epoch when the resource was last updated.

## Response `200`

Successfully upserted RBAC Role

- RBACRole
  - `comment` string, nullable — Additional comment or description for the RBAC role.
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `is_default` boolean, nullable — Indicates whether the RBAC role is the default role.
  - `name` string, nullable, required — The name of the RBAC role.
  - `updated_at` integer, nullable — Unix epoch when the resource was last updated.

## Other responses

- `401` — Unauthorized

---

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