# Create a new Account


Endpoint: POST /management/accounts
Version: 3.17.0
Security: ApiKeyAuth

## Security:

  - `ApiKeyAuth` (unknown)
    apiKey in header Authorization

## Request fields (application/json):

  - `is_admin` (boolean)
    Whether the created account must be granted to admin role.

  - `generate_api_key` (boolean)
    Whether an API key must be generated for this Account. This must be set if the Account will be used for API key based authentication, and unset otherwise.

  - `api_client_id` (string)
    The unique ID which is used to identify the identity of an API request. The web server (nginx) configuration must be configured so as to include the external ID as the value of the X_CLIENT_ID HTTP request header when requests are proxied. If this value isn't set, the application will automatically generate one. For OAuth2/JWT based authentication, this typically corresponds to a value extracted from the JWT, uniquely identifying the Account.

  - `first_name` (string)
    An optional first name for the Account.

  - `last_name` (string)
    An optional last name for the Account.

  - `email` (string)
    An optional email for the Account.

  - `username` (string)
    The username for username/password authentication. This can also be used to provide an optional logical name for the Account.

  - `password` (string)
    The password for username/password authentication.

  - `ldap_principal` (string)
    This value will be used for linking this account to an LDAP user when authenticated with the same LDAP principal. When accounts authenticate with LDAP, an LDAP principal value is calculated based on the username, msad_domain_name, search_base and username_pattern.

  - `tags` (array)
    The tags to be created for this Account.
    Example: [{"key":"key-1","value":"value-1"},{"key":"key-2","value":"value-2"}]

  - `tags.key` (string, required)
    Key of the tag
    Example: key-1

  - `tags.value` (string, required)
    Value of the tag
    Example: value-1

## Response 201:

  - `201` (unknown)
    The created Account id and if requested the generated API key token.

## Response 201 fields (application/json):

  - `token` (string)
    The opaque token to use to authenticate for other API calls. The token must be included in all HTTP API calls
in a request header named "Authorization", and prefixed with "apk " to denote that it is a proprietary API key format.
For instance, if the token is "abc123", request must contain the following HTTP request header:
"Authorization: apk abc123".

  - `id` (integer)
    Numeric ID of the created Account.

  - `first_name` (string)
    First name of the created Account.

  - `last_name` (string)
    Last name of the created Account.

  - `email` (string)
    Email of the created Account.

  - `username` (string)
    Username of the created Account.

  - `ldap_principal` (string)
    The LDAP principal of the created Account.

  - `tags` (array)
    The tags to be created for this Account.
    Example: [{"key":"key-1","value":"value-1"},{"key":"key-2","value":"value-2"}]

  - `tags.key` (string, required)
    Key of the tag
    Example: key-1

  - `tags.value` (string, required)
    Value of the tag
    Example: value-1

