---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://docs.sendcorex.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://docs.sendcorex.com/llms.txt"
---

Source: https://docs.sendcorex.com/it/api-reference/counters/reading/get-hourly

Contatori: Lettura

# Ottieni orari

Ora per ora (UTC), per vedere come sta andando un invio adesso. Sono elencate solo le ore con invii.

POST `https://g.sendcorex.com/v1/counters` command: get_hourly

Richiede lo scope `counters:read` sulla tua API key.

Fino a 7 giorni per comando.

## Argomenti

- `from` string obbligatorio
Inizio, RFC 3339. L'ora in cui cade è inclusa.
es. `"2026-10-17T00:00:00Z"`
- `to` string obbligatorio
Fine, RFC 3339. L'ora in cui cade è inclusa.
es. `"2026-10-17T23:59:59Z"`

## Avvio rapido

```
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);
```

## Risposta

```
{
  "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
          }
        ]
      }
    }
  ]
}
```

### Campi della risposta

- `hourly`
Una voce per ogni ora con invii, dalla più vecchia.
- `hourly[].hour`
L'inizio dell'ora, RFC 3339 UTC.
- `hourly[].delivered / bounced / blocked / complaints / rate_limited`
I contatori di quell'ora (qui niente total né percentuali).

## Errori

Gli errori a livello HTTP restituiscono `type`, `code` e `message`. Gli errori marcati CMD tornano dentro il risultato del comando, con HTTP 200.

- 401`INVALID_API_KEY`
La API key non esiste, è stata revocata o disattivata nella dashboard.
- 429`RATE_LIMITED`
Più di 15 richieste/s o 15 in corso per la stessa IP + API key. Attendi i secondi indicati in Retry-After.
- CMD`MISSING_SCOPE`
La API key non ha `counters:read`.
- CMD`INVALID_ARGS`
Un argomento non è valido: un mese che non è YYYY-MM, un giorno che non è YYYY-MM-DD, un fuso orario sconosciuto, from successivo a to, un intervallo troppo lungo…
- CMD`INTERNAL`
Errore del server. Il dettaglio viene scritto solo nel log del server.
