Create user

Creates a new user in Basecone.

POST users

Request properties

Property Type Description Optional
Username string Username to use. No
Name string The full name of a user. No
Password string The password associated with this user, the password has to follow the following rules :
  • minimum of 8 characters
  • at least 1 number and 1 letter
  • at least 1 special character, you can choose on of the following : ! @ # $ % ^ & / ? * ( ) _ + = [ ] { } | ; : " '
Example of a valid password: B@sec0ne or IJs=L3kker
Yes
EmailAddress string The email address associated with this user. No
Roles string array A list of role codes, the new user will be configured with, possible value are
SuperUser, Accountant, SMEAccountant, AuthorisationAdministrator, Authoriser, ClientUser, RestrictedClientUser.
No
Companies Guid array A list of CompanyId's the new user will get access to. Yes

Example request

{
    username : "Bob",
    name : "My Full name",
    password : 'B@sec0ne',
    emailAddress : "test@test.nl",
    roles:[
    	"Accountant",
        "Authoriser"
    ],
    companies :[
    	"4c525b0d-032a-4212-8f7d-484633f3482a"
    ]
}

Response

Upon successful creation of a new user a 200 status code will be returned and a user reference, otherwise an error message with failure details.

Example response


            {
              "userId": "035242ec-0163-45e2-ac33-de9ed24acf5e",
              "_links": [
                {
                  "rel": "self",
                  "href": "http://api.basecone.com/users/035242ec-0163-45e2-ac33-de9ed24acf5e"
                }
              ]
            }
            

Possible error responses

Status code Error code Details
400 invalid_request_payload One or more properties were not valid
403 forbidden user has no rights to create other users, and is not allowed add a user with a higher role then his own