Creating a new user account¶
Note
The body does not contain the attributes id, created, and modified. The system sets the values of these attributes after the entry is created.
Note
The body may only contain the mentioned attributes. All other possible attributes of the object UserVO are ignored.
Send a POST request to the /users endpoint.
Description¶
The Create-User request allows the user to create a new user account for the organisation.
Requirements¶
Values of the request: none
Objects: UserVO
Request¶
To create a new user account for the organisation, no additional information needs to be added to the path of the request.
For a detailed specification of which information is required to create a new user account, one or more objects UserVO with the following attributes need to be defined in the body:
| Attributes | Description | Values |
|---|---|---|
email |
The email address of the user account. | string |
login |
The user name for logging in to the Myra App. This should match the value for email. | string |
The following attributes are optional:
| Attributes | Description | Values |
|---|---|---|
firstname |
The first name of the user. | string |
lastname |
The name of the user. | |
roles |
An array with permission roles for the user account. |
|
rootGroupRoles |
An array with information about group permissions for the user account. |
|
isIndirectCustomer |
Shows if the user account should be a user account of a partner or a direct customer of Myra. |
|
The system responds by returning object UserVO with the information about the new entry.
Example¶
Example request body:
{
"email": "string",
"login": "string",
"firstname": "string",
"lastname": "string",
"roles": "ADMINISTRATOR",
"rootGroupRoles": "ADMINISTRATOR",
"isIndirectCustomer": true
}
Responses¶
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 201 | The newly created UserVO. |
| 400 | The request was unsuccessful. The request was invalid or information is missing. |
| 401 | The request has not succeeded because the user authentication was incorrect. |
| 403 | The request has not succeeded because the user does not have the right permissions. |