curl --request POST \
--url https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start": 1751328000,
"end": 1753920000,
"dimensions": "COUNTRY,PRICING_CATEGORY"
}
'import requests
url = "https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics"
payload = {
"start": 1751328000,
"end": 1753920000,
"dimensions": "COUNTRY,PRICING_CATEGORY"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({start: 1751328000, end: 1753920000, dimensions: 'COUNTRY,PRICING_CATEGORY'})
};
fetch('https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics', 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://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'start' => 1751328000,
'end' => 1753920000,
'dimensions' => 'COUNTRY,PRICING_CATEGORY'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics"
payload := strings.NewReader("{\n \"start\": 1751328000,\n \"end\": 1753920000,\n \"dimensions\": \"COUNTRY,PRICING_CATEGORY\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"start\": 1751328000,\n \"end\": 1753920000,\n \"dimensions\": \"COUNTRY,PRICING_CATEGORY\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"start\": 1751328000,\n \"end\": 1753920000,\n \"dimensions\": \"COUNTRY,PRICING_CATEGORY\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"handle": "3fa07e9dcae4471cbfd0d0e28f6c5a1a",
"result": {},
"error": {
"code": 123,
"message": "<string>"
}
}
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}Request WABA Account Analytics
Request WABA account analytics; returns a handle to poll for the result.
curl --request POST \
--url https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start": 1751328000,
"end": 1753920000,
"dimensions": "COUNTRY,PRICING_CATEGORY"
}
'import requests
url = "https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics"
payload = {
"start": 1751328000,
"end": 1753920000,
"dimensions": "COUNTRY,PRICING_CATEGORY"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({start: 1751328000, end: 1753920000, dimensions: 'COUNTRY,PRICING_CATEGORY'})
};
fetch('https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics', 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://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'start' => 1751328000,
'end' => 1753920000,
'dimensions' => 'COUNTRY,PRICING_CATEGORY'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics"
payload := strings.NewReader("{\n \"start\": 1751328000,\n \"end\": 1753920000,\n \"dimensions\": \"COUNTRY,PRICING_CATEGORY\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"start\": 1751328000,\n \"end\": 1753920000,\n \"dimensions\": \"COUNTRY,PRICING_CATEGORY\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.timelines.ai/integrations/api/waba/accounts/{account_id}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"start\": 1751328000,\n \"end\": 1753920000,\n \"dimensions\": \"COUNTRY,PRICING_CATEGORY\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"handle": "3fa07e9dcae4471cbfd0d0e28f6c5a1a",
"result": {},
"error": {
"code": 123,
"message": "<string>"
}
}
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
an internal id of the WABA account (the only value used to address this account)
Body
Analytics request parameters.
Window start as a UNIX timestamp (seconds). A start older than 365 days is silently clamped to the last 365 days.
1751328000
Window end as a UNIX timestamp (seconds). An end in the future is clamped to now.
1753920000
Optional comma-separated pricing breakdown dimensions. Allowed values: COUNTRY, PRICING_CATEGORY, PRICING_TYPE (e.g. "COUNTRY,PRICING_CATEGORY", surrounding whitespace tolerated). Applies to the pricing_analytics breakdown only; the messaging analytics block is unaffected. Omitted or empty yields flat pricing points with no breakdown keys.
"COUNTRY,PRICING_CATEGORY"

