SMAO API Documentation
Distributor API v1Usage

Get aggregated usage across all organizations

GET
/usage

Returns aggregated usage across all customer organizations under this distributor. Optionally filter by partnerId to scope results to a single MSP's customers.

Authorization

DistributorApiKey
AuthorizationBearer <token>

Long-lived distributor API key scoped to a channel partner on the shared smao instance.

In: header

Query Parameters

from*string

Start date in YYYY-MM-DD format, inclusive.

Formatdate
to*string

End date in YYYY-MM-DD format, inclusive.

Formatdate
partnerId?string

Filter results to a specific partner (MSP). Omit to include all organizations.

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

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/usage?from=2019-08-24&to=2019-08-24"
{  "status": "success",  "period": {    "from": "2019-08-24",    "to": "2019-08-24"  },  "totals": {    "calls": {      "count": 0,      "minutes": 0    },    "forwards": {      "count": 0,      "minutes": 0    },    "assistants": 0,    "sms": {      "count": 0,      "segments": 0    },    "whatsapp": 0  },  "organizationCount": 0,  "organizations": [    {      "id": "69c175970f3e28310926a1aa",      "name": "string",      "externalCustomerId": "string",      "usage": {        "calls": {          "count": 0,          "minutes": 0        },        "forwards": {          "count": 0,          "minutes": 0        },        "assistants": 0,        "sms": {          "count": 0,          "segments": 0        },        "whatsapp": 0      }    }  ]}