Billing

Get current usage

Requires scope: read. Returns metered usage for the current billing period plus the workspace's tier caps. A key tied to one agent cannot read it (403 insufficient_scope): usage and costs are counted for the whole workspace, and GET /v1/metrics counts that agent's mail.

get/v1/billing/usage

Request

  • Base URL: https://api.mails.ai
  • URL: https://api.mails.ai/v1/billing/usage
  • Auth: HTTP bearer

Response

Current-period usage and caps.

workspace_idstring required

Your workspace id (wsk_…).

tierstring required

Your plan: free, pro, scale or metered, or an older plan, outbound or outbound_pro. While a payment is past due, caps are Free's whatever this says.

tier_statusstring

active, or past_due after a failed renewal payment: the workspace then has Free plan limits until the payment goes through. canceled and paused refuse every send, with 402 subscription_canceled and payment_required.

period_startstring date-time

Start of the usage period: the first day of this month, 00:00 UTC. The counts in usage start over each month.

period_endstring date-time

End of the usage period, exclusive: the first day of next month, 00:00 UTC.

Changes

No recorded changes to this operation across all 1 revision of this API.