Credit Balance
Get the remaining credit balance of the account that owns the API key. This call is free and is a good way to check that an API key works, for example as the connection test in an automation tool.
Endpoint
GET /api/v1/credits
Request
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your ClearBounce API key. Live (cb_live_) and sandbox (cb_test_) keys both work. |
There is no request body.
Response
Success Response
{
"success": true,
"credits": 1250
}
| Field | Type | Description |
|---|---|---|
success | boolean | true when the balance was read |
credits | number | Credits left on the account. Each verified address uses 1 credit. |
An account with no credits left returns 200 with "credits": 0. It does not return 402.
Error Responses
| Status | Code | When |
|---|---|---|
401 | UNAUTHORIZED | The X-API-Key header is missing, or the key is invalid or revoked |
403 | ACCOUNT_DISABLED | The account that owns the key is disabled |
See Errors for the error response format.
Example
curl https://api.clearbounce.net/api/v1/credits \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://api.clearbounce.net/api/v1/credits', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const { credits } = await response.json();
console.log(`Credits left: ${credits}`);