Skip to content

Get usage for the authenticated account's organization (new billing model).

GET
/organization/usage
curl --request GET \
--url https://api.pingram.io/organization/usage \
--header 'Authorization: Bearer <token>'

Authorizations

Responses

200

Successful response

Media typeapplication/json

Response for GET /account/organization/usage

object
costs

Total costs for the billing cycle (all channel costs + number rent)

object
NUMBER
number
key
additional properties
number
counts

Per-channel usage breakdown

object
EMAIL
required
number
INAPP_WEB
required
number
SMS
required
number
CALL
required
number
PUSH
required
number
WEB_PUSH
required
number
SLACK
required
number
billingCycleStart
required

Billing cycle start date (ISO string)

string
billingCycleEnd
required

Billing cycle end date (ISO string)

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

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

401

Unauthorized

402

Payment Required - usage limits exceeded

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

500

Internal Server Error

502

Bad Gateway - provider error

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}