LiveZilla Live Chat
1-Click Demo
EN  DE Please sign in or register Hi
We are very happy in our company with LiveZilla. It's easy to use and it have very usefull features....
Show all reviews

LiveZilla API V2

Cronjob Functions

Execute Cronjob
As of version

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


Name POST Key Type Required Comment Example  
Send Chat Transcriptsp_send_chat_transcriptsboolYesClosed chats will be archived and chat transcripts will be sent. Call every 10-20 hours.1
Receive Emailsp_receive_emailsboolYesEmails will be downloaded from mailboxes. Call every 2-5 minutes.1
Maintenancep_maintenanceboolYesPruning and optimizing databases. Call every 10-120 seconds.1
Social Mediap_social_mediaboolYesDownload messages from Social Media. Call every 10-120 seconds.1

CURL Example

curl {yourdomain}{livezilla_folder}/api/v2/api.php
-d {authenthication}
-d p_cronjob_execute=1
-d p_cronjob_maintain=1
-d p_send_chat_transcripts=1
-d p_receive_emails=1
-d p_social_media=1 -X POST


200 Ok: "SUCCESS"

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)

PHP code to execute CronJobs

            $livezillaURL = "http(s)://{yourdomain}/livezilla/";
            $apiURL = $livezillaURL . "api/v2/api.php";

            // authentication parameters

            // function parameter

            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL,$apiURL);
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($postd));
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            $server_output = curl_exec($ch);

            if($server_output === false)

            echo $server_output;
            echo "<hr>";

            $response = json_decode($server_output);

Something missing?

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