URL : https://www.smsgatewayhub.com/RestAPI/MT.svc/mt
XML API :
Single Message :
<SmsQueue><Account><User>abc</User><Password>123</Password><SenderId>TESTIN</SenderId><Channel>1</Channel><DCS>0</DCS><FlashSms>0</FlashSms><Route>1</Route></Account><Messages><Message><Number>9198981XXXXX</Number><Text>Messge from xml</Text></Message></Messages></SmsQueue>
Multiple Messages :
<SmsQueue><Account><User>abc</User><Password>123</Password><SenderId>TESTIN</SenderId><Channel>1</Channel><DCS>0</DCS><FlashSms>0</FlashSms><Route>1</Route></Account><Messages><Message><Number>9198981XXXXX</Number><Text>Messge from xml</Text></Message><Message><Number>9198981XXXXX</Number><Text>Messge from xml</Text></Message></Messages></SmsQueue>
Response :<SmsResponse><ErrorCode>000</ErrorCode><ErrorMessage>Success</ErrorMessage><JobId>2463227</JobId><MessageData><Messages><Number>919898xxxxxx</Number><MessageId>Jb7qIygj2kGp63Q0ZE0rjw</MessageId></Messages></MessageData></SmsResponse>
URL : https://www.smsgatewayhub.com/RestAPI/MT.svc/mt?data=
XML API :
Single Message :
<SmsQueue><Account><User>abc</User><Password>123</Password><SenderId>TESTIN</SenderId><Channel>1</Channel><DCS>0</DCS><FlashSms>0</FlashSms><Route>1</Route></Account><Messages><Message><Number>9198981XXXXX</Number><Text>Messge from xml</Text></Message></Messages></SmsQueue>
Multiple Messages :
<SmsQueue><Account><User>abc</User><Password>123</Password><SenderId>TESTIN</SenderId><Channel>1</Channel><DCS>0</DCS><FlashSms>0</FlashSms><Route>1</Route></Account><Messages><Message><Number>9198981XXXXX</Number><Text>Messge from xml</Text></Message><Message><Number>9198981XXXXX</Number><Text>Messge from xml</Text></Message></Messages></SmsQueue>
Response :<SmsResponse><ErrorCode>000</ErrorCode><ErrorMessage>Success</ErrorMessage><JobId>2463227</JobId><MessageData><Messages><Number>919898xxxxxx</Number><MessageId>Jb7qIygj2kGp63Q0ZE0rjw</MessageId></Messages></MessageData></SmsResponse>
Below are the error codes which you can receive after message submission :
Error Code |
Description |
000 |
Success |
001 |
login details cannot be blank |
003 |
sender cannot be blank |
004 |
message text cannot be blank |
005 |
message data cannot be blank |
006 |
error: generic error description |
007 |
username or password is invalid |
008 |
account not active |
009 |
account locked, contact your account manager |
010 |
api restriction |
011 |
ip address restriction |
012 |
invalid length of message text |
013 |
mobile numbers not valid |
014 |
account locked due to spam message contact support |
015 |
senderid not valid |
017 |
groupid not valid |
018 |
multi message to group is not supported |
019 |
schedule date is not valid |
020 |
message or mobile number cannot be blank |
021 |
insufficient credits |
022 |
invalid jobid |
023 |
parameter missing |
024 |
invalid template or template mismatch |
025 |
{Field} can not be blank or empty |
026 |
invalid date range |
027 |
invalid optin user |
XML API :
Balance Check :
URL :https://www.smsgatewayhub.com/RestAPI/MT.svc/balance?user=aa&password=aa
<BalanceResponse><ErrorCode>0</ErrorCode><ErrorMessage>Success</ErrorMessage><Balance>P:9#T:10</Balance></BalanceResponse>
Delivery Report :
URL :https://www.smsgatewayhub.com/RestAPI/MT.svc/report/2463357
<DeliveryReportResponse><ErrorCode>0</ErrorCode><ErrorMessage>Success</ErrorMessage><Messag/><DeliveryReports><DeliveryReport><MessageId>6lScvygr5Uiw32Hus7DJRg</MessageId><DeliveryStatus>Delivered</DeliveryStatus><DeliveryDate>2015-11-22T00:02:52.247</DeliveryDate></DeliveryReport><DeliveryReport><MessageId>6lScvygr5Uiw32Hus7DJRg</MessageId><DeliveryStatus>Delivered</DeliveryStatus><DeliveryDate>2015-11-22T00:02:57.483</DeliveryDate></DeliveryReport></DeliveryReports></DeliveryReportResponse>
Sender Id :
URL :https://www.smsgatewayhub.com/RestAPI/MT.svc/senderid?user=aa&password=aa&type=1
<SenderIdResponse><ErrorCode>0</ErrorCode><ErrorMessage>Success</ErrorMessage><Type>1</Type><SenderIdList><SenderIds><SenderId>WEBTXT</SenderId></SenderIds><SenderIds><SenderId>TESTIN</SenderId></SenderIds></SenderIdList></SenderIdResponse>
Templates :
URL :https://www.smsgatewayhub.com/RestAPI/MT.svc/template?user=aa&password=aa
<TemplatesResponse><ErrorCode>0</ErrorCode><ErrorMessage>Success</ErrorMessage><TemplateId>1</TemplateId><TemplateName>Temp</TemplateName><TemplateString>This is temp %Field% template.</TemplateString></TemplatesResponse>
Groups :
URL :https://www.smsgatewayhub.com/RestAPI/MT.svc/groups?user=aa&password=aa
<GroupResponse><ErrorCode>0</ErrorCode><ErrorMessage>Success</ErrorMessage><Groups><Group><GroupId>22</GroupId><GroupName>Group1</GroupName><ContactsCount>0</ContactsCount></Group><Group><GroupId>23</GroupId><GroupName>demo</GroupName><ContactsCount>0</ContactsCount></Group><Group><GroupId>25</GroupId><GroupName>mgage</GroupName><ContactsCount>6</ContactsCount></Group><Group><GroupId>26</GroupId><GroupName>DEMO</GroupName><ContactsCount>0</ContactsCount></Group></Groups></GroupResponse>