Search
Close this search box.
Search
Close this search box.

< / >

APIs

8. Real-time chat report

URL:

https://wv{{wolkvox_server}}.wolkvox.com/api/v2/real_time.php?api=chats

Description:

This report provides complete and real-time information of all chats that are active in your operation at the time of the query.

Benefit:

It allows administrators to monitor and manage interactions in real time, ensuring that agents are responding promptly and effectively, which improves operational efficiency and customer satisfaction.

How does it work?

  • This API is consumed using the GET method.
  • To consume this API, you must replace {{wolkvox_server}} in the URL with the server nomenclature of the operation.
  • You must use the wolkvox-token: {{token}} header to use the authorization token.
  • Please note that the same token cannot be consumed simultaneously, so you can program the next API to be consumed when the result of the previous one is successful.
  • In terms of time, to track your operation, you can consume the information every 5 minutes.
  • Limit of records that can be downloaded per consumption: 60,000 records.
  • Limit of records that can be uploaded per consumption: 10,000 records.
  • Limit of days consulted in dates: 31 days.
  • Limit of result weight: 256 MB.
  • Limit of API consumption time: 60 seconds.
  • Limit of simultaneous consumption of a token: 2 simultaneous requests.
  • Daily token limit: Number of licenses multiplied by 1000 tokens per day.

Request

NAME DESCRIPTION TYPE
api Type of report required. String

Response

NAME DESCRIPTION TYPE
agent_id Agent extension number. String
active_chats Agent’s active chats. String
conn_id Chat identification number. String
channel Type of channel where the chat is happening. String
connector_id WhatsApp connector identification number. String
customer_phone Customer’s phone number. String
conversation Dataset about a message sent in the conversation. String
from Indicate who sent the message. String
msg Message sent by the sender. String
date Date the message was sent. String
Possible response codes
				
					$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/real_time.php?api=chats',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'wolkvox-token: {{wolkvox-token}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

				
			

RESPONSE

				
					{
    "code": "200",
    "error": null,
    "msg": "x records were found",
    "data": [
        {
            "agent_id": "",
            "active_chats": [
                {
                    "conn_id": "",
                    "channel": "",
                    "connector_id": "",
                    "customer_phone": "",
                    "conversation": [
                        {
                            "from": "",
                            "msg": "",
                            "date": ""
                        }
                    ]
                },
                {
                    "conn_id": "",
                    "channel": "",
                    "connector_id": "",
                    "customer_phone": "",
                    "conversation": [
                        {
                            "from": "",
                            "msg": "",
                            "date": ""
                        }
                    ]
                }
            ]
        },
        {
            "agent_id": "",
            "active_chats": [
                {
                    "conn_id": "",
                    "channel": "",
                    "connector_id": "",
                    "customer_phone": "",
                    "conversation": [
                        {
                            "from": "",
                            "msg": "",
                            "date": ""
                        }
                    ]
                }
            ]
        }
    ]
}
				
			
We use cookies, if you continue browsing we will assume that you agree. You can read more about the use of cookies in our privacy policies and treatment of personal data