Retrieve usage
GET/api/v1/api/v1/usage
curl -X GET 'https://www.unitpost.com/api/v1/api/v1/usage' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"object": "usage",
"plan": "string",
"period_start": "string",
"period_end": "string",
"emails": {
"sent": 0,
"included": 0,
"daily_cap": 0,
"sent_today": 0
},
"wallet": {
"allowance_cents": 0,
"used_cents": 0,
"carryover_cents": 0,
"purchased_credit_cents": 0,
"overage_cents": 0,
"overage_cap_cents": 0,
"email_rate_per_1k_cents": 0
}
}Retrieve your workspace's current billing-period usage snapshot: the plan, the period window, and the email counter. On paid plans the response also carries the dollar sending wallet — the monthly allowance included with the plan, spend so far, any upgrade carryover, the non-expiring purchased-credit balance, and billable overage — all as integer USD cents. On the free plan wallet is null and the emails object carries the monthly quota and daily cap instead. Amounts are read from the same meters that gate sending, so this matches the dashboard exactly. Requires the emails:read capability.
Response · 200 fields6 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
planrequired | string | — |
period_startrequired | string | — |
period_endrequired | string | — |
emailsrequired | object | — |
walletrequired | object | — |