In order to use SMSEagle for sending or receiving messages from any external application or system you have, we have provided the following API functionalities.

If you would like to seamlessly and quickly start using SMSEagle’s API, please look at code samples page.  For even more detailed description refer to latest User’s Manual

Notice: API can be used with HTTP or HTTPS protocol (HTTPS is supported from software version 2.7).

Send SMS: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/send_sms

Examples:
https://url-of-smseagle/index.php/http_api/send_sms?login=john&pass=doe&to=1234567&message=mymessage
or
https://url-of-smseagle/index.php/http_api/send_sms?login=john&pass=doe&to=1234567&message=mymessage&date=201401152132
or
https://url-of-smseagle/index.php/http_api/send_sms?login=john&pass=doe&to=1234567&message=mymessage&highpriority=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
to recipient telephone number (or numbers separated with comma)
message your SMS message
date (optional parameter)  date and time in format YYYYmmDDHHMM (YYYY – year, mm – month, DD – day, HH – hour, MM – minute). If this parameter is not null SMS will be scheduled for sending at the given date and time
highpriority (optional parameter)  0 = normal priority, 1 = SMS will have higher priority in Outbox queue when processed by GSM/3G-modem
unicode (optional parameter)  0 = no Unicode encoding (default), 1 = SMS will be encoded using Unicode (you can send national characters)
flash (optional parameter)  0 = normal SMS (default), 1 = SMS will be sent as flash message
oid (optional parameter)  This attribute specifies a user-defined unique ID that is assigned to a message-recipient pair. The oid is a varchar(36) that uniquely identifies a message sent to a particular recipient (particular phone number).
The value of this ID allows client applications to match incoming reply messages to outgoing messages. If no oid was assigned to the outgoing message this attribute will have a value of null for incoming message. The oid value will be automatically assigned to incoming message only if incoming phone number matches exactly the phone number (including country code) from outgoing message.
modem_no (optional parameter)  sending modem number (only for multimodem devices)
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object

Response:
Response: OK; ID=[ID of message in outbox]
Sample response: OK; ID=297
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters): Wrong parameters

Response (XML):
Response:
<xml>
<message_id>[ID of message in outbox]</message_id>
<status>ok</status>
</xml>

Sample response:
<xml>
<message_id>297</message_id>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong parameters</error_text>
<status>error</status>
</xml>

Important notice: You must encode URL before sending it to gateway if you use national characters in SMS message text.

Send SMS: JSONRPC method

HTTP POST method call: https://url-of-smseagle/index.php/jsonrpc/sms

Sample Body:
{“method”:”sms.send_sms”, “params”:{“login”:”john”,”pass”:”doe”,”to”:”481234567″,”message”:”My message”}}
or
{“method”:”sms.send_sms”, “params”:{“login”:”john”,”pass”:”doe”,”to”:”481234567″,”message”:”My message”,”date”:”201401152132″}}
or
{“method”:”sms.send_sms”, “params”:{“login”:”john”,”pass”:”doe”,”to”:”481234567″,”message”:”My message”,”highpriority”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
to recipient telephone number (or numbers separated with comma)
message your SMS message
date (optional parameter)  date and time in format YYYYmmDDHHMM (YYYY – year, mm – month, DD – day, HH – hour, MM – minute). If this parameter is not null SMS will be scheduled for sending at the given date and time
highpriority (optional parameter)  0 = normal priority, 1 = SMS will have higher priority in Outbox queue when processed by GSM/3G-modem
unicode (optional parameter)  0 = no Unicode encoding (default), 1 = SMS will be encoded using Unicode (you can send national characters)
flash (optional parameter)  0 = normal SMS (default), 1 = SMS will be sent as flash message
oid (optional parameter) This attribute specifies a user-defined unique ID that is assigned to a message-recipient pair. The oid is a varchar(36) that uniquely identifies a message sent to a particular recipient (particular phone number).
The value of this ID allows client applications to match incoming reply messages to outgoing messages. If no oid was assigned to the outgoing message this attribute will have a value of null for incoming message. The oid value will be automatically assigned to incoming message only if incoming phone number matches exactly the phone number (including country code) from outgoing message.
modem_no (optional parameter)  sending modem number (only for multimodem devices)
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “OK; ID=[ID of message in outbox]”}
Sample response: {“result”: “OK; ID=297”}
Response: {“result”: “Invalid login or password”}
Response: {“result”: “Wrong parameters”}
Response (extended):
Response:{“result”:{“message_id”:”[ID ofmessage in outbox]”,”status”:”ok”}}
Sample response:{“result”:{“message_id”:”748″,”status”:”ok”}}
Sample response when parameter “to” contains multiple phone numbers:
{“result”:[{“message_id”:”3643″,”status”:”ok”},{“message_id”:”3644″,”status”:”ok”},{“message_id”:”3645″,”status”:”ok”},{“message_id”:”3646″,”status”:”ok”},{“message_id”:”3647″,”status”:”ok”}]}
Response(when wrong logindata):{“result”:{“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters):{“result”:{“error_text”:”Wrong parameters”,”status”:”error”}}

Important Notice: You must encode URL before sending it to gateway if
you use any special characters in SMS message text.

Send SMS to a group: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/send_togroup

Examples:
https://url-of-smseagle/index.php/http_api/send_togroup?login=john&pass=doe&groupname=admins&message=mymessage
or
https://url-of-smseagle/index.php/http_api/send_togroup?login=john&pass=doe&groupname=admins&message=mymessage&date=201401152132
or
https://url-of-smseagle/index.php/http_api/send_togroup?login=john&pass=doe&groupname=admins&message=mymessage&highpriority=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
groupname group name defined in your SMSEagle Phonebook. The group must be defined as Public
message your SMS message
date (optional parameter)  date and time in format YYYYmmDDHHMM (YYYY – year, mm – month, DD – day, HH – hour, MM – minute). If this parameter is not null SMS will be scheduled for sending at the given date and time
highpriority (optional parameter)  0 = normal priority, 1 = SMS will have higher priority in Outbox queue when processed by GSM/3G-modem
unicode (optional parameter)  0 = no Unicode encoding (default), 1 = SMS will be encoded using Unicode (you can send national characters)
flash (optional parameter)  0 = normal SMS (default), 1 = SMS will be sent as flash message
modem_no (optional parameter)  sending modem number (only for multimodem devices)
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: OK; ID=[ID of message in outbox]
Sample response: OK; ID=297
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters): Wrong parameters
Response (XML):

Response:
<xml>
<message_id>[ID of message in outbox]</message_id>
<status>ok</status>
</xml>

Sample response:
<xml>
<message_id>297</message_id>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong parameters</error_text>
<status>error</status>
</xml>

Important notice: You must encode URL before sending it to gateway if you use national characters in SMS message text.

Send SMS to a group: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”sms.send_togroup”, “params”:{“login”:”john”,”pass”:”doe”,”groupname”:”admins”,”message”:”mymessage”}}
or
{“method”:”sms.send_togroup”, “params”:{“login”:”john”,”pass”:”doe”,”groupname”:”admins”,”message”:”mymessage”,”date”:”201401152132″}}
or
{“method”:”sms.send_togroup”, “params”:{“login”:”john”,”pass”:”doe”,”groupname”:”admins”,”message”:”mymessage”,”highpriority”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
groupname group name defined in your SMSEagle Phonebook. The group must be defined as Public
message your SMS message
date (optional parameter)  date and time in format YYYYmmDDHHMM (YYYY – year, mm – month, DD – day, HH – hour, MM – minute). If this parameter is not null SMS will be scheduled for sending at the given date and time
highpriority (optional parameter)  0 = normal priority, 1 = SMS will have higher priority in Outbox queue when processed by GSM/3G-modem
unicode (optional parameter)  0 = no Unicode encoding (default), 1 = SMS will be encoded using Unicode (you can send national characters)
flash (optional parameter)  0 = normal SMS (default), 1 = SMS will be sent as flash message
modem_no (optional parameter)  sending modem number (only for multimodem devices)
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “OK; ID=[ID of message in outbox]”}
Sample response: {“result”: “OK; ID=[297]”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters): {“result”: “Wrong parameters”}
Response (Extended):
Response: {“result”:{“message_id”:”[ID of message in outbox]”,”status”:”ok”}}
Sample response: {“result”:{“message_id”:”748″,”status”:”ok”}}
Response (when wrong logindata): {“result”:{“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters):{“result”:{“error_text”:”Wrong parameters”,”status”:”error”}}


Important notice:  You must encode URL before sending it to gateway if you use national characters in SMS message text.

Send binary SMS: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/send_binary_sms

Example:
https://url-of-smseagle/index.php/http_api/send_binary_sms?login=john&pass=doe&to=1234567&udh=0605040B8423F0&data=EA0601AE02056A0045C60C037777772E736D736561676C652E657500080103534D534561676C65000101

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
to recipient telephone number (or numbers separated with comma)
udh (optional parameter)  UDH header for the message (in hex format)
data binary message (in hex format)
class (optional parameter)  message class
modem_no (optional parameter)  sending modem number (only for multimodem devices)
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: OK; ID=[ID of message in outbox]
Sample response: OK; ID=297
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters): Wrong or missing >>udh<< parameter
Response (when wrong parameters): Wrong or missing >>data<< parameter

Response (XML):
Response:
<xml>
<message_id>[ID of message in outbox]</message_id>
<status>ok</status>
</xml>

Sample response:
<xml>
<message_id>297</message_id>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text> Wrong or missing >>udh<< parameter </error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text> Wrong or missing >>data<< parameter </error_text>
<status>error</status>
</xml>

Send binary SMS: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”sms.send_binary_sms”, “params”:{“login”:”john”,”pass”:”doe”,”to”:”1234567″,”udh”:”0605040B8423F0″,”data”:”EA0601AE02056A0045C60C037777772E736D736561676C652E657500080103534D534561676C65000101″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
to recipient telephone number (or numbers separated with comma)
udh (optional parameter)  UDH header for the message (in hex format)
data binary message (in hex format)
class (optional parameter)  message class
modem_no (optional parameter)  sending modem number (only for multimodem devices)
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “OK; ID=[ID of message in outbox]”}
Sample response: {“result”: “OK; ID=297”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters): {“result”: “Wrong or missing >>udh<< parameter”} Response (when wrong parameters): {“result”: “Wrong or missing >>data<< parameter”}
Response (Extended):
Response:
{“result”:{“message_id”:”[ID of message in outbox]”,”status”:”ok”}}
 Sample response: {“result”:{“message_id”:”748″,”status”:”ok”}}
 Response (when wrong logindata): {“result”:{“error_text”:”Invalid login or password”,”status”:”error”}}
 Response (when wrong parameters):{“result”:{“error_text”:”Wrong or missing>>udh<< parameter”,”status”:”error”}}
 Response (when wrong parameters):{“result”:{“error_text”:”Wrong or missing >>data<< parameter”,”status”:”error”}}

Read SMS: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/read_sms

Examples:
Show all messages from inbox:
https://url-of-smseagle/index.php/http_api/read_sms?login=john&pass=doe&folder=inbox

Show all unread messages from inbox:
https://url-of-smseagle/index.php/http_api/read_sms?login=john&pass=doe&folder=inbox&unread=1

Show messages from sentitems folder with id=1234 and higher. Limit number of messages to 5:
https://url-of-smseagle/index.php/http_api/read_sms?login=john&pass=doe&folder=sentitems&idfrom=1234&limit=5

Show messages from inbox folder with sender phone number +481234567:
https://url-of-smseagle/index.php/http_api/read_sms?login=john&pass=doe&folder=inbox&from=+481234567

Show messages from sentitems folder with receiver phone number 7654321 and datetime from 2014-12-24 08:10:00 to 2014-12-31 23:59:59:
https://url-of-smseagle/index.php/http_api/read_sms?login=john&pass=doe&folder=sentitems&to=7654321&datefrom=20141224081000&dateto=20141231235959

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
folder one of the following: inbox, outbox, sentitems
idfrom (optional parameter)  minimal message-id
from (optional parameter)  telephone number of SMS sender (for inbox)
to (optional parameter)  telephone number of SMS receiver (for sentitems)
datefrom (optional parameter)  date and time in format YYYYmmDDHHMMSS (YYYY – year, mm – month, DD – day, HH – hour, MM – minutes, SS – seconds). Show only messages sent/received on this date/time and later
dateto (optional parameter)  date and time in format YYYYmmDDHHMMSS (YYYY – year, mm – month, DD – day, HH – hour, MM – minutes, SS – seconds). Show only messages sent/received on this date/time and earlier
limit (optional parameter)  how many messages to show
unread (optional parameter)  1 = show only unread messages
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object

Response:
Sample responses: inbox folder, sentitems folder
Response (when no data): No data to display
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters): Wrong parameters

Response (XML):
Sample response: inbox folder

Response (when no data):
<xml>
<error_text>No data to display</error_text>
<status>error</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong parameters</error_text>
<status>error</status>
</xml>

Read SMS: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Samle body:
Show all messages from inbox:
{“method”:”sms.read_sms”,”params”:{“login”:”john”,”pass”:”doe”,”folder”:”inbox”}}

Show all unread messages from inbox:
{“method”:”sms.read_sms”,”params”:{“login”:”john”,”pass”:”doe”,”folder”:”inbox”,”unread”:”1″}}

Show messages from sentitems folder with id=1234 and higher. Limit number of messages to 5:
{“method”:”sms.read_sms”,”params”:{“login”:”john”,”pass”:”doe”,”folder”:”sentitems”,”idfrom”:”1234″,”limit”:”5″}}

Show messages from inbox folder with sender phone number +481234567:
{“method”:”sms.read_sms”,”params”:{“login”:”john”,”pass”:”doe”,”folder”:”inbox”,”from”:”481234567″}}

Show messages from sentitems folder with receiver phone number 7654321 and datetime from 2014-12-24 08:10:00 to 2014-12-31 23:59:59:
{“method”:”sms.read_sms”,”params”:{“login”:”john”,”pass”:”doe”,”folder”:”sentitems”,”to”:”7654321″,”datefrom”:”20141224081000″,”dateto”:”20141231235959″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
folder one of the following: inbox, outbox, sentitems
idfrom (optional parameter)  minimal message-id
from (optional parameter)   telephone number of SMS sender (for inbox)
to (optional parameter)   telephone number of SMS receiver (for sentitems)
datefrom (optional parameter)  date and time in format YYYYmmDDHHMMSS (YYYY – year, mm – month, DD – day, HH – hour, MM – minutes, SS – seconds). Show only messages sent/received on this date/time and later
dateto (optional parameter)  date and time in format YYYYmmDDHHMMSS (YYYY – year, mm – month, DD – day, HH – hour, MM – minutes, SS – seconds). Show only messages sent/received on this date/time and earlier
limit (optional parameter)  how many messages to show
unread (optional parameter)   1 = show only unread messages
custom (optional parameter)  name of My Folder (custom folder defined in Web-GUI) to read from
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Sample response: inbox folder
Response (when no data): {“result”: “No data to display”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters): {“result”: “Wrong parameters”}
Response (Extended):
Sample response: sentitems folder
Response (when no data): {“result”:{“error_text”:”No data to display”,”status”:”error”}}
Response(when wrong logindata): {“result”:{“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters): {“result”:{“error_text”:”Wrong or missing >>udh<< parameter”,”status”:”error”}}

Delete SMS: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/delete_sms

Examples:
Delete message with id=1234 from inbox:
http://url-of-smseagle/index.php/http_api/delete_sms?login=john&pass=doe&folder=inbox&idfrom=1234&idto=1234

Delete messages with id 1234 – 1250 from inbox:
http://url-of-smseagle/index.php/http_api/delete_sms?login=john&pass=doe&folder=inbox&idfrom=1234&idto=1250

Delete all messages from outbox:
http://url-of-smseagle/index.php/http_api/delete_sms?login=john&pass=doe&folder=outbox&idfrom=1&idto=999999999

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
folder one of the following: inbox, outbox, sentitems
idfrom minimal id of message
idto maximal id of message
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object

Response:
Response: OK
Response (when delete operation was not successful): Error
Response (when wrong logindata): Invalid login or password

Response (XML):
Response:
<xml>
<status>ok</status>
</xml>

Response (when delete operation was not successful):
<xml>
<status>error</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Delete SMS: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
Delete message with id=1234 from inbox:
{“method”:”sms.delete_sms”, “params”:{“login”:”john”,”pass”:”doe”,”folder”:”inbox”,”idfrom”:”1234″”idto”:”1234″}}

Delete messages with id 1234 – 1250 from inbox:
{“method”:”sms.delete_sms”, “params”:{“login”:”john”,”pass”:”doe”,”folder”:”inbox”,”idfrom”:”1234″,”idto”:”1250″}}

Delete all messages from outbox:
{“method”:”sms.delete_sms”, “params”:{“login”:”john”,”pass”:”doe”,”folder”:”outbox”,”idfrom”:”1″,”idto”:”999999999″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
folder one of the following: inbox, outbox, sentitems
idfrom minimal id of message
idto maximal id of message
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object

Response:
Response: {“result”: “OK”}
Response (when delete operation was not successful): {“result”: “Error”}
Response (when wrong logindata): {“result”: “Invalid login or password”}

Response (Extended):
Response:  {“result”:{“status”:”ok”}}
Response (when delete operation was not successful): {“result”:{“status”:”error”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}

Get outgoing queue length: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/get_queue_length

Example:
https://url-of-smseagle/index.php/http_api/get_queue_length?login=john&pass=doe

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object

Response:
Response: [number of messages in database that wait to be processed by GSM/3G-modem]
Sample response: 7
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters): Wrong parameters

Response (XML):
Response:
<xml>
<queue_length>
[number of messages in database that wait to be processed by GSM/3G-modem]
</queue_length >
<status>ok</status>
</xml>

Sample response:
<xml>
<queue_length>7</queue_length >
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong parameters</error_text>
<status>error</status>
</xml>

Get outgoing queue length: JSONRPC method

HTTP POST method call: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”sms.get_queue_length”, “params”:{“login”:”john”,”pass”:”doe”}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object

Response:
Response: {“result”: [number of messages in database that wait to be processed by GSM/3G-modem]}
Sample response: {“result”:7}
Response: {“result”: “Invalid login or password”}
Response: {“result”: “Wrong parameters”}

Response (Extended):
Response: {“result”:{“queue_length”:[number of messages in database that wait to be processed by GSM/3G-modem],”status”:”ok”}}
Sample response: {“result”: {“queue_length”:”419″,”status”:”ok”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters): {“result”: {“error_text”:”Wrong parameters”,”status”:”error”}}

Get inbox length: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/get_inbox_length

Example: 

https://url-of-smseagle/index.php/http_api/get_inbox_length?login=john&pass=doe

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: [number of messages in database Inbox folder]
Sample response: 3
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters): Wrong parameters
Response (XML):

Response:
<xml>
<queue_length>
[number of messages in database Inbox folder]
</queue_length>
<status>ok</status>
</xml>

Sample response:
<xml>
<inbox_length>3</inbox_length>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong parameters</error_text>
<status>error</status>
</xml>

Get inbox length: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”sms.get_inbox_length”, “params”:{“login”:”john”,”pass”:”doe”}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “[number of messages in database Inbox folder]”}
Sample response: 3
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters): {“result”: “Wrong parameters”}
Response (Extended):
Response: {“result”:{“inbox_length”:[number of messages in database Inbox folder],”status”:”ok”}}
Sample response: {“result”: {“inbox_length”:”3″,”status”:”ok”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters): {“result”: {“error_text”:”Wrong parameters”,”status”:”error”}}

Get sentitems length: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/get_sentitems_length

Example:
https://url-of-smseagle/index.php/http_api/get_sentitems_length?login=john&pass=doe

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: [number of messages in database Sentitems folder]
Sample response: 21
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters): Wrong parameters

Response (XML):
Response:
<xml>
<sentitems_length>
[number of messages in database Inbox folder]
</sentitems_length>
<status>ok</status>
</xml>

Sample response:
<xml>
<sentitems_length>21</sentitems_length>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong parameters</error_text>
<status>error</status>
</xml>

Get sentitems length: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”sms.get_sentitems_length”, “params”:{“login”:”john”,”pass”:”doe”}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “[number of messages in database Sentitems folder]”}
Sample response: {“result”: “21”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters): {“result”: “Wrong parameters”}
Response (Extended):
Response: {“result”:{“sentitems_length”:[number of messages in database Sentitems folder],”status”:”ok”}}
Sample response: {“result”: {“sentitems_length”:”21″,”status”:”ok”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters): {“result”: {“error_text”:”Wrong parameters”,”status”:”error”}}

Get GSM/3G signal strenght: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/get_gsmsignal

Example:
https://url-of-smseagle/index.php/http_api/get_gsmsignal?login=john&pass=doe&modem_no=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
modem_no (optional parameter)  modem number to be queried (default = 1). Used only in multimodem devices
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: GSM/3G signal strength in percent (values between 0-100). If GSM/3G modem is disconnected from GSM/3G network, method returns -1
Sample response: 74
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters): Wrong parameters
Response (XML):

Response:
<xml>
<signal_strength>
[GSM/3G signal strength in percent (values between 0-100)]
</signal_strength>
<status>ok</status>
</xml>

Sample response:
<xml>
<signal_strength>74</signal_strength>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong parameters</error_text>
<status>error</status>
</xml>

Get GSM/3G signal strength: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”signal.get_gsmsignal”, “params”:{“login”:”john”,”pass”:”doe”}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
modem_no (optional parameter)  modem number to be queried (default = 1). Used only in multimodem devices
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object

Response:
Response: {“result”: GSM/3G signal strength in percent: values between 0-100} If GSM/3G modem is disconnected from GSM/3G network, method returns -1.
Sample response: {“result”:7}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters): {“result”: “Wrong parameters”}

Response (Extended):
Response: {“result”:{“signal_strength”:[number of messages in database Sentitems folder],”status”:”ok”}}
Sample response: {“result”: {“signal_strength”:”7″,”status”:”ok”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}

Phonebook group create: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/group_create

Example:
https://url-of-smseagle/index.php/http_api/group_create?login=john&pass=doe&groupname=myusers&public=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
groupname name for the created group
public (optional parameter)  0 = private group, 1 = public group
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object

Response:
Response: OK; ID=[ID of created group]
Sample response: OK; ID=5
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters): Wrong or missing >>groupname<< parameter

Response (XML):
Response:
<xml>

    <group_id>[ID of created group]</group_id>
<status>ok</status>
</xml>

Sample response:
<xml>
<group_id>5</group_id>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>groupname<< parameter</error_text>
<status>error</status>
</xml>

Phonebook group create: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.group_create”, “params”:{“login”:”john”,”pass”:”doe”,”groupname”:”myusers”,”public”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
groupname name for the created group
public (optional parameter)  0 = private group, 1 = public group
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object

Response:
Response: {“result”: “OK; ID=[ID of created group]”}
Sample response: {“result”: “OK; ID=5”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters): {“result”: “Wrong or missing >>groupname<< parameter”}

Response (Extended):
Response: {“result”: {“group_id”:”[ID of created group]”,”status”:”ok”}}
Sample response: {“result”: {“group_id”:”748″,”status”:”ok”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters): {“result”: {“error_text”:”Wrong parameters”,”status”:”error”}}

Phonebook group read: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/group_read

Example:
https://url-of-smseagle/index.php/http_api/group_read?login=john&pass=doe&public=1&uid=12

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
public (optional parameter)  0 = private group (default value), 1 = public group
uid (optional parameter)  id of user who created the group
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Sample response: link
Response (when no data): No data to display
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>uid<< parameter
Wrong or missing >>public<< parameter
Response (XML):
Sample response:

<xml>
<groups>
<item>
<Name>private</Name>
<ID>2</ID>
<id_user>2</id_user>
<is_public>true</is_public>
</item>
<item>
<Name>Everyone</Name>
<ID>3</ID>
<id_user>1</id_user>
<is_public>true</is_public>
</item>
<item>
<Name>work</Name>
<ID>4</ID>
<id_user>1</id_user>
<is_public>true</is_public>
</item></groups>
<status>ok</status>
</xml>

Response (when no data):
<xml>
<error_text>No data to display</error_text>
<status>error</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>uid<< parameter</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>public<< parameter</error_text>
<status>error</status>
</xml>

Phonebook group read: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.group_read”, “params”:{“login”:”john”,”pass”:”doe”,”public”:”1″,”uid”:”12″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
public (optional parameter)  0 = private group (default value), 1 = public group
uid (optional parameter)  id of user who created the group
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object

Response:
Sample response: link

Response (when no data): {“result”: “No data to display”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>uid<< parameter”}
{“result”: “Wrong or missing >>public<< parameter”}

Response (Extended):
Sample response: link
Response (when wrong parameters):
{“result”: {“error_text”:”Wrong or missing >>uid<< parameter”,”status”:”error”}}
{“result”: {“error_text”:”Wrong or missing >>public<< parameter”,”status”:”error”}}

Phonebook group update: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/group_update

Example:
https://url-of-smseagle/index.php/http_api/group_update?login=john&pass=doe&group_id=2&groupname=myusers&public=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id id of existing group
groupname name for the group
public (optional parameter)  0 = private group, 1 = public group
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object

Response:
Response: OK
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>groupname<< parameter
Wrong or missing >>group_id<< parameter
Response (when group_id is wrong): Group with the given id does not exists

Response (XML):
Response:
<xml>
<status>ok</status>
</xml>
Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>
Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>groupname<< parameter</error_text>
<status>error</status>
</xml>
<xml>
<error_text>Wrong or missing >>group_id<< parameter</error_text>
<status>error</status>
</xml>
Response (when group_id is wrong):
<xml>
<error_text>Group with the given id does not exists</error_text>
<status>error</status>
</xml>

Phonebook group update: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.group_update”, “params”:{“login”:”john”,”pass”:”doe”,”group_id”:”2″,”groupname”:”myusers”,”public”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id id of existing group
groupname name for the group
public (optional parameter)  0 = private group, 1 = public group
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object

Response:
Response: OK
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>groupname<< parameter
Wrong or missing >>group_id<< parameter
Response (when group_id is wrong): Group with the given id does not exists

Response (Extended):
Response:  {“result”:{“status”:”ok”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters): {“result”: {“error_text”:”Wrong or missing >>groupname<< parameter”,”status”:”error”}}{“result”: {“error_text”:”Wrong or missing >>group_id<< parameter”,”status”:”error”}}
Response (when group_id is wrong): {“result”: {“error_text”:”Group with the given id does not exists”,”status”:”error”}}

Phonebook group delete: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/group_delete

Example:
https://url-of-smseagle/index.php/http_api/group_delete?login=john&pass=doe&group_id=2&groupname=myusers

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id id of existing group
groupname name of existing group
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: OK
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>groupname<< parameter
Wrong or missing >>group_id<< parameter
Response (when group_id is wrong): Group with the given id and name does not exist

 

Response (XML):
Response:
<xml>
<status>ok</status>
</xml>Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>groupname<< parameter</error_text>
<status>error</status>
</xml><xml>
<error_text>Wrong or missing >>group_id<< parameter</error_text>
<status>error</status>
</xml>

Response (when group_id is wrong):
<xml>
<error_text>Group with the given id does not exists</error_text>
<status>error</status>
</xml>

Phonebook group delete: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.group_delete”, “params”:{“login”:”john”,”pass”:”doe”,”group_id”:”2″,”groupname”:”myusers”}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id id of existing group
groupname name of existing group
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object

Response:
Response: {“result”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>groupname<< parameter”}
{“result”: “Wrong or missing >>group_id<< parameter”}

Response (when group_id is wrong): {“result”: “Group with the given id and name does not exist”}
Response (Extended):
Response:  {“result”:{“status”:”ok”}}Response (when wrong logindata):
{“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}Response (when wrong parameters):
{“result”: {“error_text”:”Wrong or missing >>groupname<< parameter”,”status”:”error”}}{“result”: {“error_text”:”Wrong or missing >>group_id<< parameter”,”status”:”error”}}Response (when group_id is wrong):
{“result”: {“error_text”:”Group with the given id does not exists”,”status”:”error”}}

Phonebook group add contact: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/group_addcontact

Example:
https://url-of-smseagle/index.php/http_api/group_addcontact?login=john&pass=doe&group_id=2&contact_id=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id id of existing group (or id’s separated with comma)
contact_id id of contact. The contact will be added to the group
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: OK
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>group_id<< parameter
Wrong or missing >>contact_id<< parameter
Response (when id is wrong):
Group with the given id does not exists
Contact with the given id does not exists

Response (XML):
Response:
<xml>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>group_id<< parameter</error_text>
<status>error</status>
</xml><xml>
<error_text>Wrong or missing >>contact_id<< parameter</error_text>
<status>error</status>
</xml>

Response (when id is wrong):
<xml>
<error_text>Group with the given id does not exists</error_text>
<status>error</status>
</xml><xml>
<error_text>Contact with the given id does not exists</error_text>
<status>error</status>
</xml>

Phonebook group add contact: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.group_addcontact”, “params”:{“login”:”john”,”pass”:”doe”,”group_id”:”2″,”contact_id”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id id of existing group (or id’s separated with comma)
contact_id id of contact. The contact will be added to the group
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>group_id<< parameter”}
{“result”: “Wrong or missing >>contact_id<< parameter”}
Response (when id is wrong):
{“result”: “Group with the given id does not exists”}
{“result”: “Contact with the given id does not exists”}
Response (Extended):
Response:  {“result”:{“status”:”ok”}}Response (when wrong logindata):
{“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}Response (when wrong parameters):
{“result”: {“error_text”:”Wrong or missing >>group_id<< parameter”,”status”:”error”}}{“result”: {“error_text”:”Wrong or missing >>contact_id<< parameter”,”status”:”error”}}Response (when id is wrong):
{“result”: {“error_text”:”Group with the given id does not exists”,”status”:”error”}}{“result”: {“error_text”:”Contact with the given id does not exists”,”status”:”error”}}

Phonebook group remove contact: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/group_removecontact

Example:
https://url-of-smseagle/index.php/http_api/group_removecontact?login=john&pass=doe&group_id=2&contact_id=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id id of existing group (or id’s separated with comma)
contact_id id of contact. The contact will be removed  from the group
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: OK
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>group_id<< parameter
Wrong or missing >>contact_id<< parameter
Response (when id is wrong):
Group with the given id does not exists
Contact with the given id does not exists

Response (XML):
Response:
<xml>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>group_id<< parameter</error_text>
<status>error</status>
</xml><xml>
<error_text>Wrong or missing >>contact_id<< parameter</error_text>
<status>error</status>
</xml>

Response (when id is wrong):
<xml>
<error_text>Group with the given id does not exists</error_text>
<status>error</status>
</xml><xml>
<error_text>Contact with the given id does not exists</error_text>
<status>error</status>
</xml>

Phonebook group remove contact: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.group_removecontact”, “params”:{“login”:”john”,”pass”:”doe”,”group_id”:”2″,”contact_id”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id id of existing group (or id’s separated with comma)
contact_id id of contact. The contact will be removed  from the group
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>group_id<< parameter”}
{“result”: “Wrong or missing >>contact_id<< parameter”}
Response (when id is wrong):
{“result”: “Group with the given id does not exists”}
{“result”: “Contact with the given id does not exists”}
Response (Extended):
Response:  {“result”:{“status”:”ok”}}Response (when wrong logindata):
{“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}Response (when wrong parameters):
{“result”: {“error_text”:”Wrong or missing >>group_id<< parameter”,”status”:”error”}}{“result”: {“error_text”:”Wrong or missing >>contact_id<< parameter”,”status”:”error”}}Response (when id is wrong):
{“result”: {“error_text”:”Group with the given id does not exists”,”status”:”error”}}{“result”: {“error_text”:”Contact with the given id does not exists”,”status”:”error”}}

Phonebook contact create: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/contact_create

Example:
https://url-of-smseagle/index.php/http_api/contact_create?login=john&pass=doe&contactname=johndoe&number=12345678&public=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
contactname name for the created contact
number telephone number for the created contact
public (optional parameter)  0 = private contact, 1 = public contact (default value)
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: OK; ID=[ID of created contact]
Sample response: OK; ID=2
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>contactname<< parameter
Wrong or missing >>number<< parameter

Response (XML):
Response:
<xml>
<contact_id>[ID of created contact]</contact_id>
<status>ok</status>
</xml>

Sample response:
<xml>
<contact_id>2</contact_id>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>contactname<< parameter</error_text>
<status>error</status>
</xml><xml>
<error_text>Wrong or missing >>number<< parameter</error_text>
<status>error</status>
</xml>

Phonebook contact create: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.contact_create”, “params”:{“login”:”john”,”pass”:”doe”,”contactname”:”johndoe”,”number”:”12345678″,”public”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
contactname name for the created contact
number telephone number for the created contact
public (optional parameter)  0 = private contact 1 = public contact (default value)
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “OK; ID=[ID of created contact]”}
Sample response: {“result”: “OK; ID=2”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>contactname<< parameter”}
{“result”: “Wrong or missing >>number<< parameter”}
Response (Extended):
Response:
{“result”: {“contact_id”:”[ID of created contact]”,”status”:”ok”}}Sample response: {“result”: {“contact_id”:”2″,”status”:”ok”}}Response (when wrong logindata):
{“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}Response (when wrong parameters):
{“result”: {“error_text”:”Wrong or missing >>contactname<< parameter”},”status”:”error”}}{“result”: {“error_text”:”Wrong or missing >>number<< parameter”,”status”:”error”}}

Phonebook contact read: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/contact_read

Example:
https://url-of-smseagle/index.php/http_api/contact_read?login=john&pass=doe&public=1&uid=12

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
public (optional parameter)  0 = private contacts (default value), 1 = public contacts
uid (optional parameter)  id of user who created the contact
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Sample response: link
Response (when no data): No data to display
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>uid<< parameter
Wrong or missing >>public<< parameter

Response (XML):
Sample response: link

Response (when no data):
<xml>
<error_text>No data to display</error_text>
<status>error</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>uid<< parameter</error_text>
<status>error</status>
</xml>
<xml>
<error_text>Wrong or missing >>public<< parameter</error_text>
<status>error</status>
</xml>

Phonebook contact read: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.contact_read”, “params”:{“login”:”john”,”pass”:”doe”,”public”:”1″,”uid”:”12″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
public (optional parameter)  0 = private contacts (default value), 1 = public contacts
uid (optional parameter)  id of user who created the contact
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Sample response: link
Response (when no data): {“result”: “No data to display”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>uid<< parameter”}
{“result”: “Wrong or missing >>public<< parameter”}
Response (Extended):
Sample response: link
Response (when no data):
{“result”: {“error_text”:” No data to display”,”status”:”error”}}
Response (when wrong logindata):
{“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters):
{“result”: {“error_text”:”Wrong or missing >>uid<< parameter”,”status”:”error”}}{“result”: {“error_text”:”Wrong or missing >>public<< parameter”,”status”:”error”}}

Phonebook contact update: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/contact_update

Example:
https://url-of-smseagle/index.php/http_api/contact_update?login=john&pass=doe&contact_id=4&contactname=johnlord&number=123456789&public=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
contact_id id of existing contact
contactname name for the contact
number phone number for the contact
public (optional parameter)  0 = private group, 1 = public group
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: OK
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>contactname<< parameter
Wrong or missing >>contact_id<< parameter
Wrong or missing >>number<< parameter
Response (when contact_id is wrong): Contact with the given id does not exists

Response (XML):
Response:
<xml>
<status>ok</status>
</xml>

Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>

Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>contactname<< parameter</error_text>
<status>error</status>
</xml>
<xml>
<error_text>Wrong or missing >>contact_id<< parameter</error_text>
<status>error</status>
</xml>
<xml>
<error_text>Wrong or missing >>number<< parameter</error_text>
<status>error</status>
</xml>

Response (when contact_id is wrong):
<xml>
<error_text>Contact with the given id does not exists</error_text>
<status>error</status>
</xml>

Phonebook contact update: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.contact_update”, “params”:{“login”:”john”,”pass”:”doe”,”contact_id”:”4″,”contactname”:”johnlord”,”number”:”123456789″,”public”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
contact_id id of existing contact
contactname name for the contact
number phone number for the contact
public (optional parameter)  0 = private group, 1 = public group
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>contactname<< parameter”}
{“result”: “Wrong or missing >>contact_id<< parameter”}
{“result”: “Wrong or missing >>number<< parameter”}
Response (when contact_id is wrong): {“result”: “Contact with the given id does not exists”}
Response (Extended):
Response:  {“result”:{“status”:”ok”}}
Response (when wrong logindata):
{“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters):
{“result”: {“error_text”:”Wrong or missing >>contactname<< parameter”,”status”:”error”}}
{“result”: {“error_text”:”Wrong or missing >>contact_id<< parameter”,”status”:”error”}}
{“result”: {“error_text”:”Wrong or missing >>number<< parameter”,”status”:”error”}}
Response (when contact_id is wrong):
{“result”: {“error_text”:”Contact with the given id does not exists”,”status”:”error”}}

Phonebook contact delete: HTTP GET method

HTTP GET method: https://url-of-smseagle/index.php/http_api/contact_delete

Example:
https://url-of-smseagle/index.php/http_api/contact_delete?login=john&pass=doe&contact_id=4&contactname=johnlord

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
contact_id id of existing contact
contactname name of existing contact
responsetype (optional parameter)  text = format response as text (default), xml = format response as XML object
Response:
Response: OK
Response (when wrong logindata): Invalid login or password
Response (when wrong parameters):
Wrong or missing >>contactname<< parameter
Wrong or missing >>contact_id<< parameter
Response (when group_id is wrong): Contact with the given id and name does not exists
Response (XML):
Response:
<xml>
<status>ok</status>
</xml>
Response (when wrong logindata):
<xml>
<error_text>Invalid login or password</error_text>
<status>error</status>
</xml>
Response (when wrong parameters):
<xml>
<error_text>Wrong or missing >>contactname<< parameter</error_text>
<status>error</status>
</xml>
<xml>
<error_text>Wrong or missing >>contact_id<< parameter</error_text>
<status>error</status>
</xml>
Response (when contact_id is wrong):
<xml>
<error_text>Contact with the given id and name does not exists </error_text>
<status>error</status>
</xml>

Phonebook contact delete: JSONRPC method

HTTP POST method: https://url-of-smseagle/index.php/jsonrpc/sms

Sample body:
{“method”:”phonebook.contact_delete”, “params”:{“login”:”john”,”pass”:”doe”,”contact_id”:”4″,”contactname”:”johnlord”}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
contact_id id of existing contact
contactname name of existing contact
responsetype (optional parameter)  simple = format response as simple object with one result field (default), extended = format response as extended JSON object
Response:
Response: {“result”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>contactname<< parameter”}
{“result”: “Wrong or missing >>contact_id<< parameter”}
Response (when group_id is wrong): {“result”: “Contact with the given id and name does not exists”}
Response (Extended):
Response:  {“result”:{“status”:”ok”}}
Response (when wrong logindata):
{“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong parameters):
{“result”: {“error_text”:”Wrong or missing >>contactname<< parameter”,”status”:”error”}}
{“result”: {“error_text”:”Wrong or missing >>contact_id<< parameter”,”status”:”error”}}
Response (when contact_id is wrong):
{“result”: {“error_text”:”Contact with the given id and name does not exists”,”status”:”error”}}

Have a question or an idea? We can help you!

If you have any technical questions regarding API feel free to contact our Support Team.