Counters: Reading
Get Hourly
Hour by hour (UTC), to see how a send is going right now. Only hours with sends are listed.
https://g.sendcorex.com/v1/counterscommand: get_hourlyNeeds the counters:read scope on your API key.
Up to 7 days per command.
Arguments
fromstringrequiredStart, RFC 3339. The hour it falls in is included.
e.g.
"2026-10-17T00:00:00Z"tostringrequiredEnd, RFC 3339. The hour it falls in is included.
e.g.
"2026-10-17T23:59:59Z"
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/counters',
{
commands: [
{
command: "get_hourly",
args: {
from: "2026-10-17T00:00:00Z",
to: "2026-10-17T23:59:59Z"
}
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);
const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);Response
{
"type": "SUCCESS",
"results": [
{
"command": "get_hourly",
"id": "0",
"type": "SUCCESS",
"took_ms": 18,
"data": {
"hourly": [
{
"hour": "2026-10-17T06:00:00Z",
"delivered": 182,
"bounced": 3,
"blocked": 1,
"complaints": 0,
"rate_limited": 0
}
]
}
}
]
}Response fields
hourlyOne entry per hour with sends, oldest first.
hourly[].hourThe start of the hour, RFC 3339 UTC.
hourly[].delivered / bounced / blocked / complaints / rate_limitedThe counters of that hour (no total or rates here).
Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
INVALID_API_KEYThe API key does not exist, was revoked or was disabled in the dashboard.
- 429
RATE_LIMITEDMore than 15 requests/s or 15 in flight for the same IP + API key. Wait the number of seconds in Retry-After.
- CMD
MISSING_SCOPEThe API key does not have `counters:read`.
- CMD
INVALID_ARGSAn argument is invalid: a month that is not YYYY-MM, a day that is not YYYY-MM-DD, an unknown timezone, from later than to, a range that is too long…
- CMD
INTERNALServer error. The detail is only written to the server log.