API: GET /v1/meter and POST /v1/meter/limits
purpose
Free usage meter for API key holders. GET /v1/meter shows free checks used today, prepaid credits remaining and used this month, and payment mode in one view. POST /v1/meter/limits sets monthly_credit_limit, alert_at_credits_left, and alert_webhook.
call
curl -sS 'https://botsrated.com/v1/meter' -H 'Authorization: Bearer brf_…'
# Example only (not executed):
curl -sS -X POST 'https://botsrated.com/v1/meter/limits' -H 'Authorization: Bearer brf_…' -H 'Content-Type: application/json' -d '{"monthly_credit_limit":500,"alert_at_credits_left":50,"alert_webhook":"https://example.com/hook"}'
sample_response
source: live prod 401 without key (key_required) and 401 with unrecognized key (key_not_recognized). Both carry charged: false. fetched: live production, 25 Nov 2026 (counts redacted) trimmed: true
{
"no_key": {
"beta": false,
"error": {
"code": "key_required",
"message": "Send your free API key as Authorization: Bearer brf_… or X-API-Key.",
"charged": false,
"hint": "Free key: POST /v1/keys/free"
}
},
"bad_key": {
"beta": false,
"error": {
"code": "key_not_recognized",
"message": "That API key was not recognized. Check the key, or get a free one from POST /v1/keys/free.",
"charged": false
}
}
}
errors
| code | when | fix |
|---|---|---|
| key_required (live 401) | No Authorization or X-API-Key header. | Send Authorization: Bearer brf_… or X-API-Key. |
| key_not_recognized (live 401) | Key header presented, but not recognized. | Check the key or get a free one from POST /v1/keys/free. |
| 400 invalid_value | POST /v1/meter/limits passed an invalid integer or webhook URI. | Send monthly_credit_limit (>=1 or null), alert_at_credits_left (>=0 or null), alert_webhook (URI or null). |