Query Balance

Customers can query the organization balance programmatically with an API key (prefixed sk_live_) — no login session required. The API accepts API key authentication only, and the balance is organization-level.

Authentication

Put the API key in the request header:

Authorization: Bearer sk_live_YOUR_API_KEY

API keys are created on the console "API Keys" page, bound to an organization and a project.

API

GET/api/business/v1/customer/balance

查询余额

返回 API Key 所属组织的当前余额(points)。仅接受 API Key(sk_live_)鉴权,无需登录态。

Bearer API KeyUse the Authorization: Bearer sk_live_... header; x-api-key is also supported.

Request structure

The section below confirms the method, URL and authentication scheme. It is an HTTP structure snippet, not a standalone runnable example.

HTTP
GET https://www.silvamux.com/api/business/v1/customer/balance
Authorization: Bearer $SILVAMUX_API_KEY

Response

200组织当前余额。

application/json · CustomerBalanceResponse

FieldTypeDescription
balance_pointsstring当前余额(points)。

defaultRFC 7807 problem+json 错误(Business API 形态)。

application/problem+json · BusinessError

FieldTypeDescription
detailstring错误详情。
errorsarray<object>字段级错误明细(422 校验失败时返回)。
errors.locationstring出错位置(如 query.request_id)。
errors.messagestring错误信息。
errors.valueany出错字段的值。
instancestring本次错误出现的 URI。
statusintegerHTTP 状态码。
titlestring错误摘要。
typestring错误类型标识(含错误码)。

Examples

curl https://www.silvamux.com/api/business/v1/customer/balance \
  -H "Authorization: Bearer $SILVAMUX_API_KEY"

Response:

{
  "balance_points": "42.5"
}
FieldDescription
balance_pointsCurrent balance (points)

Error Handling

HTTPCodeDescription
401INVALID_TOKENAPI key missing or invalid