Create user
This API creates a new PILOT user and assigns the main user details: login, password, name, role, phone number, email, and available accounts.
Method
GET
Request address
To execute the request, use the following URL: https://<server_address>/backend/api.php?
Request parameters
• cmd=create_user — command for creating a user
• login — login of the new user
• password — password of the new user
• name — user name
• role_id — user role ID
• phone — user phone number
• email — user email address
• accounts — list of account IDs the user should have access to. If there are several accounts, separate them with commas
• account_id — ID of the account where the user is created
Request example
https://<server_address>/backend/api.php?cmd=create_user&login=TestAPI13&password=Qwerty123&name=test%20Api%2013&role_id=1&
phone=789995&email=testapi13@mailinator.com&accounts=1106,1131&account_id=1003
|
Response
{
"code": 0,
"msg": "Success create user: 729",
"user_id": 729
}
|
The API response returns:
• code — command execution result code. The value 0 means successful execution
• msg — text message with the command execution result
• user_id — ID of the created user