# Subscribers

# Add subscriber

# Description

You can use this API to add subscriber.

# Endpoint

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

# Parameters

Name Type Description Required
addSub 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 ✔️
userDetails object Contains the Details elements for the user that you want to add. ✔️
name string Contains the name you want to give the user ✔️
username string Contains the username you want to give the user. ✔️
password string Contains the password you want to give the user. ✔️
source string Contains the default source you want to give the user. ✔️
amount int Contains the amount of credits you want to give the user ✔️
otpPhone string Phone number for OTP authentication

# Request Example

json
Copy code
    {
  "addSub": {
    "user": {
      "username": "xxxxxx"
    },
    "userDetails": {
      "name": "israel israeli",
      "username": " israelisraeli ",
      "password": " israelisraeli ",
      "source": "055xxxxxxx",
      "amount": "70000",
      "otpPhone": "5xxxxxxxx"
    }
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<addSub>
    <user>
        <username>xxxxxx</username>
    </user>
    <userDetails>
        <name>israel israeli</name>
        <username> israelisraeli</username>
        <password> israelisraeli</password>
        <source>055xxxxxxx</source>
        <amount>70000</amount>
        <otpPhone>5xxxxxxxx</otpPhone>
    </userDetails>
</addSub>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "The user was created successfully"
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<addSub>
    <status>0</status>
    <message>The user was created successfully</message>
</addSub>

  

Note

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

# Update subscribers' wallets

# Description

You can use this API to update the wallet of subscribers.

# Endpoint

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

# Parameters

Name Type Description Required
updateAmountSub 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 ✔️
userDetails object Contains the elements of the details of the user that you want to update ✔️
username string (The internal user name) Contains the username you want to update subscriber. ✔️
amount int Contains the amount of credits you want to give the user. ✔️
amount_int int If you want to update the amount of money, You should enter amount you want to give the user without amount tag.

# Request Example

json
Copy code
    {
  "updateAmountSub": {
    "user": {
      "username": "xxxxxx"
    },
    "userDetails": {
      "username": "username1",
      "amount": "70000",
      "amount_int": "6000"
    }
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<updateAmountSub>
    <user>
        <username>xxxxxx</username>
    </user>
    <userDetails>
        <username>username1</username>
        <amount>70000</amount>
        <amount_int>6000</amount_int>
    </userDetails>
</updateAmountSub>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "Wallet successfully updated"
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<updateAmountSub>
    <status>0</status>
    <message>Wallet successfully updated</message>
</updateAmountSub>

  

Note

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

# Get the balance of all subscribers

# Description

You can use this API to get the balance of all subscribers.

# Endpoint

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

# Parameters

Name Type Description Required
getBlanceSubs 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 ✔️

# Request Example

json
Copy code
    {
  "getBlanceSubs": {
    "user": {
      "username": "xxxxxx"
    }
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<getBlanceSubs>
    <user>
        <username>xxxxxx</username>
    </user>
</getBlanceSubs>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "",
  "balances": [
    {
      "amount": "80",
      "sms_user_id": "XXXX",
      "name": "name1"
    },
    {
      "amount": "50",
      "sms_user_id": "XXXX",
      "name": "name2"
    }
  ]
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<getBlanceSubs>
<status>0</status>
<message></message>
<balances> <balance>
    <amount>80</amount>
    <sms_user_id>xxx</sms_user_id>
    <name>name1</name>
</balance> <balance>
    <amount>50</amount>
    <sms_user_id>xxx</sms_user_id>
    <name> name2</name>
</balance> </balances>
</getBlanceSubs>

  

Note

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

Last Updated: 6/2/2024, 4:58:12 PM