Using Our APIs
SMS API
Query SMS-MT Details
10 min
purpose returns details and current delivery status of mobile terminated (mt) sms messages sent to the sim specified in the \<iccid> element this includes messages sent from the sim insight portal via the sim insight api this function is not available for open user group sim types (e g multinet kpn o) endpoint post https //api m2miportal com content type application/xml accept application/xml request (xml) \<query sms mt details version="1" api id="123456"> \<authentication> \<username>username\</username> \<password>password\</password> \</authentication> \<iccid>1234567890123456789\</iccid> \<lastx>3\</lastx> \</query sms mt details> response (success) \<query sms mt details response api id="123456"> \<api outcome>success\</api outcome> \<sms> \<sent timestamp>09/10/2014 20 08 04\</sent timestamp> \<sms uid>84ry3h2160\</sms uid> \<status>delivered\</status> \<delivered timestamp>09/10/2014 20 08 14\</delivered timestamp> \<origin>api\</origin> \<message text>reset modem\</message text> \</sms> \<sms> \<sent timestamp>09/10/2014 16 28 15\</sent timestamp> \<sms uid>84ry3h2189\</sms uid> \<status>pending\</status> \<delivered timestamp>\</delivered timestamp> \<origin>portal\</origin> \<message text>update apn setting\</message text> \</sms> \</query sms mt details response> request parameters element required description \<iccid> yes target sim iccid \<lastx> no integer between 1 and 20 number of most recent mt messages to return behaviour if \<lastx> is omitted → only the most recent message is returned results are returned with the most recently sent message first if no messages are available → a single empty \<sms> element is returned response elements each message is enclosed within an \<sms> element element description \<sent timestamp> utc date/time message was sent format dd/mm/yyyy hh\ mm\ ss \<sms uid> included only if specified when the sms was sent \<status> current delivery status pending, delivered or failed \<delivered timestamp> utc delivery time empty if not delivered \<origin> indicates message source portal or api \<message text> sms content in plain text (xml substitutions applied) status values status meaning pending message queued or awaiting delivery delivered successfully delivered to device failed delivery failed encoding notes message text is returned in plain text (with standard xml reserved character substitutions) character set is restricted to gsm 7 bit default alphabet (3gpp ts 23 038) other character sets may result in unpredictable outcomes if the sms was sent using \<data coding>binary\</data coding> (multinet kpn c only), the \<message text> element will be returned encoded as base64 additional notes historical sms records sent prior to march 2016 may have an empty \<origin> element delivery status may change over time as operator delivery receipts are received this endpoint returns only mobile terminated (mt) messages operational notes sms can only be delivered to active sims sms availability depends on sim type and operator support delivery is not guaranteed and may be asynchronous operator limits may result in message rejection response (failure) if a request cannot be processed, the response will include api outcome indicating failure an error description explaining the reason failure responses may occur due to invalid authentication credentials invalid or unknown identifiers (for example iccid or msisdn) invalid or missing parameters values not permitted for the specified sim type or account configuration insufficient permissions integrating systems should validate input data before submission and implement appropriate error handling and logging