---
title: "Create Group's Roles"
method: POST
path: "/groups/{GroupId}/roles"
tags: ["Groups"]
---

# Create Group's Roles

`POST /groups/{GroupId}/roles`

Create roles for a specified group

## Request body

- GroupRole
  - `group` object, nullable
    - `comment` string
    - `id` string
    - `name` string
    - `updated_at` string, date-time
  - `group_id` string, nullable — ID of the group.
  - `rbac_role` object, nullable
    - `id` string
    - `name` string
  - `role_id` string, nullable — ID of the RBAC role assigned to the group.
  - `workspace` string, nullable — Workspace ID.

## Response `201`

Successfully created or updated roles.

- GroupRole
  - `group` object, nullable
    - `comment` string
    - `id` string
    - `name` string
    - `updated_at` string, date-time
  - `group_id` string, nullable — ID of the group.
  - `rbac_role` object, nullable
    - `id` string
    - `name` string
  - `role_id` string, nullable — ID of the RBAC role assigned to the group.
  - `workspace` string, nullable — Workspace ID.

## 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/versions/28b1f8a59cdc/schema)
