Skip to content

Get historical usage for the authenticated account's organization over a date range.

GET
/organization/usage/history
curl --request GET \
--url 'https://api.pingram.io/organization/usage/history?startDate=example&endDate=example' \
--header 'Authorization: Bearer <token>'

Authorizations

Parameters

Query Parameters

startDate
required
string

Start date (YYYY-MM-DD) for the range

endDate
required
string

End date (YYYY-MM-DD) for the range

Responses

200

Successful response

Media typeapplication/json

Response for GET /organization/usage/history

object
items
required

Array of usage items, one per month in the requested range

Array<object>

Single usage item in historical response

object
yearMonth
required

Year-month (YYYY-MM) for this usage period

string
counts
required
object
EMAIL
required
number
INAPP_WEB
required
number
SMS
required
number
CALL
required
number
PUSH
required
number
WEB_PUSH
required
number
SLACK
required
number
Examplegenerated
{
"items": [
{
"yearMonth": "example",
"counts": {
"EMAIL": 1,
"INAPP_WEB": 1,
"SMS": 1,
"CALL": 1,
"PUSH": 1,
"WEB_PUSH": 1,
"SLACK": 1
}
}
]
}

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"
}
}