Machine-to-machine SMS Commands sent to/from SIMs
Send SMS Command to a Sim.
Body
-
The
sidorunique_nameof the SIM to send the SMS Command to. -
The message body of the SMS Command.
-
The HTTP method we should use to call
callback_url. Can be:GETorPOSTand the default is POST.Values are
GETorPOST. -
The URL we should call using the
callback_methodafter we have sent the command.
POST
/v1/SmsCommands
curl \
--request POST 'https://supersim.twilio.com/v1/SmsCommands' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Payload=checkin%3A+firmware+update&Sim=SimSidOrUniqueName'
Request examples
Create command minimal
{"Payload" => "checkin: firmware update", "Sim" => "SimSidOrUniqueName"}
{"Payload" => "Report location: (52.520008, 13.404954)", "Sim" => "SimSidOrUniqueName", "CallbackMethod" => "POST", "CallbackUrl" => "http://blahblah.com/go"}
Response examples (201)
Create command minimal
{
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"payload": "checkin: firmware update",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sid": "HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "queued",
"direction": "to_sim",
"url": "https://supersim.twilio.com/v1/SmsCommands/HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
{
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"payload": "Report location: (52.520008, 13.404954)",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sid": "HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "queued",
"direction": "to_sim",
"url": "https://supersim.twilio.com/v1/SmsCommands/HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}