Platform API/ Platform usage
Platform API

Platform usage

Monthly usage for every site key under a platform key, for billing and dashboards.

GET /v1/partner/usage Platform key
Query
month string default current month

Month as YYYY-MM.

curl "https://api.spamex.dev/v1/partner/usage?month=2026-09" -H "Authorization: Bearer $PLATFORM_KEY"
{
  "platform": "Acme Forms",
  "month": "2026-09",
  "sites": [
    { "id": 7,  "name": "Acme Forms",                     "key_prefix": "sk_A1b2C3d4", "revoked": false, "by_stage": { "rules": 0,   "ml": 12,   "llm": 1 },  "total": 13,   "quota": 250000 },
    { "id": 42, "name": "form_8f2a (acme-plumbing.com)",  "key_prefix": "sk_Ljq2ji7x", "revoked": false, "by_stage": { "rules": 312, "ml": 4021, "llm": 187 }, "total": 4520, "quota": 250000 },
    { "id": 43, "name": "form_91c0 (northside-dental.com)", "key_prefix": "sk_Qz8yW3vK", "revoked": true,  "by_stage": { "rules": 40,  "ml": 610,  "llm": 22 },  "total": 672,  "quota": 250000 }
  ],
  "by_stage": { "rules": 352, "ml": 4643, "llm": 210 },
  "total": 5205
}

The first entry is the platform key’s own traffic; the rest are its site keys in id order, revoked ones included so that last month’s invoices still add up. by_stage and total at the top level sum everything.

Use total per site for your billing, the llm share as a health signal, and quota to warn customers who are near their allowance. Per-key detail for one form is also available with that form’s own key through GET /v1/usage.

↑↓ navigate↵ openDocs and blog