- POST Users
Add / Edit Users
This method allows you to add or modify users in relation to the domain on which you are using the Auth service.
- Production environment: https://auth.altravia.com/users
- Testing environment: https://test.auth.altravia.com/users/
|username||string||Email of the user to add or edit.|
|password||string||Password of the user; minimum 8 characters of which at least one is a number.|
|privileges||array||It can contain either the single privilege or an array of privileges that you want to add or delete for the user.|
Editing old user:
If it's a new user, the response header HTTP status code will be 201 Created and the request will be answered.
If it has been modified, the response header HTTP status code will be 202 Accepted and the request will be answered.
If you try to get a request without authorization, you will receive an error 401 Unauthorized.
Additionally you should also handle the 400 Bad request status. For more info on HTTP status handling see dedicated section in Integration best practices page.
|success||boolean||True or false.|
|password||string||Returns the password if it is a new user or null if it has been modified.|
|domain||string||Domain relative to the user.|
|message||string||Contains error or success messages.|
|error||int||Contains the encoding of the error or NULL if successful.|
Adding new user: