BigStatsSign in

Developer documentation

JSON API & MCP access to your delivery data.

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

Bearer tokens, scoped to one workspace.

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

Four read-only 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

Copy, paste, ship.

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

Configurable data elements.

occurred_atISO 8601 timestamp of the event
event_typeinjected · delivered · deferred · bounced · opened · clicked · unsubscribed · complained · rejected
recipient / recipient_domainAddress and receiving domain
isp_groupgmail · microsoft · yahoo · apple · other
campaign_id / mailing_id / message_idIdentifiers passed through from your MTA
sending_ip / vmta / remote_mtaWhich IP and binding sent it, and which server answered
smtp_code / dsn / diagnosticRaw SMTP reply, enhanced status code and diagnostic text
bounce_type / bounce_categoryhard · soft · block, and the classified reason
url / user_agentClick 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

Connect Claude, ChatGPT or any MCP client.

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"
    }
  }
}

Claude

Settings → Connectors → Add custom connector, paste https://bigstats.email/mcp, then complete the BigStats sign-in and approve access.

ChatGPT & others

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_workspacesList the workspaces the signed-in account can report on.
delivery_overviewKPIs and time series for a workspace and range.
domain_breakdownPer-domain or per-ISP performance.
bounce_analysisBounce categories, IP pressure and SMTP codes.
search_eventsRow-level drill-down, without recipient addresses.

Errors

What the API returns when something is off.

401Missing or invalid bearer token — create a new token in API & MCP clients.
403The token lacks the scope this endpoint needs (reports or events). Issue a token with that scope.
400Invalid query parameter. The response includes a detail array naming the field.
500Query failed. Retry with a smaller range or narrower filters.