Docs

GET /usage

This period usage, per key: budget, consumed, remaining, rate window, last used. The bill, made legible.

Parameters

This operation takes no parameters.

Responses

  • 200 Success
  • 400 Validation error
  • 401 Missing API key
  • 403 Forbidden
  • 404 Not found
  • 409 Conflict
  • 429 Rate limited
  • 500 Internal server error

Response headers

  • ratelimit-limit — Messages this API key may spend in one 60-second window.
  • ratelimit-remaining — Messages left in the current window.
  • ratelimit-reset — Seconds until the current window resets and the budget refills.

200 body

FieldTypeRequiredNotes
accountobjectyes
account.bounced_30dintegeryes
account.complained_30dintegeryes
account.sent_24hintegeryes
account.sent_30dintegeryes
keysarray<object>yes
keys[].budget_per_periodinteger | nullyes
keys[].consumed_in_periodintegeryes
keys[].consumed_in_windowintegeryes
keys[].idstringyes
keys[].last_used_atstring | nullyes
keys[].namestringyes
keys[].pausedbooleanyes
keys[].period"hourly" | "daily" | "monthly"yes
keys[].period_started_atstringyes
keys[].rate_ceiling_per_minuteinteger | nullyes
keys[].remaininginteger | nullyes
keys[].resets_atstringyes
keys[].used_percentnumber | nullyes
period_started_atstringyes

Errors

Codes in the catalogue that answer with one of this operation’s error statuses. Every one of them carries a fix.