Get Monthly Usage

All the usage data will be returned for the accounts under the organization. The data is aggregated by month for each product. A 403 error is returned if the specified accounts are not under the organization performing the call. The results are paged.

👍

Access and Registration

Authentication

🚧

If you're a reseller, please check how to get entitled to this API here.

Scope

express-accounts-usage:read

Body Response - Schema

200 OK

ParameterTypeDescription
firstobject"first" subdivides into:

1 - "href" (string) - The link to the first page.
lastobject"last" subdivides into:

1 - "href" (string) - The link to the last page.
nextobject"next" subdivides into:

1 - "href" (string) - The link to the next page.
prevobject"prev" subdivides into:

1 - "href" (string) - The link to the previous page.
selfobject"self" subdivides into:

1 - "href" (string) - The link to the current page.
showobject"show" subdivides into:

1 - "href" (string) - The current link.
_embeddedobject"_embedded" subdivides into:

1 - "usage" (array[object]).
1.1 - "id" (string) - The ID of the record.
Example: 8f3e643c16671acaf60e8bceddbc1877

1.2 - "account ID"(string) - The ID of the account.
Example: 5ea75fe7aa224700012eae40

1.3 - "product_id"(string) - The ID of the product.
Example: "TD-LIC-APP-RC-101910"

1.4 - "aggr_product_id"(string) - Aggregated product ID.
Example: "TD-USG-TEL-UG-102213"

1.5 - month"(string) - The year and month of the usage aggregate.
Example: 2023-08

1.6 - "type"(string) - The type of usage. Allowed values:
AMD
API_REQUEST
CALL
CALL_SERVICE
CREDIT_COMMIT
DIALER
MESSAGE
NUMBER
PRODUCT_SERVICE
RECHARGE
SPEECH_TRANSCRIPTION
VOICEMAIL_TRANSCRIPTION
OTHER

Example:
NUMBER

1.7 - "description"(string) - A description of the usage type.
Example: SIP Number

1.8 - "currency (string) - The 3 chars ISO code of the currency for the invoice according to ISO-4217 (https://www.iso.org/iso-4217-currency-codes.html ).
Example: USD

1.9 - "direction"(string) - The direction of the interaction, when applicable, NULL otherwise. Allowed values:
INBOUND
OUTBOUND
OTHER

Example:
INBOUND

1.10 - "resolution"(string) - The type of interaction resolution or NULL if not applicable.
Allowed values:
ABANDONED
ANSWERED
MACHINE
MISSED
VOICEMAIL
OTHER

Example:
null

1.11 - "unit"(string) - The unit of measure. Allowed values:
CHARS
CONVERSATIONS
GB
MINUTES
NUMBERS
PAGES
REQUESTS
SECONDS
SEGMENTS
SESSIONS
OTHER

Example:
MINUTES

1.12 - price"(number) - The price of each unit.
Example: 1

1.13 - "wallet_name (string)
Example: contact center

1.14 - "number_of_units"(number) - The number of units in the aggregate.
Example: 5

1.15 - "total_amount"(number) - The total amount in the usage aggregate in the currency specified in the currency field.
Example:5
_linksobject"_links" subdivides into:

1 - "first" (object)
1.1 - "href" (string) - The link to the first page.

2. - "last" (object)
2.1 - "href" (string) - The link to the last page.

3. - "next" (object)
3.1 - "href" (string) - The link to the last page.

4. - "prev" (object)
4.1 - "href" (string) - The link to the previous page.

5 - "self" (object)
5.1 - "href" (string) - The link to the current page.

400 (bad request), 401 (unauthorized), 403 (This caller is not authorized to query the given accounts. The accounts specified are not under the organization owning the current authentication token.)

ParameterTypeDescriptionRequired
codestringn/ayes
messagestringn/ayes
descriptionstringn/ano
fields array[object]"fields" subdivides into:

"name" (string)

"description" (string)
yes (name and description)

❗️

API Availability

The Billing Insights API becomes available on January 31st, 2024.

🚧

Troubleshooting

If you have any questions regarding the usage of this API, or if you’re having any technical issues, please open a ticket using this form.

Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!