A valid request URL is required to generate request examples{
"balances": [
{
"feature_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"feature_key": "<string>",
"feature_name": "<string>",
"unit_name": "<string>",
"balance": 123
}
]
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}What my team still holds
The credit balances of the customer this contact is acting inside — X-Customer-Id, or the oldest membership when the header is absent, never a customer named in a parameter: the header identifies and the membership behind it authorizes.
The same fold POST /v1/usage spends against, read from the customer’s own browser so a billing screen needs no server key. The statement is its own route (/history): balances render on every screen, the statement is a page somebody scrolls.
It needs a verified session. An anonymous session may ask and answers 404, which is true rather than a refusal: it belongs to no customer.
A valid request URL is required to generate request examples{
"balances": [
{
"feature_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"feature_key": "<string>",
"feature_name": "<string>",
"unit_name": "<string>",
"balance": 123
}
]
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Authorizations
A contact session token, uk_ct_…. Belongs to one of the developer's own users, and reads only that user's data.
Headers
The customer this call is acting inside — the same arrangement as X-Organization-Id, one plane down. Switching customers is navigation, not a mutation: nothing is stored, you send a different header, and the membership JOIN behind it decides what you may do there. An id you are not a member of matches no row and answers 404. Absent, the contact's oldest membership answers.
Response
The balances, one per credit feature.
Show child attributes
Show child attributes