POST
/
v1
/
users
Create a User
curl --request POST \
  --url http://127.0.0.1:4001/v1/users \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "john@example.com",
  "firstName": "John",
  "groups": [
    "admin-group",
    "midaz-viewer-group",
    "midaz-contributor-group"
  ],
  "lastName": "Doe",
  "password": "password",
  "username": "johndoe"
}'
[
{
"email": "john@example.com",
"firstName": "John",
"groups": [
"admin-group",
"midaz-viewer-group",
"midaz-contributor-group"
],
"id": "123e4567-e89b-12d3-a456-42661417400",
"lastName": "Doe",
"username": "johndoe"
}
]

Body

application/json

Information about the user.

email
string
required

User's email address.

firstName
string
required

User's first name.

lastName
string
required

User's last name.

password
string
required

User's password for authentication.

username
string
required

User's username.

groups
string[]

Array of user role groups IDs. Role groups IDs can be retrieved through the List Groups endpoint.

Response

Indicates that the resource was successfully created and the operation was completed as expected.

email
string

User’s email address.

firstName
string

User’s first name.

groups
string[]

List of groups the user belongs to.

id
string

Unique identifier of the user.

lastName
string

User’s last name.

username
string

Unique username.