Using Our APIs
SMS API
SMS Post Services
8 min
overview sms post services allow csl to proactively send sms mo messages received by the sim insight platform, and sms mt delivery receipts …to your server using an https post request requests are sent with content type text/xml (utf 8 encoded) user agent csl sim insight/1 0 0 payload xml (formats shown below) for initial testing, http post can also be enabled this function is not available for open user group sim types (e g multinet kpn o) endpoint configuration you can provide a primary resource url an optional backup resource url an optional passphrase example endpoints https //primeserver clientdomain com/smshandler aspx https //secondaryserver clientdomain uk/smshandler2 aspx delivery behaviour when the service is enabled sms mo messages and delivery receipts are queued by the platform items are delivered first in, first out (fifo) if the primary url fails, delivery is attempted to the backup url (if provided) if delivery fails to both endpoints, the system retries on the following schedule 5s, 10s, 30s, 1m, 2m, 5m, then every 15 minutes undelivered items are held in the queue indefinitely important it is possible for messages or receipts to be delivered more than once if the http response code does not reach the platform your endpoint should be idempotent and handle duplicates safely payload types two xml payload types may be sent post sms (mo message received) post delivery receipt (mt delivery status update) post sms payload (sms mo) \<post sms version="1" api did="0000061028"> \<passphrase>password\</passphrase> \<iccid>1234567890123456789\</iccid> \<msisdn>447890000000\</msisdn> \<timestamp>09/10/2014 16 28 15\</timestamp> \<message text>current status de activated\</message text> \</post sms> post delivery receipt payload (sms mt receipt) \<post delivery receipt version="1" api did="0000061029"> \<passphrase>password\</passphrase> \<iccid>1234567890123456789\</iccid> \<msisdn>447890000000\</msisdn> \<sms uid>84ry3h2160\</sms uid> \<status>delivered\</status> \<delivered timestamp>09/10/2014 20 08 14\</delivered timestamp> \<origin>api\</origin> \<sent timestamp>09/10/2014 20 08 04\</sent timestamp> \<message text>reset modem\</message text> \</post delivery receipt> elements element description api did (attribute) delivery id generated by csl unique reference for outbound api messages unsigned long integer (decimal) \<passphrase> optional shared security string (up to 16 alphanumeric characters) provided to csl before activation \<iccid> iccid of the sim \<msisdn> current msisdn (telephone number) of the sim \<sms uid> optional present only if sms uid was provided when the original sms mt was sent (see send sms) used to correlate delivery receipts \<timestamp> for mo posts utc time the sms was received by the platform format dd/mm/yyyy hh\ mm\ ss \<message text> sms content plain text with standard xml reserved character substitutions character set restricted to gsm 7 bit default alphabet (3gpp ts 23 038) \<status> for delivery receipts delivered or failed \<delivered timestamp> utc time delivered to device always present but may be empty (e g when status is failed or timestamp unavailable) format dd/mm/yyyy hh\ mm\ ss \<origin> where the mt sms was initiated portal or api \<sent timestamp> utc time the original mt message was sent from the platform format dd/mm/yyyy hh\ mm\ ss encoding note for binary sms if the original sms mt was sent using \<data coding>binary\</data coding> (multinet kpn c only), then \<message text> in the delivery receipt payload will be base64 encoded see send sms for details