Send SMS Command to a Sim

POST /v1/SmsCommands

Machine-to-machine SMS Commands sent to/from SIMs

Send SMS Command to a Sim.

application/x-www-form-urlencoded

Body

  • CallbackMethod string(http-method)

    The HTTP method we should use to call callback_url. Can be: GET or POST and the default is POST.

    Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

  • CallbackUrl string(uri)

    The URL we should call using the callback_method after we have sent the command.

  • Payload string Required

    The message body of the SMS Command.

  • Sim string Required

    The sid or unique_name of the SIM to send the SMS Command to.

Responses

  • 201

    Created

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • date_created string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was created

    • date_updated string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was last updated

    • direction string | null

      The direction of the SMS Command

      Values are to_sim or from_sim.

    • payload string | null

      The message body of the SMS Command sent to or from the SIM

    • sid string | null

      The unique string that identifies the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HC[0-9a-fA-F]{32}$.

    • sim_sid string | null

      The SID of the SIM that this SMS Command was sent to or from

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HS[0-9a-fA-F]{32}$.

    • status string | null

      The status of the SMS Command

      Values are queued, sent, delivered, received, or failed.

    • url string(uri) | null

      The absolute URL of the SMS Command resource

POST /v1/SmsCommands
curl \
 -X POST https://supersim.twilio.com/v1/SmsCommands \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'CallbackMethod=HEAD&CallbackUrl=https%3A%2F%2Fexample.com&Payload=string&Sim=string'
Request example
{
  "CallbackMethod": "HEAD",
  "CallbackUrl": "https://example.com",
  "Payload": "string",
  "Sim": "string"
}
Response examples (201)
{
  "account_sid": "string",
  "date_created": "2023-05-04T09:42:00+00:00",
  "date_updated": "2023-05-04T09:42:00+00:00",
  "direction": "to_sim",
  "payload": "string",
  "sid": "string",
  "sim_sid": "string",
  "status": "queued",
  "url": "https://example.com"
}