Account Information


Endpoint

For getting and updating account information, the base url is:

https://rebuetext.com/api/v1

Check Account Balance

Method URI
GET /account/balance

{info} Remember to always include the Request header. See how HERE

Sample Success Response

StatusCode 200

Content

{
    "status": true,
    "data": {
        "balance_kes": 1958.04,
        "balance_minor": 195804,
        "date": "2026-03-03 18:34:21"
    }
}

Top Up

Method URI
POST /account/top-up

Request Params

Param Type Description
amount float(required) Amount to top up a new account
account_id string(required) Account Id of sub account to be topped up
topup_reference string(optional) Top up Reference string generated by your system

Sample Request Body

{
    "amount": 1500.0, // in KES
    "account_id": 4, // subaccount id
    "topup_reference": null
}

Sample Success Response

StatusCode 200

Content

{
    "status": true,
    "data": {
        "account_id": 3,
        "topup_amount": 100,
        "updated_balance_kes": 241,
        "parent_balance_kes": 1856.04,
        "topup_reference": "69a7171e55006",
        "created_at": "2026-03-03 20:15:12"
    }
}

Sample Fail Response

StatusCode 403 Reason Forbidden. Access to the resource is prohibited

Content

{
    "status": false,
    "message": "The account is not a subaccount of the parent account."
}
{
    "status": false,
    "message": {
        "account_id": ["The selected account id is invalid."]
    }
}

{info} Official SDKs can be obtained HERE. Also consider having a look at our responses format HERE In order to anticipate all the formats our responses are returned in, and hence a better handling of the same.

Sample Error Response

StatusCode 401

Reason Invalid or Missing Token

Content

{
    "status": false,
    "message": "Unauthenticated."
}

{danger} The Generated Auth Token Gives a person full access to your account. Don't share it under any circumstance️