Retrieve a list of Commands from your account

GET /v1/Commands

Machine-to-machine commands sent to/from devices

Retrieve a list of Commands from your account.

Query parameters

  • Sim string

    The sid or unique_name of the Sim resources to read.

  • Status string

    The status of the resources to read. Can be: queued, sent, delivered, received, or failed.

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

  • Only return Commands with this direction value.

    Values are from_sim or to_sim.

  • Only return Commands with this transport value. Can be: sms or ip.

    Values are sms or ip.

  • 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
    • commands array[object]
      Hide commands attributes Show 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}$.

      • command string | null

        The message being sent to or from the SIM

      • command_mode string | null

        The mode used to send the SMS message

        Values are text or binary.

      • 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 format

      • Whether to request a delivery receipt

      • direction string | null

        The direction of the Command

        Values are from_sim or to_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: ^DC[0-9a-fA-F]{32}$.

      • sim_sid string | null

        The SID of the Sim resource that the Command was sent to or from

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

      • status string | null

        The status of the Command

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

      • transport string | null

        The type of transport used

        Values are sms or ip.

      • url string(uri) | null

        The absolute URL of the resource

    • meta object
      Hide meta attributes Show meta attributes
GET /v1/Commands
curl \
 -X GET https://wireless.twilio.com/v1/Commands \
 --user "username:password"
Response examples (200)
{
  "commands": [
    {
      "account_sid": "string",
      "command": "string",
      "command_mode": "text",
      "date_created": "2023-05-04T09:42:00+00:00",
      "date_updated": "2023-05-04T09:42:00+00:00",
      "delivery_receipt_requested": true,
      "direction": "from_sim",
      "sid": "string",
      "sim_sid": "string",
      "status": "queued",
      "transport": "sms",
      "url": "https://example.com"
    }
  ],
  "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"
  }
}