Skip to Content
Orbyte Labs

Get balance

GET
/v1/customers/{identity}/balance

Reads never create customer records. Unknown identities preview the sum of customer.created grant policies, or return zero if none are configured. Existing customers receive only their actual available balance; policy credits are never previewed again after creation or exhaustion.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Environment API key or OAuth access token. OAuth requests select context with X-Orbyte-Environment or X-Orbyte-Organization when required by the operation.

Path Parameters

identity*string
Length1 <= length <= 128

Header Parameters

X-Orbyte-Environment?string

Required for environment-scoped OAuth operations. API keys remain bound to their own environment.

Length1 <= length

Response Body

Available credit balance

application/json
  1. response
availableCredits*string
Match^-?(0|[1-9][0-9]*)$
Lengthlength <= 20
asOf*number

Server time in milliseconds when the balance was calculated.

nextChangeAt?number

Next expiry or rollover boundary in milliseconds. Refresh the balance then.

Example Request
curl -X GET 'https://api.orbytelabs.com/v1/customers/string/balance'
Example Response
{  "availableCredits": "string",  "asOf": 0,  "nextChangeAt": 0}