# POST /api/identity/users

Create new user

Creates a new user account with the specified details and roles.

**Operation ID:** `POST_api_identity_users`

## Authorization

Requires: AbpIdentity.Users, AbpIdentity.Users.Create, host scope.

Required permissions:
- `AbpIdentity.Users`
- `AbpIdentity.Users.Create`

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| suppressNulls | query | no | boolean | If true, omit properties with null values. |

## Request Body

The input parameters for the new user.

**Content type:** `application/json`

Schema: `WinkPGIdentityIdentityUserCreateDto`

_Example: Reseller User_

Reseller-scope user bound to a specific reseller via the ResellerId extra property. Can manage merchants under that reseller hierarchy. Replace ResellerId with the real id from your reseller create response.

```json
{
  "password": "P@ssw0rd!ChangeMe",
  "sendConfirmationEmail": true,
  "emailConfirmed": true,
  "phoneNumberConfirmed": false,
  "createFacadeApiKey": false,
  "userName": "reseller.user",
  "name": "Reseller",
  "surname": "Manager",
  "email": "reseller.user@example.com",
  "phoneNumber": "555-555-1001",
  "isActive": true,
  "shouldChangePasswordOnNextLogin": true,
  "lockoutEnabled": false,
  "roleNames": [
    "reseller-admin"
  ],
  "organizationUnitIds": [ ],
  "userType": "Reseller",
  "resellerId": "00000000-0000-0000-0000-000000000010",
  "merchantIds": [ ]
}
```

_Example: Merchant User (Multi-Merchant Access)_

Merchant-scope user bound to one or more merchants via the MerchantIds extra property. Use a single-element array for single-merchant access.

```json
{
  "password": "P@ssw0rd!ChangeMe",
  "sendConfirmationEmail": true,
  "emailConfirmed": true,
  "phoneNumberConfirmed": false,
  "createFacadeApiKey": false,
  "userName": "merchant.user",
  "name": "Merchant",
  "surname": "Operator",
  "email": "merchant.user@example.com",
  "phoneNumber": "555-555-2001",
  "isActive": true,
  "shouldChangePasswordOnNextLogin": true,
  "lockoutEnabled": false,
  "roleNames": [
    "merchant-user"
  ],
  "organizationUnitIds": [ ],
  "userType": "Merchant",
  "resellerId": null,
  "merchantIds": [
    "00000000-0000-0000-0000-000000000001",
    "00000000-0000-0000-0000-000000000002"
  ]
}
```

**Content type:** `text/json`

Schema: `WinkPGIdentityIdentityUserCreateDto`

_Example: Reseller User_

Reseller-scope user bound to a specific reseller via the ResellerId extra property. Can manage merchants under that reseller hierarchy. Replace ResellerId with the real id from your reseller create response.

```json
{
  "password": "P@ssw0rd!ChangeMe",
  "sendConfirmationEmail": true,
  "emailConfirmed": true,
  "phoneNumberConfirmed": false,
  "createFacadeApiKey": false,
  "userName": "reseller.user",
  "name": "Reseller",
  "surname": "Manager",
  "email": "reseller.user@example.com",
  "phoneNumber": "555-555-1001",
  "isActive": true,
  "shouldChangePasswordOnNextLogin": true,
  "lockoutEnabled": false,
  "roleNames": [
    "reseller-admin"
  ],
  "organizationUnitIds": [ ],
  "userType": "Reseller",
  "resellerId": "00000000-0000-0000-0000-000000000010",
  "merchantIds": [ ]
}
```

_Example: Merchant User (Multi-Merchant Access)_

Merchant-scope user bound to one or more merchants via the MerchantIds extra property. Use a single-element array for single-merchant access.

```json
{
  "password": "P@ssw0rd!ChangeMe",
  "sendConfirmationEmail": true,
  "emailConfirmed": true,
  "phoneNumberConfirmed": false,
  "createFacadeApiKey": false,
  "userName": "merchant.user",
  "name": "Merchant",
  "surname": "Operator",
  "email": "merchant.user@example.com",
  "phoneNumber": "555-555-2001",
  "isActive": true,
  "shouldChangePasswordOnNextLogin": true,
  "lockoutEnabled": false,
  "roleNames": [
    "merchant-user"
  ],
  "organizationUnitIds": [ ],
  "userType": "Merchant",
  "resellerId": null,
  "merchantIds": [
    "00000000-0000-0000-0000-000000000001",
    "00000000-0000-0000-0000-000000000002"
  ]
}
```

**Content type:** `application/*+json`

Schema: `WinkPGIdentityIdentityUserCreateDto`

_Example: Reseller User_

Reseller-scope user bound to a specific reseller via the ResellerId extra property. Can manage merchants under that reseller hierarchy. Replace ResellerId with the real id from your reseller create response.

```json
{
  "password": "P@ssw0rd!ChangeMe",
  "sendConfirmationEmail": true,
  "emailConfirmed": true,
  "phoneNumberConfirmed": false,
  "createFacadeApiKey": false,
  "userName": "reseller.user",
  "name": "Reseller",
  "surname": "Manager",
  "email": "reseller.user@example.com",
  "phoneNumber": "555-555-1001",
  "isActive": true,
  "shouldChangePasswordOnNextLogin": true,
  "lockoutEnabled": false,
  "roleNames": [
    "reseller-admin"
  ],
  "organizationUnitIds": [ ],
  "userType": "Reseller",
  "resellerId": "00000000-0000-0000-0000-000000000010",
  "merchantIds": [ ]
}
```

_Example: Merchant User (Multi-Merchant Access)_

Merchant-scope user bound to one or more merchants via the MerchantIds extra property. Use a single-element array for single-merchant access.

```json
{
  "password": "P@ssw0rd!ChangeMe",
  "sendConfirmationEmail": true,
  "emailConfirmed": true,
  "phoneNumberConfirmed": false,
  "createFacadeApiKey": false,
  "userName": "merchant.user",
  "name": "Merchant",
  "surname": "Operator",
  "email": "merchant.user@example.com",
  "phoneNumber": "555-555-2001",
  "isActive": true,
  "shouldChangePasswordOnNextLogin": true,
  "lockoutEnabled": false,
  "roleNames": [
    "merchant-user"
  ],
  "organizationUnitIds": [ ],
  "userType": "Merchant",
  "resellerId": null,
  "merchantIds": [
    "00000000-0000-0000-0000-000000000001",
    "00000000-0000-0000-0000-000000000002"
  ]
}
```

## Responses

### 200

OK

**Content type:** `text/plain`

Schema: `WinkPGIdentityIdentityUserDto`

**Content type:** `application/json`

Schema: `WinkPGIdentityIdentityUserDto`

**Content type:** `text/json`

Schema: `WinkPGIdentityIdentityUserDto`

### 403

Forbidden

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 401

Unauthorized

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 400

Bad Request

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 404

Not Found

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 501

Not Implemented

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 500

Internal Server Error

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### default

The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. See the error-code reference in this document's description for the values `error.code` can take.

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

## See also

- [All documentation](https://docs.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
