Get Messages
Returns an organization’s WhatsApp message analytics: summary cards at the top and a time series below.
The source is ClickHouse with no caching, so every request returns the most up-to-date data. Scope it org-wide (all apps) or to selected apps, and bucket it by a date range and a granularity.
Invariants. Σ series[].sentMessages == summary.sentMessages, and the same holds for templateMessages and receivedMessages. templateMessages never exceeds sentMessages.
curl --request GET \
--url https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"summary": {
"totalMessages": 845,
"sentMessages": 600,
"receivedMessages": 245,
"templateMessages": 410
},
"series": [
{
"timestamp": "2026-06-01T00:00:00",
"totalMessages": 300,
"sentMessages": 210,
"receivedMessages": 90,
"templateMessages": 150
},
{
"timestamp": "2026-06-02T00:00:00",
"totalMessages": 280,
"sentMessages": 200,
"receivedMessages": 80,
"templateMessages": 140
}
]
},
"isSuccess": true
}{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}{
"errors": {
"code": "VAL_019",
"group": "VALIDATION",
"description": "Invalid date range."
},
"isSuccess": false
}{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}Authorizations
Secret key in Bearer sk_... format. Server-to-server only — never embed it in a browser or mobile client. The organization is resolved from the key, so organization_id is never passed explicitly.
Query Parameters
Repeatable. Omit to include every app in the organization, or repeat it (?appId=app_AAA&appId=app_BBB) to scope to specific apps. An ID that does not belong to the organization returns 404.
ISO-8601 datetime. Start of the range. Defaults to today 00:00:00 UTC.
"2026-06-01T00:00:00"
ISO-8601 datetime. End of the range; must be greater than startDate. Defaults to today 23:59:59 UTC.
"2026-06-08T00:00:00"
How the series is bucketed. Any other value returns 422.
hourly, daily, weekly, monthly curl --request GET \
--url https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.gateway.connexease.com/api/v1/wa/analytics/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"summary": {
"totalMessages": 845,
"sentMessages": 600,
"receivedMessages": 245,
"templateMessages": 410
},
"series": [
{
"timestamp": "2026-06-01T00:00:00",
"totalMessages": 300,
"sentMessages": 210,
"receivedMessages": 90,
"templateMessages": 150
},
{
"timestamp": "2026-06-02T00:00:00",
"totalMessages": 280,
"sentMessages": 200,
"receivedMessages": 80,
"templateMessages": 140
}
]
},
"isSuccess": true
}{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}{
"errors": {
"code": "VAL_019",
"group": "VALIDATION",
"description": "Invalid date range."
},
"isSuccess": false
}{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}