Get usage for the authenticated account's organization (new billing model).
const url = 'https://api.pingram.io/organization/usage';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.pingram.io/organization/usage \ --header 'Authorization: Bearer <token>'Authorizations
Responses
200
Successful response
Response for GET /account/organization/usage
object
Total costs for the billing cycle (all channel costs + number rent)
object
Per-channel usage breakdown
object
Billing cycle start date (ISO string)
Billing cycle end date (ISO string)
Examplegenerated
{ "costs": { "NUMBER": 1 }, "counts": { "EMAIL": 1, "INAPP_WEB": 1, "SMS": 1, "CALL": 1, "PUSH": 1, "WEB_PUSH": 1, "SLACK": 1 }, "billingCycleStart": "example", "billingCycleEnd": "example"}400
Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}401
Unauthorized
402
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}500
Internal Server Error
502
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}