Skip to content
Home » Octopush Gateway SMS API » Check SMS balance by country

Check SMS balance by country

GET
https://api.octopush.com/v1/public/wallet/check-balance

Encoding : UTF-8

Authentication

Your “api-key” and “api-login” must be added in the headers.

Definition

Allows you to retrieve your SMS balance for each destination. As the price of each SMS can be specific, it could be interesting for you to know the maximum number of SMS you could send to each country.

Special parameters

FieldTypeDescription
with_detailsboolean(optional) Adds the details of all the packs in your wallet.
country_codestring(optional) Code of the country where you want to get your balance. You must also fill in the product_name.
product_namestring(optional) Name of the product in which you want to get your balance (sms_low_cost, sms_premium, vocal_sms, hlr). You must also fill in the country_code.

Curl Example

curl -X GET \ 
'https://api.octopush.com/v1/public/wallet/check-balance?country_code=FR&product_name=sms_premium&with_details=true' \ 
-H 'Content-Type: application/json' \ 
-H 'api-login: ******@email.org'
-H 'api-key: ************' \ 

Command to copy/paste

curl -X GET 'https://api.octopush.com/v1/public/wallet/check-balance?country_code=FR&product_name=sms_premium&with_details=true' -H 'Content-Type: application/json' -H 'api-login: ******@email.org'-H 'api-key: ************'

JSON Server Response

Success : 201 OK

{
  "amount": 204,
  "unit": "sms_premium", 
  "wallet_packs": 
  [
    {
      "wallet_pack_id": "bacf3d83-1524-13eb-a5e2-0242af120002",
      "credit": 12.54,
      "expiration_date": "2030-10-23T13:41:46+02:00" 
    }
  ]
}