HTTP API
The RESTful API allows developers wishing to integrate SMS messaging as a function into their applications using HTTP protocol, e.g. in connection with WEB-server, unified messaging, information services etc..
If you need to use a stateful tcp protocol (SMPP v3.4), please refer to SMPP Server API.
SMS Messages can be transmitted using the RESTful api, the following requirements must be met to enable the service:
- You need gateway user account
- Onfon to provide access key for api access
- You need sufficient credit on your Jasmin user account
Services
The Services resource represents all web services currently available via Onfon’s HTTP API.
| METHOD | Service | Description/Notes |
|---|---|---|
| GET | Balance | Get user account balance |
| GET | Campaign | Get campaigns information using dates |
| GET | Campaign/Statistics | Get campaign statistics of using campaign ID |
| POST | Group | Add a new group to to the platform |
| GET | Group | List groups belonging to a client |
| PUT | Group | Update group client group details |
| DELETE | Group | Delete group |
| POST | Template | Add a new template for sending SMS |
| GET | Template | List templates belonging to a client |
| PUT | Template | Update template for sending sms |
| DELETE | Template | Delete template from the system |
| POST | SendBulkSMS | Send Bulk SMS |
| GET | sms | Fetch SMS Sent for a Particular period |
Error Codes
| Error Code | Error Message |
|---|---|
| 000 | Success ( SMS is successfully submitted and you can check message parameter response to check message id ) |
| 003 | SenderId cannot be blank |
| 004 | Message cannot be blank |
| 005 | Message properties cannot be blank |
| 006 | Something went wrong |
| 007 | Invalid api credential |
| 008 | User account inactive |
| 009 | User account locked, contact your Administrator |
| 010 | Unauthorized API access |
| 011 | Unauthorized IP address |
| 013 | Invalid mobile numbers |
| 015 | Invalid SenderId |
| 019 | Invalid schedule date |
| 020 | Message or mobile number cannot be blank |
| 021 | Insufficient wallet credits |
| 023 | Parameter missing |
| 024 | Invalid template or template mismatch |
| 028 | Group can not be found. |
| 029 | Record already exist |
| 030 | Account expired |
| 031 | No gateway is assigned |
| 033 | Queue Connection Closed |
| 034 | Unable to create campaign at this time please try again later. |
| 035 | Insufficient credits. Please contact to your Administrator |
| 039 | Spam Message Detected |
| 042 | Max Mobile Number limit exceeded. |
| 801 | Country Undefined. |
| 803 | Message failed due to undefined price for gateway/user. |
| 804 | Message failed due to loss protection. |
| 805 | Message failed due to undefined route. |
| 805 | Message failed due to undefined route. |
| 807 | Failover loss protection |
| 808 | Failover price undefined. |
| 809 | Failover-Routing message failed. |