# Create a user

This endpoint creates a user.

NOTE

In order to create users, you need to create a role first. If you create a user without specifying the role UUID in the request, the request will result in an error. You can create roles by using the create_user_role endpoint.

Method Path Operation*
POST /users create_user

*

In order for a user to perform the "create_user" operation, the "create_user" permission must be included in the list of allowed actions in the statement of the user's role.

# Request

Parameter Type In Description
name
required
string body Name of the user. It must match the regular expression (opens new window) [0-9A-Za-z][0-9A-Za-z_ \-]{0,30}[0-9A-Za-z]. It does not need to be unique in the context of the Account.
role
required
string body Role UUID.
description
optional *
dictionary, DEFAULT=null body Attributes of the user in form of key-value pairs:
- key: It must match the regular expression (opens new window) ^[a-z_][0-9a-z_]{0,63}$.
- value: JSON compliant value.
For more details consult the description field section.

*

If no attributes are provided in the request body of "description" ("description": {}), the response will return an empty dictionary ("description": {}).
If "description" with the value null is provided in the request body, the response will not return the "description" field.
If the request body does not contain "description", the response will not return the "description" field.

In our example, we create the user "Oliver Adams" with the role with the role UUID "9891264d-4a77-4fa2-ae7f-84c9af14ae3b" and attributes in the "description" field:

# Response

Attribute Type Description
uuid string User UUID.
name string Name of the User. It must match the regular expression (opens new window) [0-9A-Za-z][0-9A-Za-z_ \-]{0,30}[0-9A-Za-z]. It does not need to be unique in the context of the Account.
account string Account UUID.
role string Role UUID.
description dictionary Attributes of the User in form of key-value pairs:
- key: It must match the regular expression (opens new window) [a-z_][0-9a-z_]{0,63}.
- value: JSON compliant value.
For more details consult the description field section.
created_ts timestamp Time at which the User was created. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window).
updated_ts timestamp Time at which the User was last updated. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window).

# Status codes

Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status Codes section.