PlatformXeDocs
Get API Key

Usage

SDK methods for retrieving usage metrics and billing summaries.

The client.usage namespace provides a method for retrieving usage metrics for a billing period. Available in TypeScript, Python, and Go SDKs.

SDKInstallNamespace
TypeScriptnpm install @caldera/platformxe-sdkclient.usage
Pythonpip install platformxeclient.usage
Gogo get github.com/calderax/platformxe-goclient.Usage

Get usage summary

Retrieve aggregated usage metrics for a specific billing month. The month parameter uses YYYY-MM format.

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

console.log(summary.emailsSent);
console.log(summary.smsSent);
console.log(summary.storageUsedMb);
console.log(summary.apiCalls);
console.log(summary.permissionChecks);
console.log(summary.webhookDeliveries);
summary = client.usage.summary(month="2026-04")

print(summary["emailsSent"])
print(summary["apiCalls"])
summary, err := client.Usage.Summary("2026-04")

Response fields

FieldTypeDescription
monthstringBilling month in YYYY-MM format
emailsSentnumberTotal emails dispatched
smsSentnumberTotal SMS messages sent
whatsappSentnumberTotal WhatsApp messages sent
storageUsedMbnumberStorage consumed in megabytes
storageFileCountnumberTotal files stored
apiCallsnumberTotal API requests
permissionChecksnumberTotal permission check operations
webhookDeliveriesnumberTotal webhook delivery attempts
pdfGeneratednumberTotal PDFs rendered
ocrVerificationsnumberTotal OCR verification requests
qrCodesGeneratednumberTotal QR codes generated

Usage data is updated hourly. The current month's data reflects usage up to the last aggregation cycle. Historical months show final totals.

Scopes required

MethodScope
usage.summary()exports:create