WhatsApp Gateway
API referenceOverview

Get the workspace overview

GET
/api/v1/overview

Returns an activity summary for the caller's organization over a recent window: messages received and sent, active chats, failed sends, and webhook delivery outcomes. Each count is returned as a window total and as a per-bucket series for charts. Requires the read capability.

Buckets. range=24h returns 24 hourly buckets; 7d, 14d and 30d return 7, 14 or 30 daily buckets. Buckets are aligned to the tz time zone and listed in buckets as epoch-millisecond start times, oldest first. The last bucket contains the current moment, so it is partial. Every series has one entry per bucket, and buckets without activity are 0.

What is counted. Messages are bucketed by their WhatsApp timestamp. Failed sends and webhook deliveries are bucketed by when they were created, using their current status. hasSentMessage and retentionDays describe the organization and do not depend on the window. Session states, API keys and webhook configuration are not included; use GET /sessions and GET /webhooks for those.

Errors: validation_error if range or tz is invalid; not_found if session is not owned by the caller's organization; forbidden if the caller lacks the read capability.

Authorization

AuthorizationBearer <token>

Send Authorization: Bearer <token>. The token can be a login JWT from the frontend or an api-key for a script. JWT access comes from the person's organization role. Api-key access comes from the permissions saved on the key.

In: header

Query Parameters

range?string

How far back to look. 24h returns the last 24 hours in hourly buckets; 7d, 14d and 30d return the last 7, 14 or 30 days in daily buckets (today included, so the last bucket is partial).

Default"7d"
Example"7d"

Value in

  • "24h"
  • "7d"
  • "14d"
  • "30d"
tz?string

IANA time zone name used to align buckets: hourly buckets start on the hour and daily buckets start at midnight in this zone. Pass the viewer's zone so days match their calendar. An unknown zone fails with validation_error.

Default"UTC"
Example"Asia/Jakarta"
session?string

Optional session id. When set, messages, active chats, failed sends and webhook deliveries are counted for this session only. Must belong to the caller's organization, otherwise the request fails with not_found. Omit to count all of the organization's sessions.

Example"01HHX5SESSION..."

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/overview"
{  "buckets": [    1760029200000,    1760115600000,    1760202000000,    1760288400000,    1760374800000,    1760461200000,    1760547600000  ],  "from": 1760029200000,  "hasSentMessage": true,  "range": "7d",  "retentionDays": 0,  "series": {    "messagesReceived": [      180,      201,      164,      190,      175,      166,      158    ],    "messagesSent": [      80,      92,      77,      85,      81,      79,      73    ],    "sendsFailed": [      0,      1,      0,      0,      2,      0,      0    ],    "webhookDeliveries": [      160,      170,      150,      165,      155,      152,      148    ],    "webhookFailures": [      2,      1,      0,      4,      3,      2,      1    ]  },  "to": 1760600000000,  "totals": {    "activeChats": 42,    "messagesReceived": 1234,    "messagesSent": 567,    "sendsFailed": 3,    "webhookDeliveries": 1100,    "webhookFailures": 13  },  "tz": "Asia/Jakarta"}
{  "error": {    "code": "not_found",    "details": {      "property1": null,      "property2": null    },    "message": "session not found"  }}