> ## Documentation Index
> Fetch the complete documentation index at: https://omni.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/usage

> What the account sent, received and called, its API use and what was charged.

What the account sent and received on each channel (messages, and SMS parts in `segments`), its calls and minutes, its API requests, what was charged and its balance — for this month so far, or the days you ask for. The figures are the ones the panel's billing page shows.

<Note>Needs the `usage:read` scope.</Note>

## Query parameters

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `from` | string | No | The first day, `YYYY-MM-DD`, in the account's time zone. Default: the 1st of this month. |
| `to` | string | No | The last day, included. Default: today. Up to 366 days from `from`. |
| `by` | string | No | `channel` (the default) or `day`: `day` adds `days`, a row per day and channel. |

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.fireflo.au/v1/usage?from=2026-10-01&to=2026-10-05&by=day" \
    -H "Authorization: Bearer $OMNI_API_KEY"
  ```

  ```python Python theme={null}
  import os

  import requests

  response = requests.get(
      "https://api.fireflo.au/v1/usage",
      headers={"Authorization": f"Bearer {os.environ['OMNI_API_KEY']}"},
      params={
          "from": "2026-10-01",
          "to": "2026-10-05",
          "by": "day",
      },
  )
  print(response.status_code, response.json())
  ```

  ```javascript Node theme={null}
  const response = await fetch("https://api.fireflo.au/v1/usage?from=2026-10-01&to=2026-10-05&by=day", {
    headers: {
      Authorization: `Bearer ${process.env.OMNI_API_KEY}`,
    },
  });
  console.log(response.status, await response.json());
  ```
</CodeGroup>

## Response

`200 OK` — `delivered` counts messages delivered, read or replied to. `calls` is null without Voice. `api.messages` counts messages sent through [POST /v1/messages](/api-reference/messages/send). Money is in minor units (paise, cents): `charged` is usage debits only — top-ups and refunds aren't spend — and `balance` is what the account holds now. `days` is there with `by=day` only.

```json theme={null}
{
  "from": "2026-10-01",
  "to": "2026-10-05",
  "timezone": "Asia/Kolkata",
  "channels": [
    {
      "channel": "sms",
      "sent": 1840,
      "delivered": 1792,
      "failed": 21,
      "received": 64,
      "segments": 2210
    },
    {
      "channel": "whatsapp",
      "sent": 912,
      "delivered": 897,
      "failed": 6,
      "received": 340,
      "segments": 0
    }
  ],
  "calls": {
    "placed": 120,
    "received": 38,
    "answered": 131,
    "minutes": 214.5
  },
  "api": {
    "requests": 5320,
    "errors": 41,
    "messages": 2016
  },
  "charged": {
    "amount_minor": 418250,
    "currency": "INR"
  },
  "balance": {
    "amount_minor": 1581750,
    "currency": "INR"
  },
  "days": [
    {
      "day": "2026-10-01",
      "channel": "sms",
      "sent": 402,
      "delivered": 391,
      "failed": 4,
      "received": 11,
      "segments": 480
    },
    {
      "day": "2026-10-01",
      "channel": "whatsapp",
      "sent": 188,
      "delivered": 185,
      "failed": 1,
      "received": 72,
      "segments": 0
    }
  ]
}
```

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 400 | `invalid_request` | `from` or `to` isn't a date, `to` is before `from`, the span is over 366 days, or `by` isn't channel or day (`field` names it). |
| 403 | `scope_missing` | The key doesn't have the `usage:read` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](/api-reference/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.