• Auth
  • 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/

Mandatory Parameters

Property name Type Description
username string Email of the user to add or edit.

Optional Parameters

Property name Type Description
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.
name string User name.
surname string User surname.
cell string User's phone.

Request Example

Editing old user:


New User

Response Format

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.

Request Response

Parameter Type Description
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.

Additional examples

Adding new user: