The Usage API provides customer usage data across all SparkPost products. This endpoint allows you to retrieve usage metrics for your account, including both current usage and historical data organized by product.
GET /api/v1/usage
{
"results": {
"recipient_validation": {
"day": {
"start": "2021-08-03T14:45:00.000Z",
"end": "2021-08-04T14:45:00.000Z",
"limit": 5000000,
"used": 2
},
"month": {
"start": "2021-07-09T00:00:00.000Z",
"end": "2021-08-09T00:00:00.000Z",
"used": 2
},
"last_usage_date": "2020-08-19",
"timestamp": "2021-08-04T14:50:53.030Z"
},
"messaging": {
"day": {
"start": "2021-08-03T14:45:00.000Z",
"end": "2021-08-04T14:45:00.000Z",
"used": 0
},
"month": {
"start": "2021-08-04T00:00:00.000Z",
"end": "2021-09-04T00:00:00.000Z",
"used": 0
},
"last_usage_date": null,
"timestamp": "2021-08-04T14:50:54.331Z"
}
}
}
Gets customer usage across all products