Rate this page:

Users

Methods

AddUser

Copy URL

Adds a new user.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
User manager
AddUser example

AddUser example

Add a new user.

Parameters

  • user_name:

    string

    The user name in format [a-z0-9][a-z0-9_-]{2,49}

  • user_display_name:

    string

    The user display name. The length must be less than 256

  • 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

  • application_id:

    number

    The application ID which a new user will be bound to. Can be used instead of the application_name parameter

  • application_name:

    string

    The application name which a new user will be bound to. Can be used instead of the application_id parameter

  • parent_accounting:

    boolean

    Optional

    'True' if the user will use the parent account's money, 'false' if the user will have a separate balance

  • user_active:

    boolean

    Optional
    Defaults on:  true

    The user enable flag

  • user_custom_data:

    string

    Optional

    Any string

Returns

  • result:

    number

    1

  • user_id:

    number

    The new user ID

DelUser

Copy URL

Deletes the specified user(s).

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
User manager
DelUser example

DelUser example

Delete two users with ID 3 and 55.

Parameters

  • user_id:

    intlist

    The user ID list separated by semicolon (;). Use the 'all' value to select all users

  • user_name:

    stringlist

    The user name list separated by semicolon (;) that can be used instead of user_id

  • application_id:

    number

    Optional

    Delete the specified users bound to the application ID. It is required if the user_name is specified

  • application_name:

    string

    Optional

    Delete the specified users bound to the application name. Can be used instead of the application_id parameter

Returns

  • result:

    number

    1

SetUserInfo

Copy URL

Edits the user.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
User manager
SetUserInfo example

SetUserInfo example

Edit the user password.

Parameters

  • user_id:

    number

    The user to edit

  • user_name:

    string

    The user name that can be used instead of user_id

  • application_id:

    number

    Optional

    The application ID. It is required if the user_name is specified

  • application_name:

    string

    Optional

    The application name that can be used instead of application_id

  • new_user_name:

    string

    Optional

    The new user name in format [a-z0-9][a-z0-9_-]{2,49}

  • user_display_name:

    string

    Optional

    The new user display name. The length must be less than 256

  • user_password:

    string

    Optional

    The 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

  • parent_accounting:

    boolean

    Optional

    Set 'true' to use the parent account's money, 'false' to use a separate user balance

  • user_active:

    boolean

    Optional
    Defaults on:  true

    The user enable flag

  • user_custom_data:

    string

    Optional

    Any string

Returns

  • result:

    number

    1

GetUsers

Copy URL

Shows the users of the specified account.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
Developer
Supervisor
User manager
GetUsers example

GetUsers example

Get two first identities.

Parameters

  • application_id:

    number

    The application ID to filter

  • application_name:

    string

    The application name part to filter

  • skill_id:

    number

    Optional

    The skill ID to filter

  • excluded_skill_id:

    number

    Optional

    The excluded skill ID to filter

  • acd_queue_id:

    number

    Optional

    The ACD queue ID to filter

  • excluded_acd_queue_id:

    number

    Optional

    The excluded ACD queue ID to filter

  • user_id:

    number

    Optional

    The user ID to filter

  • user_name:

    string

    Optional

    The user name part to filter

  • user_active:

    boolean

    Optional

    The user active flag to filter

  • user_display_name:

    string

    Optional

    The user display name part to filter

  • with_skills:

    boolean

    Optional
    Defaults on:  false

    Set true to get the bound skills

  • with_queues:

    boolean

    Optional
    Defaults on:  false

    Set true to get the bound queues

  • acd_status:

    stringlist

    Optional

    The ACD status list separated by semicolon (;) to filter. The following values are possible: OFFLINE, ONLINE, READY, BANNED, IN_SERVICE, AFTER_SERVICE, TIMEOUT, DND

  • showing_skill_id:

    number

    Optional

    The skill to show in the 'skills' field output

  • count:

    number

    Optional
    Defaults on:  20

    The max returning record count

  • offset:

    number

    Optional
    Defaults on:  0

    The first N records will be skipped in the output

  • order_by:

    string

    Optional
    Defaults on:  user_name

    The following values are available: 'user_id', 'user_name' and 'user_display_name'

  • return_live_balance:

    boolean

    Optional
    Defaults on:  true

    Set true to get the user live balance

Returns

  • The UserInfoType records

  • total_count:

    number

    The total found user count

  • count:

    number

    The returned user count

TransferMoneyToUser

Copy URL

Transfer the account's money to the user or transfer the user's money to the account if the money amount is negative.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
User manager
TransferMoneyToUser example

TransferMoneyToUser example

Transfer 5.67 $ to the user 1 and transfer 5.67 $ to the user 2 too. The account spends 2*5.67= 11.34 $ in total.

Parameters

  • user_id:

    intlist

    The user ID list separated by semicolon (;). Use the 'all' value to select all users

  • user_name:

    stringlist

    The user name list separated by semicolon (;) that can be used instead of user_id

  • amount:

    decimal

    The money amount, $. The absolute amount value must be equal or greater than 0.01

  • application_id:

    number

    Optional

    The application ID. It is required if the user_name is specified

  • application_name:

    string

    Optional

    The application name that can be used instead of application_id

  • currency:

    string

    Optional

    The amount currency. Examples: RUR, EUR, USD

  • strict_mode:

    boolean

    Optional
    Defaults on:  true

    Returns error if strict_mode is true and a user or the account hasn't enough money

  • user_transaction_description:

    string

    Optional
    Defaults on:  From account/To account

    The user transaction description

  • account_transaction_description:

    string

    Optional
    Defaults on:  From user: ${user_name}/To user: ${user_name}

    The account transaction description. The following macro available: ${user_id}, ${user_name}

Returns

  • result:

    number

    1

  • balance:

    decimal

    The new account balance