Using Our APIs
SMS API
Send SMS
12 min
purpose sends an sms message to the sim specified in the \<iccid> element this command allows applications to transmit sms messages directly to mobile devices 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) \<send sms version="1" api id="123456"> \<authentication> \<username>username\</username> \<password>password\</password> \</authentication> \<iccid>1234567890123456789\</iccid> \<message text>let’s meet at the station\</message text> \<data coding>default\</data coding> \<origin>447890123456\</origin> \<sms uid>123abcde4567\</sms uid> \</send sms> response (success) \<send sms response api id="123456"> \<api outcome>success\</api outcome> \</send sms response> request elements element required description \<iccid> yes target sim iccid \<message text> yes sms message content maximum 160 characters \<data coding> no encoding type default is default \<origin> no custom origination number (manx telecom sims only) \<sms uid> no client defined unique identifier (max 12 alphanumeric characters) message length rules maximum length 160 characters messages longer than 160 characters will return invalid content characters must conform to the gsm 7 bit default alphabet (3gpp ts 23 038) characters from the gsm 7 bit extension table count as two characters other character sets may produce unpredictable results origination number (\<origin>) if \<origin> is omitted → an appropriate origination number is used and replies will route back to the sim insight platform specified (manx telecom sims only) → replies will not be directed to the sim insight platform and will not be available via the sms log or api specified for other sim types → the element will be ignored binary sms (multinet kpn c only) for sim type multinet kpn c , the \<data coding> element may be set to \<data coding>binary\</data coding> in this case message must be encoded as base64 maximum \<message text> length remains 160 characters maximum binary payload size is 120 bytes binary encoded sms mo is not supported example binary values 00 01 ff fe 80 7f base64 encoded aah//ob/ request elements \<message text>aah//ob/\</message text> \<data coding>binary\</data coding> sms user id (\<sms uid>) the optional \<sms uid> maximum 12 alphanumeric characters must be unique (client responsibility) will be included in delivery receipt information allows cross referencing of messages delivery behaviour if a device is unavailable, messages are queued and retried retry period is a minimum of 72 hours delivery status can be retrieved via sms log or api some operators impose queue limits (e g kpn 60 messages per sim) if the operator queue limit is exceeded, the api response will be rejected by operator 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