API Documentation


In order to use the API, create an account in our system. The required credentials for the API usage are the "user id" and "authentication token". This info is located at the users panel.

Python API client!.

PHP API client!.

.Net API client here!.

27 more API clients languages by http://swagger.io code generation:

Android Async-Scala Clojure CSharp CsharpDotNet2 Dart
dynamic-html html-client Go Java Javascript PHP
javascript-closure-angular objc jmeter Tizen Perl Python
qt5cpp Ruby Scala Swagger JSON Swagger Yaml Swift
typescript-angular typescript-node -- -- -- --


How send a SMS

Do a HTTP POST request to the API url https://api.4simple.org/sms using the following HTTP POST vars.

user_id
The user account id, located at user panel.
auth_token
The user authentication token, located at user panel.
to
The phone number where send the SMS.
body
The SMS text message to send.
HTTP FORM example
<form action="https://api.4simple.org/sms" method="post">

    <label>User ID:
    <input type="text" name="user_id">
    </label>
    
    <br></br>
    <label>Auth Token:
    <input type="text" name="auth_token">
    </label>
    
    <br></br>
    <label>Receiver phone number:
    <input type="text" name="to">
    </label>
    
    <br></br>
    <label>Message:</label>
    <input type="text" name="body">
    </label>
    
    <br></br>
    <button type="submit">Submit</button>
    
</form>
        

The server response will be a json like:

{'success': 'ok', 'pid': 123}
The success key is returned when message was delivered ok to our system. The processing id pid returned can be used for track the SMS message status.
{'error': 'error description'}
The error key is returned if something fail while the message is posted. The value for error key, will contains details with the reason for the fail. Some of the possible error details returned are:
  • Login error
  • Low balance
  • Destination number required!
  • Message required!
  • Message with more than 160 chars

How know the account credits available.

Do a HTTP POST request to the API url https://api.4simple.org/balance using the following HTTP POST vars.

user_id
Your user account id, located at user panel.
auth_token
Your user account "authentication token", located at user panel.

The server response will be a json like:

{'balance': 20.0}
The balance key is returned with the value set as the user credits/balance.
{'error': 'Login error'}
The error key is returned if authentication info (user id or token) is wrong.
HTTP FORM example
<form action="https://api.4simple.org/balance" method="post">

    <label>User ID:
    <input type="text" name="user_id">
    </label>

    <br></br>
    <label>Auth Token:
    <input type="text" name="auth_token">
    </label>

    <br></br>
    <button type="submit">Submit</button>

</form>
        

How verify sms sent status.

Do a HTTP POST request to the API url https://api.4simple.org/status using the following HTTP POST vars.

user_id
Your user account id, located at user panel.
auth_token
Your user account "authentication token", located at user panel.
pid
The processing id pid returned when you sent the sms.

The server response will be a json like:

{'status': 'queued'}
The status key is returned with the value set as the sms current status. Possible status values are:
  • queued When the sms is in the processing queue waiting to be delivered.
  • success-delivered The sms was delivered successful.
  • failed The sms delivery fails.
{'error': 'error description'}
The error key is returned if you submit incorrect credentials or use an invalid processing id pid. Some of the possible error details returned are:
  • Login error Incorrect credentials provided.
  • Pid error Incorrect processing id pid provided.
HTTP FORM example
<form action="https://api.4simple.org/status" method="post">

    <label>User ID:
    <input type="text" name="user_id">
    </label>

    <br></br>
    <label>Auth Token:
    <input type="text" name="auth_token">
    </label>

    <br></br>
    <label>Processing ID:
    <input type="text" name="pid">
    </label>

    <br></br>
    <button type="submit">Submit</button>

</form>