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

# Create a new group

`POST /groups`

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.net/office-of-national-statistics/apis/identity-api.md) · [All operations](https://skmtc.net/office-of-national-statistics/apis/identity-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/office-of-national-statistics/identity-api/revisions/6472459b6b03/schema)
