API reference
Account
Read your balance, credit limit and billing mode.
Alarm on spendable, not balance
A postpaid account is expected to run a zero or negative balance — that is what a credit limit is for. What matters is spendable, which is the balance plus the remaining credit. An alert wired to balance would page every postpaid customer continuously.
Billing models and spendable limits
Prepaid accounts draw directly from positive wallet balances. When the balance reaches zero, outbound dispatches are refused until topped up.
Postpaid accounts utilize an agreed credit line (credit_limit) allowing negative wallet balances. Messages are authorized as long as spendable is positive.
Retrieve the balance
/public/v1/account/balanceReturns the account's wallet balance, credit limit, remaining spendable amount and billing mode.
Request
Responses
Possible errors
| Code | Status | Meaning |
|---|---|---|
UNAUTHORIZED | 401 | No key, a malformed key, a wrong secret, a revoked or expired key, or a suspended account. All indistinguishable by design. |
INSUFFICIENT_SCOPE | 403 | The key is valid but does not carry the scope this endpoint requires. The scope is named in the detail. |
RATE_LIMITED | 429 | The key's request limit was exceeded. Wait for the interval in Retry-After. |
INTERNAL_ERROR | 500 | An unexpected failure on SMSend's side. Quote the request id to support. |
Money
Every monetary figure the API returns is a whole number of XOF. There are no minor units and no decimals to handle: per-message prices are computed at higher precision internally and rounded exactly once, at the batch total, so the number you receive is the number that was charged.