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 SMS to a contact: HTTP GET method

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

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

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
contactname contact name (or names separated by comma) defined in your SMSEagle Phonebook . Contacts 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 contact doesn’t exist): Invalid contact name – [contact_name]
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 contact doesn’t exist):
<xml>
<error_text>Invalid contact name – [contact_name]</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 contact: JSONRPC method

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

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

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
contactname contact name defined in your SMSEagle Phonebook. The contact 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 contact doesn’t exist): {“result”: “Invalid contact name –  contact_name]”}
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 contact doesn’t exist): {“result”: {“error_text”:”Invalid contact name – contact_name]”,”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”}}

Send USSD-code: HTTP GET method

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

Example:
https://url-of-smseagle/index.php/http_api/send_ussd?login=john&pass=doe&to=%2A101%23

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
to  USSD code (urlencoded)
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: Response from GSM/3G network will show up in Inbox folder.

Send USSD-code: JSONRPC method

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

Sample body:
{“method”:”sms.send_ussd”, “params”:{“login”:”john”,”pass”:”doe”,”to”:”*101#”}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
to USSD-code
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: Response from GSM/3G network will show up in Inbox folder.

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 foldersentitems 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 foldersentitems 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):
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”}}

Call with termination: HTTP GET method

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

Example:
https://url-of-smseagle/index.php/http_api/call_with_termination?login=john&pass=doe&to=12345&duration=5

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
to phone numer to call
duration connection duration (in seconds)
modem_no (optional parameter)  optional parameter) modem number (default = 1). Used only in multimodem devices
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 modem doesn’t support voice calls): This modem doesn’t support voice calls
Response (when wrong parameters):
Wrong or missing >>to<< parameter
Wrong or missing >>duration<< parameter
Response (when modem_no is wrong): Modem not recognized
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 >>duration<< parameter</error_text>
<status>error</status>
</xml>

Response (when modem doesn’t support voice calls):
<xml>
<error_text>This modem doesn’t support voice calls</error_text>
<status>error</status>
</xml>

Response (when modem_no is wrong):
<xml>
<error_text> Modem not recognized </error_text>
<status>error</status>
</xml>

Important notice: this method is available only for devices with 3G voice modem

Call with termination: JSONRPC method

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

Sample body:
{“method”:”phone.call_with_termination”, “params”:{“login”:”john”,”pass”:”doe”,”to”:”123456789″, “duration”:”5″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
to phone numer to call
duration connection duration (in seconds)
modem_no (optional parameter)  calling modem number (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”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when modem doesn’t support voice calls): {“result”: “This modem doesn’t support voice calls”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>to<< parameter”} {“result”: “Wrong or missing >>duration<< parameter”}
Response (when modem_no is wrong): {“result”: ” Modem not recognized”}

Response (Extended):
Response: {“result”:{“status”:”ok”}}

Response (when wrong logindata):
{“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}

Response (when modem doesn’t support voice calls):
{“result”: {“error_text”:”This modem doesn’t support voice calls”,”status”:”error”}}

Response (when wrong parameters):
{“result”: {“error_text”:”Wrong or missing >>to<< parameter”,”status”:”error”}}
{“result”: {“error_text”:”Wrong or missing >>duration<< parameter”,”status”:”error”}}

Response (when modem_no is wrong):
{“result”: {“error_text”:”Modem not recognized”,”status”:”error”}}

Important notice: this method is available only for devices with 3G voice modem

 

Get modem state: HTTP GET method

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

Example:
https://url-of-smseagle/index.php/http_api/get_modem_state?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: enabled / disabled
Sample response: enabled
Response (when wrong logindata): Invalid login or password
Response (when modem doesn’t exist): Wrong modem number

Response (XML):
Response:
<xml>
<modem_status>
enabled / disabled
</modem_status>
<status>ok</status>
</xml>

Sample response:
<xml>
<modem_status>enabled</modem_status>
<status>ok</status>
</xml>

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

Response (when modem doesn’t exist):
<xml>
<error_text> Wrong modem number</error_text>
<status>error</status>
</xml>

Get modem state: JSONRPC method

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

Sample body:
{“method”:”sms.get_modem_state”, “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) text = format response as text (default), xml = format response as XML object

Response:
{“result”: enabled / disabled }
Sample response: {“result”:”enabled”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when modem doesn’t exist): {“result”: “Wrong modem number”}

Response (Extended):
Response: {“result”:{“modem_status”: enabled / disabled,”status”:”ok”}}

Sample response: {“result”: {“modem_status”:”Wrong modem number”,”status”:”ok”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when modem doesn’t exist): {“result”: {“error_text”:”Wrong modem number”,”status”:”error”}}

Set modem state: HTTP GET method

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

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

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
modem_no (optional parameter) modem number for status change (default = 1). Used only in multimodem devices
status enabled / disabled
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 modem doesn’t exist): Wrong modem number
Response (when wrong modem state): Wrong modem state

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 modem doesn’t exist):
<xml>
<error_text> Wrong modem number</error_text>
<status>error</status>
</xml>

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

Set modem state: JSONRPC method

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

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

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
modem_no (optional parameter) modem number for status change (default = 1). Used only in multimodem devices
status enabled / disabled
responsetype (optional parameter) text = format response as text (default), xml = format response as XML object

Response:
{“result”: enabled / disabled }

Sample response: {“result”:”enabled”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when modem doesn’t exist): {“result”: “Wrong modem number”}
Response (when wrong modem state): {“result”: “Wrong modem state”}

Response (Extended):
Response: {“result”:{“modem_status”: enabled / disabled,”status”:”ok”}}

Sample response: {“result”: {“modem_status”:”Wrong modem number”,”status”:”ok”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when modem doesn’t exist): {“result”: {“error_text”:”Wrong modem number”,”status”:”error”}}
Response (when wrong modem state): {“result”: {“error_text”:”Wrong modem state”,”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 group members read: HTTP GET method

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

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

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id ID of group to be queried
user_id (optional parameter) show only contacts created by user with given ID
public (optional parameter) 0 = private, 1 = public
responsetype (optional parameter) text = format response as text (default), xml = format response as XML object

Response:
Sample response: link
Response (when wrong or missing group_id parameter): Wrong or missing >>group_id<< parameter
Response (when wrong user_id parameter): Wrong >>user_id<< parameter
Response (when wrong public parameter): Wrong >>public<< parameter
Response (when result set is empty): No data to display

Response (XML):

Response:
<xml>
<contacts>
<contact>
<ID>17</ID>
<Name>mycontact1</Name>
<Number>23456</Number>
<id_user>1</id_user>
<is_public>true</is_public>
</contact>
<contact>
<ID>24</ID>
<Name>mycontact3</Name>
<Number>12345</Number>
<id_user>3</id_user>
<is_public>false</is_public>
</contact>
</contacts>
</xml>

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

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

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

Phonebook group members read: JSONRPC method

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

Sample body:
{“method”:”phonebook.group_members_read”, “params”:{“login”:”john”,”pass”:”doe”,”group_id”:”11″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
group_id ID of group to be queried
user_id (optional parameter) show only contacts created by user with given ID
public (optional parameter) 0 = private, 1 = public
responsetype (optional parameter) text = format response as text (default), xml = format response as XML object

Response:
Sample response:
{
“result”: [
{“ID”:”1706″,”Name”:”mycontact1″,”Number”:”23456″,
“id_user”:”1″,”is_public”:”true”},
{“ID”:”1693″,”Name”:”mycontact3″,”Number”:”12345″,
“id_user”:”3″,”is_public”:”false”}]
}

Response (when wrong or missing group_id parameter): {“result”: “Wrong or missing >>group_id<< parameter”}
Response (when wrong user_id parameter): {“result”: “Wrong >>user_id<< parameter”}
Response (when wrong public parameter): {“result”: “Wrong >>public<< parameter”}

Response (Extended):
Sample response:
{
“result”: {
“contacts”: [
{“ID”:”1706″,”Name”:”mycontact1″,”Number”:”23456″,
“id_user”:”1″,”is_public”:”true”},
{“ID”:”1693″,”Name”: “mycontact3″,”Number”:”12345″,
“id_user”:”3″,”is_public”:”false”}],
“status”: “ok”}
}

Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when wrong or missing group_id parameter): {“result”: {“error_text”:”Wrong or missing >>group_id<< parameter”,”status”:”error”}}
Response (when wrong user_id parameter): {“result”: “Wrong >>user_id<< parameter”}
Response (when wrong public parameter): {“result”: “Wrong >>public<< parameter”}

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”}}

Phonebook shift create: HTTP GET method

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

Example:
https://url-of-smseagle/index.php/http_api/shift_create?login=john&pass=doe&name=myshift&mon_from=08:00&mon_to=16:00&wed_from=09:00&wed_to=20:00&enabled=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
name name for the created shift
enabled 0 = disabled, 1 = enabled
(mon-sun)_from shift start hour for each day of week
(mon-sun)_to shift end hour for each day of week
responsetype (optional parameter) text = format response as text (default), xml = format response as XML object

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

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

Sample response:
<xml>
<shift_id>5</shift_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 >>name<< parameter</error_text>
<status>error</status>
</xml>

Phonebook shift create: JSONRPC method

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

Sample body:
{“method”:”phonebook.shift_create”, “params”:{“login”:”john”,”pass”:”doe”,”name”:”myshift”,”mon_from”:”08:00″,”mon_to”:”16:00″,”wed_from”:”09:00″,”wed_to”:”20:00″,”enabled”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
name name for the created shift
enabled 0 = disabled, 1 = enabled
(mon-sun)_from shift start hour for each day of week
(mon-sun)_to shift end hour for each day of week
responsetype (optional parameter) text = format response as text (default), xml = format response as XML object

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

Response (Extended):
Response: {“result”: {“shift_id”:”[ID of created shift]”,”status”:”ok”}}
Sample response: {“result”: {“shift_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 >>name<< parameter “,”status”:”error”}}

Phonebook shift read: HTTP GET method

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

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

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
name (optional parameter) shift name
enabled (optional parameter) 0 = disabled, 1 = enabled
shift_id (optional parameter) shift id
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 >>shift_id<< parameter

Response (XML):
Sample response:
<xml>
<shifts>
<shift>
<id_shift>62</id_shift>
<name>myshift</name>
<mon_from>08:00</mon_from>
<mon_to>16:00</mon_to>
<tue_from/>
<tue_to/>
<wed_from>09:00</wed_from>
<wed_to>20:00</wed_to>
<thu_from/>
<thu_to/>
<fri_from/>
<fri_to/>
<sat_from/>
<sat_to/>
<sun_from/>
<sun_to/>
<enabled>true</enabled>
</shift>
</shifts>
<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 >>id<< parameter</error_text>
<status>error</status>
</xml>

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

Phonebook shift read: JSONRPC method

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

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
name (optional parameter) shift name
enabled (optional parameter) 0 = disabled, 1 = enabled
shift_id (optional parameter) shift id
responsetype (optional parameter) text = format response as text (default), xml = format response as XML object

 

Examples:
{“method”:”phonebook.shift_read”, “params”:{“login”:”john”,”pass”:”doe”,”name”:”myshift”}}

 

Response:
Sample response:

{
“result”: [
{
“id_shift”: “62”,
“name”: “myshift”,
“mon_from”: “08:00”,
“mon_to”: “16:00”,
“tue_from”: null,
“tue_to”: null,
“wed_from”: “09:00”,
“wed_to”: “20:00”,
“thu_from”: null,
“thu_to”: null,
“fri_from”: null,
“fri_to”: null,
“sat_from”: null,
“sat_to”: null,
“sun_from”: null,
“sun_to”: null,
“enabled”: “true”
}
]
}
Response (when no data): {“result”: “No data to display”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong >> enabled<< parameter”}
{“result”: “Wrong >>shift_id<< parameter”}

 

Response (EXTENDED):
Sample response:
{
“result”: {
“shifts”: [
{
“id_shift”: “62”,
“name”: “myshift”,
“mon_from”: “08:00”,
“mon_to”: “16:00”,
“tue_from”: null,
“tue_to”: null,
“wed_from”: “09:00”,
“wed_to”: “20:00”,
“thu_from”: null,
“thu_to”: null,
“fri_from”: null,
“fri_to”: null,
“sat_from”: null,
“sat_to”: null,
“sun_from”: null,
“sun_to”: null,
“enabled”: “false”
}
],
“status”: “ok”
}
}

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 >> enabled<< parameter “,”status”:”error”}}

 

{“result”: {“error_text”:” Wrong >> shift_id<< parameter “,”status”:”error”}}

Phonebook shift update: HTTP GET method

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

Example:
https://url-of-smseagle/index.php/http_api/shift_update?login=john&pass=doe&shift_id=24&name=updatedshift&enabled=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
shift_id id of existing shift
name name for the shift
enabled 0 = disabled, 1 = enabled
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 >>name<< parameter
Wrong or missing >>shift_id<< parameter
Response (when shift_id is wrong): Shift 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 >>name<< parameter</error_text>
<status>error</status>
</xml>

<xml>
<error_text>Wrong or missing >>shift_id<< parameter</error_text>
<status>error</status>
</xml>

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

Phonebook shift update: JSONRPC method

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

Sample body:
{“method”:”phonebook.shift_update”, “params”:{“login”:”john”,”pass”:”doe”,”shift_id”:”24″,”name”:”updatedshift”,”enabled”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
shift_id id of existing shift
name name for the shift
enabled 0 = disabled, 1 = enabled
responsetype (optional parameter) text = format response as text (default), xml = format response as XML object

Response:
Response: {“result”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>name<< parameter”}
{“result”: “Wrong or missing >>shift_id<< parameter”}
Response (when shift_id is wrong): {“result”: “Shift 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 >>name<< parameter”,”status”:”error”}}
{“result”: {“error_text”:”Wrong or missing >>shift_id<< parameter”,”status”:”error”}}

Response (when shift_id is wrong): {“result”: {“error_text”:”Shift with the given id does not exists”,”status”:”error”}}

Phonebook shift delete: HTTP GET method

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

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

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
shift_id id of existing shift
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 >>shift_id<< parameter
Response (when shift_id is wrong): Shift with the given id 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>

<xml>
<error_text>Wrong or missing >>shift_id<< parameter</error_text>
<status>error</status>
</xml>

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

Phonebook shift delete: JSONRPC method

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

Sample body:
{“method”:”phonebook.shift_delete”, “params”:{“login”:”john”,”pass”:”doe”,”shift_id”:”24″}}

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

Response:
Response: {“result”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>shift_id<< parameter”}
Response (when shift_id is wrong): {“result”: “Shift with the given id 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 >>shift_id<< parameter”,”status”:”error”}}
Response (when shift_id is wrong): {“result”: {“error_text”:”Shift with the given id does not exists”,”status”:”error”}}

Phonebook shift add contact: HTTP GET method

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

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

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
shift_id id of existing shift (or id’s separated with comma)
contact_id id of contact. The contact will be added to the shift
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 >>shift_id<< parameter
Wrong or missing >>contact_id<< parameter
Response (when id is wrong):
Shift 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 >>shift_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>Shift 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 shift add contact: JSONRPC method

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

Sample body:
{“method”:”phonebook.shift_addcontact”, “params”:{“login”:”john”,”pass”:”doe”,”shift_id”:”24″,”contact_id”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
shift_id id of existing shift (or id’s separated with comma)
contact_id id of contact. The contact will be added to the shift
responsetype (optional parameter) text = format response as text (default), xml = format response as XML object

Response:
Response: {“result”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>shift_id<< parameter”}
{“result”: “Wrong or missing >>contact_id<< parameter”}
Response (when id is wrong):
{“result”: “Shift 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 >>shift_id<< parameter”,”status”:”error”}}
{“result”: {“error_text”:”Wrong or missing >>contact_id<< parameter”,”status”:”error”}}

Response (when id is wrong):
{“result”: {“error_text”:”Shift with the given id does not exists”,”status”:”error”}}
{“result”: {“error_text”:”Contact with the given id does not exists”,”status”:”error”}}

Phonebook shift remove contact: HTTP GET method

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

Example:
https://url-of-smseagle/index.php/http_api/shift_removecontact?login=john&pass=doe&shift_id=24&contact_id=1

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
shift_id id of existing shift (or id’s separated with comma)
contact_id id of contact. The contact will be added to the shift
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 >>shift_id<< parameter
Wrong or missing >>contact_id<< parameter
Response (when id is wrong):
Shift 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 >>shift_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>Shift 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 shift remove contact: JSONRPC method

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

Sample body:
{“method”:”phonebook.shift_removecontact”, “params”:{“login”:”john”,”pass”:”doe”,”shift_id”:”24″,”contact_id”:”1″}}

Parameter Description
login your user to login to SMSEagle
pass your password to login to SMSEagle
shift_id id of existing shift (or id’s separated with comma)
contact_id id of contact. The contact will be added to the shift
responsetype (optional parameter) text = format response as text (default), xml = format response as XML object

Response:
Response: {“result”: “OK”}
Response (when wrong logindata): {“result”: “Invalid login or password”}
Response (when wrong parameters):
{“result”: “Wrong or missing >>shift_id<< parameter”}
{“result”: “Wrong or missing >>contact_id<< parameter”}
Response (when id is wrong):
{“result”: “Shift 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 >>shift_id<< parameter”,”status”:”error”}}
{“result”: {“error_text”:”Wrong or missing >>contact_id<< parameter”,”status”:”error”}}

Response (when id is wrong):
{“result”: {“error_text”:”Shift with the given id does not exists”,”status”:”error”}}
{“result”: {“error_text”:”Contact with the given id does not exists”,”status”:”error”}}

User ID read: HTTP GET method

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

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

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

Response:
Response: User ID
Sample response: 24
Response (when username parameter is missing): Missing >>username<< parameter
Response (when user doesn’t exist): Wrong >>username<< parameter

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

Response (when username parameter is missing):
<xml>
<error_text>Missing >>username<< parameter</error_text>
<status>error</status>
</xml>

Response (when user doesn’t exist):
<xml>
<error_text>Wrong >>username<< parameter</error_text>
<status>error</status>
</xml>

User ID read: JSONRPC method

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

Sample body:
{“method”:”phonebook.userid_read”, “params”:{“login”:”john”,”pass”:”doe”,”username”:”myuser”}}

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

Response:
{“result”: [user ID] }
Sample response: {“result”:”24″}
Response (when username parameter is missing): {“result”: “Missing >>username<< parameter”}
Response (when user doesn’t exist): {“result”: “Wrong >>username<< parameter”}

Response (Extended):
Response:
{“result”:{“uid”: [user ID],”status”:”ok”}}

Sample response: {“result”: {“uid”:”24″,”status”:”ok”}}
Response (when wrong logindata): {“result”: {“error_text”:”Invalid login or password”,”status”:”error”}}
Response (when username parameter is missing): {“result”: {“error_text”:”Missing >>username<< parameter”,”status”:”error”}}
Response (when user doesn’t exist): {“result”: {“error_text”:”Wrong >>username<< parameter”,”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.