---
title: "Create a new group"
method: POST
path: "/groups"
tags: ["Groups"]
---

# Create a new group

`POST /groups`

## Request

- Base URL: `/v1` (relative, and the document’s source URL is not known)
- URL: `/v1/groups`
- Auth: API key in header `Authorization`

Creates a new group in Cognito user pool

## Request body

- object
  - `name` string, required
  - `precedence` integer, required

## Response `201`

The group has been successfully created

- NewGroup: The new group details for the response body
  - `id` string: The unique ID of the group
  - `name` string: The human readable name of the group
  - `precedence` integer: The precedence of the group

## Other responses

- `400`: Request rejected due to invalid parameters supplied
- `401`: Authentication information is missing or invalid
- `500`: Failed to process the request due to an internal error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/identity-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/identity-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/identity-api/revisions/6472459b6b03?raw)
