---
title: "Get Account Balance"
description: "Retrieve the current credit balance available in your Bulkit wallet."
---

# Get Account Balance

Use this endpoint to check the current wallet credit balance available on your Bulkit account before submitting SMS or WhatsApp traffic.

This is useful for:

- pre-flight credit checks before sending campaigns
- monitoring available balance in dashboards and billing systems
- alerting when your account balance is low

## Endpoint title

Get Account Balance

## What this endpoint does

Returns the real-time credit balance, last updated timestamp, and wallet currency for the authenticated Bulkit client account.

## HTTP method and path

```http
GET /api/v2/account/credits
```

## Authorization requirements

This endpoint supports:

- **Bearer token (recommended):** `Authorization: Bearer <api_key>`
- Legacy headers: `X-API-Key` and `X-API-Secret`
- URL query parameter: `?apikey=<api_key>`

Bearer token authorization is preferred.

## Endpoint code block

```http
GET https://api.bulkitsms.com/api/v2/account/credits
```

## Authorization example

```http
Authorization: Bearer bk_live_8n6JQv3K1h9Lp0Md
```

## Request examples

<CodeGroup>

```bash curl
curl -X GET "https://api.bulkitsms.com/api/v2/account/credits" \
  -H "Authorization: Bearer bk_live_8n6JQv3K1h9Lp0Md"
```

```python python.py
import requests

response = requests.get(
    "https://api.bulkitsms.com/api/v2/account/credits",
    headers={
        "Authorization": "Bearer bk_live_8n6JQv3K1h9Lp0Md",
    },
    timeout=30,
)
response.raise_for_status()

data = response.json()
print(f"Available balance: {data['data']['balance']}")
```

```go main.go
package main

import (
	"encoding/json"
	"fmt"
	"net/http"
)

type BalanceResponse struct {
	Status string `json:"status"`
	Data   struct {
		ClientID   string  `json:"client_id"`
		Balance    float64 `json:"balance"`
		Currency   string  `json:"currency"`
		LastChange string  `json:"last_change,omitempty"`
	} `json:"data"`
}

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://api.bulkitsms.com/api/v2/account/credits", nil)
	if err != nil {
		panic(err)
	}

	req.Header.Set("Authorization", "Bearer bk_live_8n6JQv3K1h9Lp0Md")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	var result BalanceResponse
	if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
		panic(err)
	}

	fmt.Printf("Balance: %.2f %s (Client: %s)\n", result.Data.Balance, result.Data.Currency, result.Data.ClientID)
}
```

```php php
<?php

$ch = curl_init("https://api.bulkitsms.com/api/v2/account/credits");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer bk_live_8n6JQv3K1h9Lp0Md",
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    throw new Exception(curl_error($ch));
}

curl_close($ch);

$data = json_decode($response, true, 512, JSON_THROW_ON_ERROR);
echo "Balance: " . $data["data"]["balance"] . " " . $data["data"]["currency"] . PHP_EOL;
```

</CodeGroup>

## Parameters

This endpoint does not require a JSON request body.

### Authentication parameters

| Parameter | Location | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `Authorization` | Header | Yes (recommended) | string | `Bearer <your_api_key>` |
| `X-API-Key` | Header | Optional (legacy) | string | Your Bulkit key |
| `X-API-Secret` | Header | Optional (legacy) | string | Your Bulkit secret |
| `apikey` | Query | Optional fallback | string | API key used in URL authorization |

## Success response example

```json
{
  "status": "success",
  "data": {
    "client_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "balance": 2.97,
    "last_change": "2026-09-19T06:30:00Z",
    "currency": "KES"
  }
}
```

## Error response examples

### Invalid credentials

```json
{
  "status": "error",
  "message": "Invalid API Key or Secret"
}
```

### Unauthorized request

```json
{
  "status": "error",
  "message": "Invalid API Key or Secret"
}
```

## Notes and best practices

- Check balance before high-volume SMS or WhatsApp broadcasts.
- Use `Authorization: Bearer <token>` in production systems.
- Balances are returned as exact floating-point values (e.g. `2.97`), enabling real-time micro-deductions per message unit.
- The `currency` field is typically `KES`.
