Get current usage

GET/api/v1/billing/usage
Requires anorganization API keywith the scopeaccount:read

What your organization has sent this period, against its plan allowance and any purchased credits.

Request

GET/api/v1/billing/usage
curl -X GET 'https://app.mailyte.com/api/v1/billing/usage' \
  -H 'Authorization: Bearer mk_live_YOUR_API_KEY'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Success.

  • dataobject
    • objectstringusage
    • mailboxesobject
      • free_usedinteger

        Free-tier mailboxes in use. Counted locally with a SQL count, so a number here is always a real count and an organization with none reads `0`. **null means UNKNOWN — the count was not supplied**, never zero.

      • free_limitinteger

        How many free-tier mailboxes are allowed. **null means NO LIMIT, not unknown** — an organization holding paid seats genuinely has no ceiling on free mailboxes. This is a limit, computed from the catalogue on our side, so it is never unreadable and the two meanings of null cannot collide here.

      • seatsobject

        Paid seats, per tier.

        • standardobject

          Seats of the standard tier. Counted from the catalogue on our side, so neither figure goes null when the mail server is unreachable.

        • proobject

          Seats of the pro tier. Counted from the catalogue on our side, so neither figure goes null when the mail server is unreachable.

        • workplaceobject

          Seats of the workplace tier. Counted from the catalogue on our side, so neither figure goes null when the mail server is unreachable.

    • send_creditsobject
      • balanceinteger

        Send credits remaining — a COUNT OF EMAILS, not money. Read `source` to know which side answered. An exhausted balance reads `0`. **null means UNKNOWN — neither side produced a figure.** Note this field does NOT go null merely because the mail server is unreachable, unlike the meters around it: the ledger answers in that case and `source` says `ledger`.

      • sourcestringenforcer | ledger

        Which side produced `balance`. `enforcer` is the mail server's live counter. `ledger` is our accounting copy, returned when the mail server could not be reached — both are real numbers, which is why this one does not go null, but they are measured at different moments. SMTP-relay sends create no rows on our side, so the ledger can trail reality by up to fifteen minutes: `ledger` is a signal that the figure may be STALE, not that it is wrong.

      • used_this_monthinteger

        Credits consumed this calendar month. **null means UNKNOWN — the mail server could not be reached.** Never read it as zero; retry instead.

    • app_sendobject

      Sending through the API and webmail, as opposed to SMTP relay. EVERY METER IN THIS OBJECT GOES NULL TOGETHER when the mail server is unreachable, so a caller can never see a half-read meter. Three cases to tell apart: `used: 4, included: 400` (sent 4 of 400), `used: 0, included: 400` (sent nothing), and `used: null, included: null` (we could not read the meter — a transient on our side; retry rather than conclude anything about the customer).

      • monthlyobject
        • includedinteger

          Emails a month included. Computed from the catalogue here, so an unreachable mail server cannot make it unknown and it does NOT go null with the meter beside it. An organization with no monthly allowance reads `0`. **null means UNKNOWN — the figure was not supplied**, never zero.

        • usedinteger

          Emails sent this month. **null means UNKNOWN — the mail server could not be reached**, never zero.

      • dailyobject
        • includedinteger

          The daily allowance ACTUALLY IN FORCE at the mail server today — **not the free floor in the price list**. Those are different numbers. The floor is granted only to an organization with no credit balance and no Send-plan volume, so an account holding either reads `0` here AND THAT 0 IS CORRECT: it is not an outage and not a bug. If you are comparing this against a figure on our pricing page and they differ, this field is the one that governs what you may send. Publishing the catalogue number instead would tell a paying customer they have free sends stacked on what they bought. **null means UNKNOWN — the mail server could not be reached.**

        • usedinteger

          Emails sent today. **null means UNKNOWN — the mail server could not be reached**, never zero.

Returned inside the standard envelope.

Errors

StatusWhen
401The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist.
403The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys.
404No such resource in this organization.
422The request was understood but the values were not acceptable.
429Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait.

Every status, with what causes it and what to do, is on the error reference.