Skip to content

GetStatusStatistic#

Beta version

The functionality is in beta mode. Features are subject to change and may also work unstably. There may be additional charges for functionality in the future.

The method returns an array of recipients marked sent/delivered/read for a given status.

To receive the log of messages sent from the phone, you need to enable the Receive webhooks on sent messages statuses setting using the SetSettings method or through the personal account (Messages received before enabling this setting will not be included in the outgoing message log).

It may take up to 5 minutes for the settings to take effect.

Request#

To get array of statuses, you have to execute a request at:

GET {{APIUrl}}/waInstance{{idInstance}}/getStatusStatistic/{{apiTokenInstance}}?idMessage={{id_Message}}

For idInstance and apiTokenInstance request parameters, refer to Before you start section.

URL request parameters#

Parameter Type Mandatory Description
idMessage string Yes Status message ID

Response#

Response parameters#

Array of objects with parameters:

Parameter Type Description
participant array Contact ID
timestamp integer Message acceptance time in UNIX format
status string Outgoing message status, possible variants:
sent - sent
delivered - delivered
read - read/seen/heard

Response body example#

[
    {
        "timestamp": 1587129319,
        "participant": "11001234567@c.us",
        "status": "read",
    },
    {
        "timestamp": 1587129319,
        "participant": "71234567891@c.us",
        "status": "read",
    },
]

GetStatusStatistic errors#

For a list of errors common to all methods, refer to Common errors section

Request examples#

import requests

url = "{{APIUrl}}/waInstance{{idInstance}}/getStatusStatistic/{{apiTokenInstance}}"

payload = {}
headers= {}

response = requests.request("GET", url, headers=headers, data = payload)

print(response.text.encode('utf8'))
curl --location '{{APIUrl}}/waInstance{{idInstance}}/getStatusStatistic/{{apiTokenInstance}}?idMessage=BAE57C4EEC000000'
var restTemplate = new RestTemplate();
var requestUrl = new StringBuilder();
requestUrl
    .append({{APIUrl}})
    .append("/waInstance").append({{idInstance}})
    .append("/getStatusStatistic/")
    .append({{apiTokenInstance}});

var response = restTemplate.exchange(requestUrl.toString(), HttpMethod.GET, null, String.class);
System.out.println(response);
var requestUrl = new StringBuilder();
requestUrl
    .append({{APIUrl}})
    .append("/waInstance").append({{idInstance}})
    .append("/getStatusStatistic/")
    .append({{apiTokenInstance}});

var response = Unirest.get(requestUrl.toString())
    .header("Content-Type", "application/json")
    .asString();

System.out.println(response);