---
title: "Create UserGroup"
method: POST
path: "/v2/user_groups"
tags: ["UserGroups"]
---

# Create UserGroup

`POST /v2/user_groups`

Creates a user group within a CoreStack tenant and assign different set of roles to different users.There can be multiple user groups within a CoreStack tenant. User group will be created at the tenant level

## Request body

- UserGroupRequest
  - `group_name` string, required — The unique group name for the user group to be created.
  - `tenant_ids` string[], required — ID of tenants to assign to UserGroup
  - `roles` string[], required — List of role IDs to assign to UserGroup
  - `users` string[], required — List of users IDs to assign to UserGroup

## Response `201`

Created

- string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.dev/corestack/apis/corestack-external-api.md) · [All operations](https://skmtc.dev/corestack/apis/corestack-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corestack/corestack-external-api/revisions/bf2cdf20826d/schema)
