---
title: "Put Update a Role"
method: PUT
path: "/roles/{id}"
---

# Put Update a Role

`PUT /roles/{id}`

Used to replace existing permissions in a role to a new set of permissions, and also update name/key of the role

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string — updated name for the role
  - `key` string — new key for the role
  - `permission_ids` string[] — permissions_ids to be added
  - `permission_keys` string[] — permission_keys to be added
  - `role_template_key` string — key of the role template, permissions of which need to be added to the role
  - `role_template_id` string — id of the role template, permissions of which need to be added to the role

## Response `200`

200

- object
  - `id` string
  - `url` string
  - `client_id` string
  - `name` string
  - `description` string
  - `key` string
  - `permissions` object[]
    - `id` string
    - `url` string
    - `name` string
    - `description` string
    - `key` string
    - `created_at` string
  - `created_at` string
  - `is_active` boolean

## Other responses

- `400` — 400

---

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