SMAO API Documentation
Distributor API v1Billing

Get billing summary for a single organization

GET
/organizations/{organizationId}/billing-summary

Returns usage for the requested date window compared against the organization's current subscription plan. The date range must not exceed 31 days (DATE_RANGE_TOO_LARGE); a window over 365 days answers INVALID_DATE_RANGE. Neither date may be after today (UTC), so a window for the current month ends today. Usage is compared against the plan's included allowances and any overages are calculated with the plan's per-unit overage cost.

Authorization

DistributorApiKey
AuthorizationBearer <token>

Long-lived distributor API key, scoped to your distributor account.

In: header

Path Parameters

organizationId*string

Organization ID (24-character hex string).

Match^[a-fA-F0-9]{24}$

Query Parameters

from*string

Start date in YYYY-MM-DD format, inclusive. Must not be after today (UTC).

Formatdate
to*string

End date in YYYY-MM-DD format, inclusive. Must not be after today (UTC), so a window for the current month ends today, not on the last day of the month. Usage windows may cover at most 365 days, billing-summary windows at most 31 days.

Formatdate

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organizations/665abc123def456789012345/billing-summary?from=2019-08-24&to=2019-08-24"
{  "status": "success",  "organization": {    "id": "69c175970f3e28310926a1aa",    "name": "Acme GmbH",    "externalCustomerId": "CUST-4711",    "externalContractId": "CON-2026-0001"  },  "window": {    "from": "2026-03-01",    "to": "2026-03-31"  },  "plan": {    "id": "6967b1c7138bed3e7f6bf7e6",    "slug": "advanced",    "name": "Advanced",    "commitment": "monthly",    "currency": "EUR",    "baseFee": 6900  },  "usage": {    "callMinutes": {      "included": 500,      "used": 623,      "overage": 123,      "costPerUnit": 15,      "overageCost": 1845,      "callCount": 247    },    "forwardingMinutes": {      "included": 100,      "used": 45,      "overage": 0,      "costPerUnit": 25,      "overageCost": 0,      "callCount": 18    },    "sms": {      "included": 200,      "used": 312,      "overage": 112,      "costPerUnit": 10,      "overageCost": 1120,      "messageCount": 298    },    "whatsapp": {      "included": 100,      "used": 0,      "overage": 0,      "costPerUnit": 5,      "overageCost": 0,      "messageCount": 0    },    "additionalAssistants": {      "included": 3,      "used": 5,      "overage": 2,      "costPerUnit": 990,      "overageCost": 1980    }  },  "totals": {    "totalOverageCost": 4945,    "currency": "EUR"  }}