PlatformXeDocs
Get API Key

Usage Summary

View per-service usage for the current billing period.

The usage summary endpoint returns aggregated usage metrics for each PlatformXe service during the current billing period.

Endpoint

GET /api/v1/usage/summary

Scope: events:read

Rate limit: 1,000/hr

curl

curl https://api.platformxe.com/api/v1/usage/summary \
  -H "x-api-key: pxk_live_your_api_key_here"

SDK

const usage = await px.getUsageSummary();

console.log(usage.data.period);
// { start: "2026-04-01T00:00:00Z", end: "2026-04-30T23:59:59Z" }

for (const service of usage.data.services) {
  console.log(`${service.name}: ${service.used} / ${service.limit}`);
}

Response

{
  "success": true,
  "data": {
    "period": {
      "start": "2026-04-01T00:00:00.000Z",
      "end": "2026-04-30T23:59:59.999Z"
    },
    "plan": "PRO",
    "services": [
      { "name": "email", "used": 4250, "limit": 50000, "unit": "messages" },
      { "name": "sms", "used": 120, "limit": 5000, "unit": "messages" },
      { "name": "storage", "used": 2048, "limit": 10240, "unit": "MB" },
      { "name": "permissions_checks", "used": 18500, "limit": 500000, "unit": "checks" },
      { "name": "pdf_generation", "used": 85, "limit": 1000, "unit": "documents" },
      { "name": "ocr", "used": 30, "limit": 500, "unit": "extractions" },
      { "name": "identity", "used": 15, "limit": 200, "unit": "lookups" }
    ]
  }
}

Fields

FieldDescription
nameService identifier
usedCurrent usage count
limitPlan allowance for this billing period
unitUnit of measurement

Monitor usage proactively by subscribing to billing.usage.threshold events. PlatformXe emits warnings at 80% and 95% of plan limits.

Error responses

CodeDescription
FORBIDDENAPI key missing required scope