PlatformXeDocs
Get API Key

Usage Summary

View per-service usage for a calendar month.

The usage summary endpoint returns your organisation's usage per PlatformXe service for one calendar month (UTC), set against your plan's limits where the plan has one.

Endpoint

GET /api/v1/usage/summary

Scope: none. Any valid key may call it, except a dedicated MCP key (one naming mcp:connect, refused 403 MCP_KEY_NOT_DEDICATED); it answers only for the key's own organisation.

Rate limit: 1,000/hr

Query parameterDescription
monthYYYY-MM (UTC). Defaults to the current month. Anything else answers 400 VALIDATION_ERROR.
serviceOptional: only this service (for example sms).

curl

curl "https://api.platformxe.com/api/v1/usage/summary?month=2026-11" \
  -H "x-api-key: pxk_live_your_api_key_here"

SDK

const usage = await client.usage.summary({ month: '2026-11' });

for (const s of usage.services) {
  console.log(`${s.service}: ${s.used} of ${s.limit ?? 'no limit'}`);
}
console.log(usage.totalBillableEvents);

Response

{
  "success": true,
  "data": {
    "month": "2026-11",
    "organization": "org_abc123",
    "services": [
      { "service": "email", "used": 4250, "limit": 50000, "percentUsed": 8.5 },
      { "service": "sms", "used": 120, "limit": 1000, "percentUsed": 12 },
      { "service": "storage", "used": 2147483648, "limit": 10737418240, "percentUsed": 20 },
      { "service": "whatsapp", "used": 40, "limit": null, "percentUsed": null }
    ],
    "totalBillableEvents": 4428
  }
}

Fields

FieldDescription
monthThe month reported, YYYY-MM (UTC).
organizationYour organisation's id.
services[].serviceThe service: email, sms, whatsapp, storage, ocr, pdf, qr and others you use. A service appears once it has usage in the month.
services[].usedThe month's usage in the service's unit: a count of calls or messages, except storage.
services[].used (storage)The bytes your organisation stores now (its live media files and its live fixed documents), whatever month you ask for. It is set against the storage limit, which is a capacity, and is never negative. Storage appears whenever you store anything.
services[].limitThe plan's limit for the service, or null where the plan sets none.
services[].limit (storage)The storage your organisation's allowance includes: your organisation's own storage limit when your contract sets one (a limit of 0 means no storage is included), otherwise your plan's. Storage above it is charged; uploads are not refused. null when your organisation's storage is not capped.
services[].percentUsedused as a percentage of limit (two decimals), or null without a limit.
totalBillableEventsThe number of usage events in the month across every service. An upload counts once; bytes are never added to it.

Usage rows are recorded after a call succeeds, at ₦0 for the services your plan includes (SMS, WhatsApp, OCR, PDF, QR and storage). Recording never fails or delays the call it records.

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

Error responses

CodeDescription
BAD_REQUESTThe key has no organisation (a platform key)
VALIDATION_ERRORmonth is not YYYY-MM, or its month is not 01 to 12
NOT_FOUNDThe organisation was not found