LiveZilla Live Chat
1-Click Demo
EN  DE Bitte einloggen oder anmelden Hallo


LiveZilla API V2





Operator
Operator Object Format
Operator is represented as JSON objects having the following keys:

JSON Key Type Required Read only Comment Example
UserIdstringYesNoThe alphanumeric login ID of the operators.john_doe
FirstnamestringYesNoOperators First Name.John
LastnamestringYesNoOperators Last Name.Doe
EmailstringYesNoOperators email.john@doe.com
LanguagestringYesNoISO two letter language code.EN
WebspaceintYesNoWebspace in MB operator is allowed to use for file uploads (0=deactivated).100
PasswordstringYesNoOperators password (MD5 encoded).md5('johns_password')
GroupsarrayYesNoList of group IDs representing the groups the operators is a member of.groupid1,groupid2
RolesstringNoNoComma separated list of roles (added in 8.0.0.0)d9729feb74992cc3482b350163a1a010,5c7cf4770753999d060d5e8a56cc1740
LocationstringNoNoComma separated list of locations (added in 8.0.0.0)germany
SkillsstringNoNoComma separated list of skills (added in 8.0.0.0)purchase,ship,hire
DescriptionstringNoNoDescription TextNice guy
LevelintNoNoDefines if operator is server administrator.1
StatusintNoYesOperator's current online status (0=Online,1=Busy,2=Offline,3=Away).0
PictureFilestringNoYesOperator's Image File, add to full URL.picture.php?operator...
ChatFilestringNoYesFile to initiate chat with Operator, add to full URL.chat.php?operator...
IsBotbooleanNoYesIs bot (or human).1
ExternalChatsarrayNoYesList of active (external) chat objects. (added in 5.4.0.1)chat1,chat2
ExternalChatCountintNoYesCount of active (external) chats. (added in 5.4.0.1)1


Operator Functions


List Operators
Function
As of version 5.2.5.0


POST /api/v2/api.php p_operators_list=1


Filters


Name POST Key Type Required Comment Example
UserIdp_useridstringNoResponse will be the Operator matching this login Id.john_doe
Statusp_statusintNoReturns all operators having this status.1
Groupp_groupstringNoReturns all operators that are member of this group.groupid1
Full Chatsp_full_chatsboolNoReturn full list of external chat objects (LiveZilla 5.4.0.1).1


CURL Example


curl {yourdomain}{livezilla_folder}/api/v2/api.php
-d {authenthication}
-d p_operators_list=1 -X POST

Response


200 Ok: {
    "Operators": [
        {
            "Operator": {
                "Firstname": "John",
                "Lastname": "Doe",
                "Webspace": 100,
                "Password": "a8c054e6b5e3edf349c1dac58157d1cd",
                "Description": "Nice guy",
                "Groups": [
                    "groupid1",
                    "groupid2"
                ],
                "Level": "1",
                "Skills": "purchase,ship,hire",
                "Location": "germany",
                "Roles": "d9729feb74992cc3482b350163a1a010,5c7cf4770753999d060d5e8a56cc1740",
                "UserId": "john_doe",
                "Language": "EN",
                "Email": "john@doe.com"
            }
        },
        {
            "Operator": {
                "Firstname": "John",
                "Lastname": "Doe",
                "Webspace": 100,
                "Password": "a8c054e6b5e3edf349c1dac58157d1cd",
                "Description": "Nice guy",
                "Groups": [
                    "groupid1",
                    "groupid2"
                ],
                "Level": "1",
                "Skills": "purchase,ship,hire",
                "Location": "germany",
                "Roles": "d9729feb74992cc3482b350163a1a010,5c7cf4770753999d060d5e8a56cc1740",
                "UserId": "john_doe",
                "Language": "EN",
                "Email": "john@doe.com"
            }
        }
    ]
}

Error Codes


                            403 Forbidden: Invalid or no user authentication data sent (see General API Authentication)
400 Bad Data: Invalid or missing POST parameters (see required fields/filters and data types)
                        



Create Operator
Function
As of version 5.2.5.0


POST /api/v2/api.php p_operator_create=1


Filters


Name POST Key Type Required Comment Example


CURL Example


curl {yourdomain}{livezilla_folder}/api/v2/api.php
-d {authenthication}
-d p_operator_create=1
-d p_data={ "Operator": { "Firstname": "John", "Lastname": "Doe", "Webspace": 100, "Password": "a8c054e6b5e3edf349c1dac58157d1cd", "Description": "Nice guy", "Groups": [ "groupid1", "groupid2" ], "Level": "1", "Skills": "purchase,ship,hire", "Location": "germany", "Roles": "d9729feb74992cc3482b350163a1a010,5c7cf4770753999d060d5e8a56cc1740", "UserId": "john_doe", "Language": "EN", "Email": "john@doe.com" } } -X POST

Response


200 Ok: {
    "Operator": {
        "Firstname": "John",
        "Lastname": "Doe",
        "Webspace": 100,
        "Password": "a8c054e6b5e3edf349c1dac58157d1cd",
        "Description": "Nice guy",
        "Groups": [
            "groupid1",
            "groupid2"
        ],
        "Level": "1",
        "Skills": "purchase,ship,hire",
        "Location": "germany",
        "Roles": "d9729feb74992cc3482b350163a1a010,5c7cf4770753999d060d5e8a56cc1740",
        "UserId": "john_doe",
        "Language": "EN",
        "Email": "john@doe.com"
    }
}

Error Codes


                            403 Forbidden: Invalid or no user authentication data sent (see General API Authentication)
400 Bad Data: Invalid or missing POST parameters (see required fields/filters and data types)
                        



Delete Operator
Function
As of version 5.2.5.0


POST /api/v2/api.php p_operator_delete=1


Filters


Name POST Key Type Required Comment Example


CURL Example


curl {yourdomain}{livezilla_folder}/api/v2/api.php
-d {authenthication}
-d p_operator_delete=1
-d p_userid=john_doe
-d p_data={ "Operator": { "UserId": "john_doe" } } -X POST

Response


200 Ok: {
    "Operator": {
        "Firstname": "John",
        "Lastname": "Doe",
        "Webspace": 100,
        "Password": "a8c054e6b5e3edf349c1dac58157d1cd",
        "Description": "Nice guy",
        "Groups": [
            "groupid1",
            "groupid2"
        ],
        "Level": "1",
        "Skills": "purchase,ship,hire",
        "Location": "germany",
        "Roles": "d9729feb74992cc3482b350163a1a010,5c7cf4770753999d060d5e8a56cc1740",
        "UserId": "john_doe",
        "Language": "EN",
        "Email": "john@doe.com"
    }
}

Error Codes


                            403 Forbidden: Invalid or no user authentication data sent (see General API Authentication)
400 Bad Data: Invalid or missing POST parameters (see required fields/filters and data types)
                        





Something missing?


If you find anything missing please let us know and we will add the missing structures right away. Thanks.