---
title: "Create an authorization group"
method: POST
path: "/groups"
tags: ["Authorization"]
---

# Create an authorization group

`POST /groups`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/groups`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Creates an authorization group.

## Request body

- CreateGroupDto
  - `name` string, nullable: s Name of the group.
  - `principalIds` string[], nullable: Principals that are members of the group. This can be either user ids or other group ids.

## Response `202`

When request is accepted. Returns a hypermedia 'Link' object of the authorization group to be created.

- Link
  - `id` string, nullable
  - `href` string, nullable
  - `relation` string, nullable
  - `method` string, nullable

## Other responses

- `400`: When request is invalid.
- `404`: Not Found

---

[API](https://skmtc.dev/smokeball/apis/smokeball-api.md) - [All operations](https://skmtc.dev/smokeball/apis/smokeball-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smokeball/apis/smokeball-api/revisions/6e350cf667d4?raw)
