# Balance

# Get Balance

# Description

You can use this API to check your remaining balance.

# Endpoint

    POST https://019sms.co.il/api
  

# Parameters

Name Type Description Required
balance object Contains all other elements. ✔️
user object Contains the user element. ✔️
username string The username of the account by which you are recognized in the system ✔️
type string If you want to get mail balance add <type>mail</type> under the balance element. the balance element. If not sent consider as SMS balance

# Request Example

json
Copy code
    {
  "balance": {
    "user": {
      "username": "Leeroy"
    },
    "type" : "mail"
  }
}


  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<balance>
    <user>
        <username>Leeroy</username>
    </user>
    <type>mail</type>
</balance>


  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "Your balance is : 42 and international balance: 40.5 nis",
  "balance": "42",
  "international_balance": "40.5"
}
  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<balance>
    <status>0</status>
    <message>Your balance is : 42 and international balance: 40.5 nis</message>
    <balance>42</balance>
    <interantional_balance>40.5</interantional_balance>
</balance>
  

Note

Full description of the response status and message can be found in here:

Last Updated: 8/23/2023, 11:39:26 AM