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.

  • 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

    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.

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • meta object
      Hide meta attributes Show meta attributes
    • sms_commands array[object]
      Hide sms_commands attributes Show sms_commands attributes
      • 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

GET /v1/SmsCommands
curl \
 -X GET https://supersim.twilio.com/v1/SmsCommands \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "first_page_url": "https://example.com",
    "key": "string",
    "next_page_url": "https://example.com",
    "page": 42,
    "page_size": 42,
    "previous_page_url": "https://example.com",
    "url": "https://example.com"
  },
  "sms_commands": [
    {
      "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"
    }
  ]
}