Users
Methods
AddUser
Adds a new user.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
number
The application ID which a new user is to be bound to. Can be used instead of the application_name parameter
application_name:
string
The application name which a new user is to be bound to. Can be used instead of the application_id parameter
parent_accounting:
boolean
OptionalWhether the user uses the parent account's money, 'false' if the user has a separate balance
user_active:
boolean
OptionalDefaults on:Â Â trueWhether the user is active. Inactive users cannot log in to applications
user_custom_data:
string
OptionalAny string
user_display_name:
string
The user display name. The length must be less than 256
user_name:
string
The user name in format [a-z0-9][a-z0-9_-]{2,49}
user_password:
string
The user password. Must be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character
Returns
result:
number
1
user_id:
number
The new user ID
DelUser
Deletes the specified user(s).
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
number
OptionalDelete the specified users bound to the application ID. It is required if the user_name is specified
application_name:
string
OptionalDelete the specified users bound to the application name. Can be used instead of the application_id parameter
user_id:
intlist
The user ID list separated by semicolons (;). Use the 'all' value to select all users
user_name:
stringlist
The user name list separated by semicolons (;) that can be used instead of user_id
Returns
result:
number
1
GetUsers
Shows the users of the specified account.
To call this method, make sure your service account has one of the following roles:
Parameters
acd_queue_id:
number
OptionalThe ACD queue ID to filter
acd_status:
stringlist
OptionalThe ACD status list separated by semicolons (;) to filter. The following values are possible: OFFLINE, ONLINE, READY, BANNED, IN_SERVICE, AFTER_SERVICE, TIMEOUT, DND
application_id:
number
The application ID to filter
application_name:
string
The application name part to filter
count:
number
OptionalDefaults on:Â Â 20The max returning record count
excluded_acd_queue_id:
number
OptionalThe excluded ACD queue ID to filter
excluded_skill_id:
number
OptionalThe excluded skill ID to filter
offset:
number
OptionalDefaults on:Â Â 0The first N records are skipped in the output
order_by:
string
OptionalDefaults on:Â Â user_nameThe following values are available: 'user_id', 'user_name' and 'user_display_name'
return_live_balance:
boolean
OptionalDefaults on:Â Â trueWhether to get the user live balance
showing_skill_id:
number
OptionalThe skill to show in the 'skills' field output
skill_id:
number
OptionalThe skill ID to filter
user_active:
boolean
OptionalWhether the user is active to filter. Inactive users cannot log in to applications
user_display_name:
string
OptionalThe user display name part to filter
user_id:
number
OptionalThe user ID to filter
user_name:
string
OptionalThe user name part to filter
with_queues:
boolean
OptionalDefaults on:Â Â falseWhether to get the bound queues
with_skills:
boolean
OptionalDefaults on:Â Â falseWhether to get the bound skills
Returns
count:
number
The returned user count
result:
The UserInfoType records
total_count:
number
The total found user count
SetUserInfo
Edits the user.
To call this method, make sure your service account has one of the following roles:
Parameters
application_id:
number
OptionalThe application ID. It is required if the user_name is specified
application_name:
string
OptionalThe application name that can be used instead of application_id
new_user_name:
string
OptionalThe new user name in format [a-z0-9][a-z0-9_-]{2,49}
parent_accounting:
boolean
OptionalWhether to use the parent account's money, 'false' to use a separate user balance
user_active:
boolean
OptionalDefaults on:Â Â trueWhether the user is active. Inactive users cannot log in to applications
user_custom_data:
string
OptionalAny string
user_display_name:
string
OptionalThe new user display name. The length must be less than 256
user_id:
number
The user to edit
user_name:
string
The user name that can be used instead of user_id
user_password:
string
OptionalThe new user password. Must be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character
Returns
result:
number
1
TransferMoneyToUser
Transfer the account's money to the user or transfer the user's money to the account if the money amount is negative.
To call this method, make sure your service account has one of the following roles:
Parameters
account_transaction_description:
string
OptionalDefaults on:Â Â From user: ${user_name}/To user: ${user_name}The account transaction description. The following macro available: ${user_id}, ${user_name}
amount:
decimal
The money amount, $. The absolute amount value must be equal or greater than 0.01
application_id:
number
OptionalThe application ID. It is required if the user_name is specified
application_name:
string
OptionalThe application name that can be used instead of application_id
currency:
string
OptionalThe amount currency. Examples: RUR, EUR, USD
strict_mode:
boolean
OptionalDefaults on:Â Â trueWhether to enable the strict mode. Returns error if strict_mode is true and a user or the account does not have enough money
user_id:
intlist
The user ID list separated by semicolons (;). Use the 'all' value to select all users
user_name:
stringlist
The user name list separated by semicolons (;) that can be used instead of user_id
user_transaction_description:
string
OptionalDefaults on:Â Â From account/To accountThe user transaction description
Returns
balance:
decimal
The new account balance
result:
number
1