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

查询余额

Return the current balance for the API key's organization. API key only.

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

Request parameters

ParameterType & locationRequiredDescription
Authorizationstring · headerYesBearer API Key (sk_live_...)
X-Organization-Idstring · headerNoNot required for API key auth

Response

200OK

application/json · CustomerBalanceResponse

FieldTypeRequiredDescription
$schemastring (uri)NoA URL to the JSON Schema for this object.
balance_pointsstringYesCurrent balance in points

defaultError

application/problem+json · ErrorModel

FieldTypeRequiredDescription
$schemastring (uri)NoA URL to the JSON Schema for this object.
detailstringNoA human-readable explanation specific to this occurrence of the problem.
errorsarray<ErrorDetail>NoOptional list of individual error details
errors.locationstringNoWhere the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
errors.messagestringNoError message text
errors.valueanyNoThe value at the given location
instancestring (uri)NoA URI reference that identifies the specific occurrence of the problem.
statusinteger (int64)NoHTTP status code
titlestringNoA short, human-readable summary of the problem type. This value should not change between occurrences of the error.
typestring (uri)NoA URI reference to human-readable documentation for the error.;Default: about:blank

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