---
ai:
  exclude: true
search:
  tags:
    - Admin User
    - POST
seo:
  description: >-
    One of the following options could be used: Create a user with a… Reference
    for the POST /rest/api/admin/user endpoint in the Confluence Data Center
    API.
sidebar:
  label: Create user
  badge: POST
title: Create user
type: openapi-operation
---
One of the following options could be used:

1. Create a user with a specified password. The userName, fullName, email and password needs to be specified.

2. Create a user with an email notification to the user. The userName, fullName, email and notifyViaEmail (true) needs to be specified.

**Requirements**:

- The userName should not be null or blank

- The userName should not contain any of these characters \ , + &lt; > ' "

- The userName should not contain any whitespace characters

- The userName should not be "anonymous"

- The userName should not contain any upper case characters

- The fullName should not be null or blank

- The fullName should not contain any of these characters

- The fullName should not be "anonymous"

- The email should not be null or blank

- The email should be a valid email address

- If notifyViaEmail is false then the password should not be null or blank

- If notifyViaEmail is true then the password should not be specified

`POST /rest/api/admin/user`

**Request body** (`application/json`)

Details of the user to be created

- `userName` (string)
- `fullName` (string)
- `email` (string)
- `password` (string)
- `notifyViaEmail` (boolean)

Request body example:

```json
{
  "userName": "user1",
  "fullName": "Some User",
  "email": "someuser@someemail.com",
  "password": "password",
  "notifyViaEmail": true
}
```

**Responses**

- `201` — returns a response with generated UserKey for the created user.
- `400` — returned if any error occurs while creating the user
- `401` — returned if an anonymous (or unauthenticated) user tries to create a user
- `402` — returned if no more licenses available to create a user
- `403` — returned if user does not have enough permission to create a user
- `409` — returned if the user with the same userName already exists

Response example, 201:

```json
{
  "userKey": "4028d6768851c8900188556ba6000014"
}
```
