Read the prepaid balance.
curl --request GET \
--url https://omni-api.sendblue.com/admin/billing/balance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omni-api.sendblue.com/admin/billing/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/admin/billing/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"balance": {
"amount_micro_usd": 24500000,
"currency": "USD"
},
"held": {
"amount_micro_usd": 7900,
"currency": "USD"
},
"available": {
"amount_micro_usd": 24492100,
"currency": "USD"
}
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Read the prepaid balance.
The root balance requires billing:read, included in Standard keys
and existing Sendblue keys. Every purchase is decided against it.
Required permission: billing:read. Accepted credentials: a signed-in administrator, an API key, the account token.
GET
/
admin
/
billing
/
balance
Read the prepaid balance.
curl --request GET \
--url https://omni-api.sendblue.com/admin/billing/balance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omni-api.sendblue.com/admin/billing/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/admin/billing/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"balance": {
"amount_micro_usd": 24500000,
"currency": "USD"
},
"held": {
"amount_micro_usd": 7900,
"currency": "USD"
},
"available": {
"amount_micro_usd": 24492100,
"currency": "USD"
}
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
personbearerlegacyKeyId & legacyKeySecret
Response
The balance.