---
title: "Creates a new user"
method: POST
path: "/users"
tags: ["Users"]
---

# Creates a new user

`POST /users`

## Request

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

Creates a new user in cognito

## Request body

- object
  - `forename` string, required
  - `lastname` string, required
  - `email` string, required

## Response `201`

The user is created

- User: A user in cognito
  - `id` string: The users id
  - `forename` string: The users forename
  - `surname` string: The users surname
  - `email` string: The users email address
  - `groups` string[]: The groups the user belongs to
  - `active` boolean: Whether or not the user is active
  - `status_notes` string: Notes about the updates made to the user
  - `status` 'UNCONFIRMED' | 'CONFIRMED' | 'ARCHIVED' | 'COMPROMISED' | 'UNKNOWN' | 'RESET_REQUIRED' | 'FORCE_CHANGE_PASSWORD': The current status of the user

## 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)
