Developer documentation
Pull deliveries, bounces, deferrals, opens and clicks into your own warehouse, dashboards or scripts over a read-only JSON/CSV API — or connect Claude, ChatGPT and other LLM clients directly to BigStats over the Model Context Protocol.
Authentication
Create a token in the console under API & MCP clients. The full value is shown once; only a SHA-256 hash is stored. Send it on every request as Authorization: Bearer <token>. Tokens are read-only and cannot modify data or reach any other workspace. Each token carries explicit scopes — reports for aggregate endpoints and events for raw rows with recipient addresses. The same screen shows last-used timestamps, lists every connected MCP/OAuth assistant, and revokes either instantly.
Base URL
https://bigstats.email/api/public/v1
Endpoints
GET /api/public/v1/overview
Delivery KPIs and a time series for the workspace: injected, delivered, deferred, bounced, opened, clicked, complaints, plus the previous period for comparison.
Query: range=24h|7d|30d|90d (default 7d)
GET /api/public/v1/domains
Per-receiver performance grouped by recipient domain or ISP group.
Query: range=…, group_by=domain|isp (default domain)
GET /api/public/v1/bounces
Bounce and deferral diagnostics: category mix, sending-IP pressure and top SMTP response codes.
Query: range=…
GET /api/public/v1/events
Row-level events with all configurable fields (opens, clicks, bounce detail, SMTP code, DSN, diagnostic, VMTA, sending IP). JSON or CSV.
Query: event_type, domain, campaign_id, from (ISO 8601), to (ISO 8601), limit (1–5000, default 500), format=json|csv
Examples
cURL — overview
curl -s "https://bigstats.email/api/public/v1/overview?range=7d" \ -H "Authorization: Bearer $BIGSTATS_TOKEN"
cURL — bounce CSV export
curl -s "https://bigstats.email/api/public/v1/events?event_type=bounced&range=7d&format=csv&limit=5000" \ -H "Authorization: Bearer $BIGSTATS_TOKEN" -o bounces.csv
JavaScript / TypeScript
const res = await fetch(
"https://bigstats.email/api/public/v1/domains?range=30d&group_by=isp",
{ headers: { Authorization: `Bearer ${process.env.BIGSTATS_TOKEN}` } },
);
if (!res.ok) throw new Error(`BigStats API ${res.status}`);
const { rows } = await res.json();
for (const r of rows) {
console.log(r.bucket, r.delivered, r.bounced);
}Python
import os, requests
r = requests.get(
"https://bigstats.email/api/public/v1/events",
params={"event_type": "bounced", "limit": 1000},
headers={"Authorization": f"Bearer {os.environ['BIGSTATS_TOKEN']}"},
timeout=30,
)
r.raise_for_status()
for e in r.json()["events"]:
print(e["occurred_at"], e["smtp_code"], e["bounce_category"], e["diagnostic"])Example response — /overview
{
"range": "7d",
"from": "2026-07-28T19:00:00.000Z",
"to": "2026-08-04T19:00:00.000Z",
"totals": {
"injected": 41293811, "delivered": 40510442, "deferred": 612004,
"bounced": 402118, "opened": 9120344, "clicked": 1044219, "complained": 3122
},
"previous": { "delivered": 38911204, "bounced": 448190 },
"series": [{ "bucket": "2026-07-28", "delivered": 5712001, "bounced": 61224 }]
}Event fields
| occurred_at | ISO 8601 timestamp of the event |
| event_type | injected · delivered · deferred · bounced · opened · clicked · unsubscribed · complained · rejected |
| recipient / recipient_domain | Address and receiving domain |
| isp_group | gmail · microsoft · yahoo · apple · other |
| campaign_id / mailing_id / message_id | Identifiers passed through from your MTA |
| sending_ip / vmta / remote_mta | Which IP and binding sent it, and which server answered |
| smtp_code / dsn / diagnostic | Raw SMTP reply, enhanced status code and diagnostic text |
| bounce_type / bounce_category | hard · soft · block, and the classified reason |
| url / user_agent | Click destination and the client that generated the open or click |
Raw event queries are bounded to a rolling window for performance; aggregate endpoints read from pre-computed rollups and stay fast at billion-per-day volume. Rate limit: 60 requests per minute per token.
MCP server
BigStats exposes a Model Context Protocol server so an LLM can query your delivery reporting directly and answer questions like “why did Microsoft bounce rate double yesterday?”. The connection uses OAuth: you sign in to BigStats and approve the client, and every tool call then runs as your account — scoped to your workspaces, read-only, with recipient addresses never exposed.
MCP endpoint (Streamable HTTP)
https://bigstats.email/mcp
Client config (Claude Desktop / Cursor style)
{
"mcpServers": {
"bigstats": {
"url": "https://bigstats.email/mcp"
}
}
}Settings → Connectors → Add custom connector, paste https://bigstats.email/mcp, then complete the BigStats sign-in and approve access.
Add BigStats as a remote MCP server using the same URL. Clients that support dynamic registration configure themselves; no client ID or secret to create.
| list_workspaces | List the workspaces the signed-in account can report on. |
| delivery_overview | KPIs and time series for a workspace and range. |
| domain_breakdown | Per-domain or per-ISP performance. |
| bounce_analysis | Bounce categories, IP pressure and SMTP codes. |
| search_events | Row-level drill-down, without recipient addresses. |
Errors
| 401 | Missing or invalid bearer token — create a new token in API & MCP clients. |
| 403 | The token lacks the scope this endpoint needs (reports or events). Issue a token with that scope. |
| 400 | Invalid query parameter. The response includes a detail array naming the field. |
| 500 | Query failed. Retry with a smaller range or narrower filters. |