---
title: "Add roles to group"
method: POST
path: "/resources/groups/v1/{groupId}/roles"
tags: ["User groups"]
---

# Add roles to group

`POST /resources/groups/v1/{groupId}/roles`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/groups/v1/{groupId}/roles`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/groups/v1/:groupId/roles/post.ts> (a function with typed inputs; its response is checked against the schema)

This route adds requested roles to existing group. User can assign only roles that are lower then his own.

## Path parameters

- `groupId` string, required

## Request body

- UpdateRolesOnGroupDto
  - `roleIds` string[], required: Will add / remove requested roles from the group

## Response `201`

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
