Retrieve a list of Commands from your account
Machine-to-machine commands sent to/from devices
Retrieve a list of Commands from your account.
Query parameters
-
Sim string
The
sid
orunique_name
of the Sim resources to read. -
Status string
The status of the resources to read. Can be:
queued
,sent
,delivered
,received
, orfailed
.Values are
queued
,sent
,delivered
,received
, orfailed
. -
Direction string
Only return Commands with this direction value.
Values are
from_sim
orto_sim
. -
Transport string
Only return Commands with this transport value. Can be:
sms
orip
.Values are
sms
orip
. -
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 is1000
.
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"
}
}
Response examples (200)
{
"commands": [
{
"account_sid": "string",
"command": "string",
"command_mode": "text",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-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"
}
}