Counters: Reading

Get Hourly

Hour by hour (UTC), to see how a send is going right now. Only hours with sends are listed.

POSThttps://g.sendcorex.com/v1/counterscommand: get_hourly
i

Needs the counters:read scope on your API key.

i

Up to 7 days per command.

Arguments

  • fromstringrequired

    Start, RFC 3339. The hour it falls in is included.

    e.g. "2026-10-17T00:00:00Z"

  • tostringrequired

    End, 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

  • hourly

    One entry per hour with sends, oldest first.

  • hourly[].hour

    The start of the hour, RFC 3339 UTC.

  • hourly[].delivered / bounced / blocked / complaints / rate_limited

    The 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.

  • 401INVALID_API_KEY

    The API key does not exist, was revoked or was disabled in the dashboard.

  • 429RATE_LIMITED

    More than 15 requests/s or 15 in flight for the same IP + API key. Wait the number of seconds in Retry-After.

  • CMDMISSING_SCOPE

    The API key does not have `counters:read`.

  • CMDINVALID_ARGS

    An 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…

  • CMDINTERNAL

    Server error. The detail is only written to the server log.