Retrieve a list of SMS Commands from your account.

GET /v1/SmsCommands

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

Retrieve a list of SMS Commands from your account.

Query parameters

  • Sim string

    The SID or unique name of the Sim resource that SMS Command was sent to or from.

  • Status string

    The status of the SMS Command. Can be: queued, sent, delivered, received or failed. See the SMS Command Status Values for a description of each.

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

  • Direction string

    The direction of the SMS Command. Can be to_sim or from_sim. The value of to_sim is synonymous with the term mobile terminated, and from_sim is synonymous with the term mobile originated.

    Values are to_sim or from_sim.

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • sms_commands array[object]
      Hide sms_commands attributes Show sms_commands attributes object
      • sid string | null

        The unique string that we created to identify the SMS Command resource.

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

      • account_sid string | null

        The SID of the Account that created the SMS Command resource.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[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}$.

      • payload string | null

        The message body of the SMS Command sent to or from the SIM. For text mode messages, this can be up to 160 characters.

      • status string

        The status of the SMS Command. Can be: queued, sent, delivered, received or failed. See the SMS Command Status Values for a description of each.

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

      • direction string

        The direction of the SMS Command. Can be to_sim or from_sim. The value of to_sim is synonymous with the term mobile terminated, and from_sim is synonymous with the term mobile originated.

        Values are to_sim or from_sim.

      • date_created string(date-time) | null

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

      • date_updated string(date-time) | null

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

      • url string(uri) | null

        The absolute URL of the SMS Command resource.

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/SmsCommands
curl \
 --request GET 'https://supersim.twilio.com/v1/SmsCommands' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "sms_commands",
    "url": "https://supersim.twilio.com/v1/SmsCommands?Status=received&Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/SmsCommands?Status=received&Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "sms_commands": []
}
{
  "meta": {
    "key": "sms_commands",
    "url": "https://supersim.twilio.com/v1/SmsCommands?Status=received&Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://supersim.twilio.com/v1/SmsCommands?Status=received&Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "sms_commands": [
    {
      "sid": "HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "url": "https://supersim.twilio.com/v1/SmsCommands/HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "status": "received",
      "payload": "content of the command",
      "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "from_sim",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T20:00:00Z"
    }
  ]
}