SMAO API Documentation
Distributor API v1Usage

Get usage for a single organization

GET
/organizations/{organizationId}/usage

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/usage?from=2019-08-24&to=2019-08-24"
{  "status": "success",  "organization": {    "id": "69c175970f3e28310926a1aa",    "name": "string",    "externalCustomerId": "string"  },  "period": {    "from": "2019-08-24T14:15:22Z",    "to": "2019-08-24T14:15:22Z"  },  "usage": {    "calls": {      "count": 0,      "minutes": 0    },    "forwards": {      "count": 0,      "minutes": 0    },    "assistants": 0,    "sms": {      "count": 0,      "segments": 0    },    "whatsapp": 0  }}