API: GET /v1/keys/balance
purpose
Free checks and prepaid credits left on your API key. Free to call, but a key is required.
call
curl -sS 'https://botsrated.com/v1/keys/balance' \
-H 'Authorization: Bearer brf_…'
sample_response
source: live code. Without a key: 401 key_required, charged: false. With a key header that is not recognized: 401 key_not_recognized, charged: false. With a key: 200 with key_ref, free_checks_per_day, credits, next_expiry, packs and charged: false. fetched: live production, 24 Nov 2026 (counts redacted) trimmed: true
{
"error": {
"code": "key_required",
"message": "Send your free API key as Authorization: Bearer brf_… or X-API-Key.",
"charged": false
}
}
errors
| code | when | fix |
|---|---|---|
| key_required (live 401) | No Authorization or X-API-Key. | Send Bearer brf_… or X-API-Key. |
| key_not_recognized (live 401) | A key header is present but not recognized. | Check the key, or get a free one from POST /v1/keys/free. |
notes
- 200 fields: key_ref (short reference, not the key), free_checks_per_day, credits (prepaid credits left), next_expiry, packs[] (pack, bought_at, expires_at, remaining, expired), charged: false.