sms.send

The sms.send command is used to send an SMS message to an existing connection or to an external mobile device. 

The Sending an SMS provides enhanced capabilities compared to the cdp.connections.sms.send.  For more information on the advantages of using the SMS, see Difference between using CDP and SMSC.

TR50 Request - SMS to an existing Connection
{
    "1": {
        "command": "sms.send",
        "params": {
            "msisdn": "808203508039380",
            "message": "54686520534d53206d65737361676520746f2073656e64",
            "coding": "EIGHT_BIT",
            "from": "8009876543",
	     "validity": 1200
        }
    }
}
TR50 Request - External SMS
{
    "1": {
        "command": "sms.send",
        "params": {
            "msisdn": "5615043452",
            "message": "The External SMS message to send",
            "coding": "SEVEN_BIT",
            "smsc": "att",
	     "validity":1200
        }
    }
}

An external SMS is an SMS send to an external number which is not a part of the IoT Portal. For more information on external SMS, see External SMS.

Request Parameters

Name Type Required Description
thingKey String Yes* Thing key of the connection.
esn String ESN of the connection.
iccid String ICCID of the connection.
imei String IMEI of the connection.
imsi String IMSI of the connection.
meid String MEID of the connection.
msisdn String MSISDN of the connection.
If the MSISDN used, is associated with a Thing which has an associated smsc, then it overrides the smsc specified in the sms.send request.
*One of the above parameters is required to identify the connection.
smsc String Yes+ The SMSC used by the SMS.
+ Only required while sending an external SMS. Refer to sms.smsc_list API to retrieve the SMSC list.
message String   The text message to send.
trim Boolean   By default, it is true and trims the white spaces in a message. If set to false, it will not trim the white spaces in a message.
coding String Yes The coding type of the message. Options include:
  • SEVEN_BIT = alphabets (GSM 7 bit default alphabet),
  • EIGHT_BIT= 8 bit data (The message must be in hexadecimal format)
  • UCS2 = 16 bit data.
from String   The source of the SMS.
validity Integer   Validity is the number of seconds from the time the SMS message is submitted, until it should expire from sending the SMS.

If the command is sent successfully a success message is returned. Success is returned even for a partial success. Otherwise, an error and error message will be returned.

TR50 Response
{
  "1": {
    "success": true,
    "params": {
      "dateSent": "2021-09-17T10:24:08.12-04:00"
      "uuid": "57d0230853266d6edb8f78e3",
      "preferredSmsc": "tele2"
      "id": "5b75e566fe2a13383127358d"
    }
  }
}

Response Parameters

Name
Type
Description
uuid String The uuid is the identifier for each SMS sent through the SMS engine. In the case of Sharing Things and Connections, there will be a duplicate SMS record for each organization the connection is shared to and each record will share the same uuid.
id String The id is the unique identifier for each and every SMS record. In the case of a Sharing Things and Connections, a duplicate SMS will be created for each organization the connection is shared to and each SMS will have a different id
preferredSmsc String The preferred SMSC used to send the message.
dateSent String The date the message was sent.

Related topics