---
title: "Create a new user"
method: POST
path: "/iam/users"
tags: ["IAM Reseller Users"]
---

# Create a new user

`POST /iam/users`

Create a new user with client. The user and client will be activated automatically.

## Request body

- CreateUserRequest
  - `email` string, email, required — User's email address. This address will be used as client's email address by default.
  - `password` string, password, required — User's password.
  - `company` string, required — Client's company name.
  - `user_type` 'common' — User's type. It must be `common`.
  - `name` string — User's name. This name will be used as client's name by default.
  - `phone` string — User's phone number. This phone will be used as client's phone by default.
  - `seller` integer — Client's seller ID.
  - `services` object[] — Specify products if you want to override [default product availability](#tag/Products'-availability/paths/~1products~1availability~1defaults/get) for this client. `null` – the product will inherit the [default availability](#tag/Products'-availability/paths/~1products~1availability~1defaults/get) for this product. `true` – set personal availability for a client as available. Please be informed that product will not be enabled for a client until you [enable it and change the service status](#tag/Services/paths/~1clients~1{clientId}~1services~1{serviceId}/put). `false` – set personal availability for a client as unavailable.
    - `product_name` 'CDN' | 'STORAGE' | 'STREAMING' | 'DNS' | 'DDOS' | 'CLOUD' — Service's name.
    - `available` boolean — `true` – the product will be available to activate. `false` – the product will not be available to activate. `null` – the product will inherit the default availability for this product.
  - `lang` 'de' | 'en' | 'ru' | 'zh' | 'az' — Language code.
  - `custom_id` string — Client's custom ID. You can use this field for your internal identification.
  - `country_code` string — Client's country code.
  - `is_test` boolean — System field: - `true` — a test account; - `false` — a production account.

## Response `201`

OK.

- IamResellerUser
  - `id` integer, required — User's ID.
  - `email` string, email, required — User's email address.
  - `name` string, nullable, required — User's name.
  - `lang` 'de' | 'en' | 'ru' | 'zh' | 'az', required — User's language. Defines language of the control panel and email messages.
  - `phone` string, nullable, required — User's phone.
  - `company` string, required — User's company.
  - `reseller` integer, required — Services provider ID.
  - `client` number, required — User's account ID.
  - `deleted` boolean, required — Deletion flag. If `true` then user was deleted.
  - `groups` Group[], required — User's group in the current account. IAM supports 5 groups: - Users - Administrators - Engineers - Purge and Prefetch only (API) - Purge and Prefetch only (API+Web)
    - `id` integer — Group's ID: Possible values are: - 1 - Administrators* 2 - Users* 5 - Engineers* 3009 - Purge and Prefetch only (API+Web)* 3022 - Purge and Prefetch only (API)
    - `name` 'Users' | 'Administrators' | 'Engineers' | 'Purge and Prefetch only (API)' | 'Purge and Prefetch only (API+Web)' — Group's name.
  - `activated` boolean, required — Email confirmation: - `true` – user confirmed the email; - `false` – user did not confirm the email.
  - `sso_auth` boolean, required — SSO authentication flag. If `true` then user can login via SAML SSO.
  - `two_fa` boolean, required — Two-step verification: - `true` – user enabled two-step verification; - `false` – user disabled two-step verification.
  - `auth_types` AuthType[], required — System field. List of auth types available for the account.
  - `user_type` 'common' | 'reseller' | 'seller', required — User's type.
  - `is_active` boolean, required — User activity flag.
  - `client_and_roles` object[], required — List of user's clients. User can access to one or more clients.
    - `client_id` integer, required
    - `client_company_name` string, required
    - `user_roles` string[], required — User role in this client.
    - `user_id` integer, required — User's ID.

## Other responses

- `400` — Validation error
- `401` — Authentication credentials were not provided or given token not valid for any token type.

---

[API](https://skmtc.net/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.net/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
