Retrieve account balance
GET/v1/balance
Amounts are in micro-units — millionths of one major currency unit — so that per-message prices below one cent are exact. $0.30 per 1,000 emails is 300 micros each.
Parameters
| Name | In | Description |
|---|---|---|
| Woyra-Version | header | The dated API version to serve. Omit to pin to the oldest supported version. |
Example
curl https://api.woyra.io/v1/balance \
-H "Authorization: Bearer $WOYRA_KEY"Response
200 The account's balance.
| Field | Type | Description |
|---|---|---|
| objectrequired | "balance" | |
| currencyrequired | string | |
| available_microsrequired | integer | Spendable balance, in micro-units. |
| reserved_microsrequired | integer | Committed to messages currently in flight. |
| spent_microsrequired | integer | Cumulative settled spend. |
| allowances | array of object | The published free tier and what is left of it this month. An account inside its allowance sends without any balance, so a balance figure alone would understate what it can do. |
| allowances.channel | string | |
| allowances.limit | integer | Messages included each month. |
| allowances.used | integer | |
| allowances.remaining | integer | |
| allowances.resets_at | timestamp | The start of the next period, in UTC. |
| email_subscription | EmailSubscription | The account's monthly email plan. Absent when it has never had one. |
| email_plan | object | A plan this calendar month paid for the way plans were paid before they became monthly subscriptions. It still counts for that month. |
| email_plan.up_to | integer | Emails this month's plan covers. |
| email_plan.paid_micros | integer | |
| email_plan.currency | string | |
| email_plan.next | EmailPlan | The plan the month moves to past up_to, at its full price. Absent past the last plan. |
Errors
| Status | Codes |
|---|---|
| 401 | authentication_required, invalid_api_key |
| 403 | insufficient_scope, domain_not_verified, recipient_suppressed, sending_paused, mfa_required |
Also in Billing
- POST /v1/topups — Add funds by card
- GET /v1/topups/{id} — One top-up
- POST /v1/subscriptions — Start a product subscription
- GET /v1/subscriptions/{product} — Current product subscription
- POST /v1/payments/stripe/webhook — Stripe's webhook
- GET /v1/ledger — The account statement
- GET /v1/billing/payment_options — How this account can pay
- PUT /v1/billing/payment_currency — Choose to pay in birr or in US dollars
- GET /v1/billing/bank_deposits — Recent birr bank deposits
- POST /v1/billing/bank_deposits — Request a birr bank deposit
- POST /v1/billing/bank_deposits/{id}/receipt — Upload the bank receipt for a deposit
- POST /v1/billing/bank_deposits/{id}/cancel — Cancel a deposit that has not been submitted or was returned
- GET /v1/billing/email_tariff — The email price this account pays
- GET /v1/billing/email_subscription — This account's monthly email plan
- PUT /v1/billing/email_subscription — Take an email plan, or change it
- POST /v1/billing/email_subscription/cancel — Stop the email plan renewing
- GET /v1/pricing/email — The published email tariff