Get current balance
curl --request GET \
--url https://app.sendmux.ai/api/v1/billing/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.sendmux.ai/api/v1/billing/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.sendmux.ai/api/v1/billing/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sendmux.ai/api/v1/billing/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": true,
"data": {
"auto_topup": {
"amount": "50.000000",
"enabled": true,
"monthly_limit": "200.000000",
"monthly_used": "50.000000",
"threshold": "10.000000"
},
"balance": "45.230000",
"balance_consumed": "54.770000",
"balance_purchased": "100.000000",
"currency": "USD"
}
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}Billing
Get current balance
Returns the current team balance and auto top-up configuration.
GET
/
billing
/
balance
Get current balance
curl --request GET \
--url https://app.sendmux.ai/api/v1/billing/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.sendmux.ai/api/v1/billing/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.sendmux.ai/api/v1/billing/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sendmux.ai/api/v1/billing/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": true,
"data": {
"auto_topup": {
"amount": "50.000000",
"enabled": true,
"monthly_limit": "200.000000",
"monthly_used": "50.000000",
"threshold": "10.000000"
},
"balance": "45.230000",
"balance_consumed": "54.770000",
"balance_purchased": "100.000000",
"currency": "USD"
}
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}Authorizations
Sendmux API key. Use a root API key for Management API routes, or a mailbox credential for Mailbox API routes. Obtain keys from the dashboard under API Keys.
Response
Current balance
Available options:
true Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Example:
"50.000000"
Example:
"200.000000"
Example:
"50.000000"
Example:
"10.000000"
Current balance (purchased - consumed)
Example:
"45.230000"
Example:
"54.770000"
Example:
"100.000000"
Available options:
USD Was this page helpful?
⌘I