github.com/twilio/twilio-go@v1.20.1/rest/wireless/v1/docs/CommandsApi.md (about) 1 # CommandsApi 2 3 All URIs are relative to *https://wireless.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateCommand**](CommandsApi.md#CreateCommand) | **Post** /v1/Commands | 8 [**DeleteCommand**](CommandsApi.md#DeleteCommand) | **Delete** /v1/Commands/{Sid} | 9 [**FetchCommand**](CommandsApi.md#FetchCommand) | **Get** /v1/Commands/{Sid} | 10 [**ListCommand**](CommandsApi.md#ListCommand) | **Get** /v1/Commands | 11 12 13 14 ## CreateCommand 15 16 > WirelessV1Command CreateCommand(ctx, optional) 17 18 19 20 Send a Command to a Sim. 21 22 ### Path Parameters 23 24 This endpoint does not need any path parameter. 25 26 ### Other Parameters 27 28 Other parameters are passed through a pointer to a CreateCommandParams struct 29 30 31 Name | Type | Description 32 ------------- | ------------- | ------------- 33 **Command** | **string** | The message body of the Command. Can be plain text in text mode or a Base64 encoded byte string in binary mode. 34 **Sim** | **string** | The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to send the Command to. 35 **CallbackMethod** | **string** | The HTTP method we use to call `callback_url`. Can be: `POST` or `GET`, and the default is `POST`. 36 **CallbackUrl** | **string** | The URL we call using the `callback_url` when the Command has finished sending, whether the command was delivered or it failed. 37 **CommandMode** | **string** | 38 **IncludeSid** | **string** | Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included. 39 **DeliveryReceiptRequested** | **bool** | Whether to request delivery receipt from the recipient. For Commands that request delivery receipt, the Command state transitions to 'delivered' once the server has received a delivery receipt from the device. The default value is `true`. 40 41 ### Return type 42 43 [**WirelessV1Command**](WirelessV1Command.md) 44 45 ### Authorization 46 47 [accountSid_authToken](../README.md#accountSid_authToken) 48 49 ### HTTP request headers 50 51 - **Content-Type**: application/x-www-form-urlencoded 52 - **Accept**: application/json 53 54 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 55 [[Back to Model list]](../README.md#documentation-for-models) 56 [[Back to README]](../README.md) 57 58 59 ## DeleteCommand 60 61 > DeleteCommand(ctx, Sid) 62 63 64 65 Delete a Command instance from your account. 66 67 ### Path Parameters 68 69 70 Name | Type | Description 71 ------------- | ------------- | ------------- 72 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 73 **Sid** | **string** | The SID of the Command resource to delete. 74 75 ### Other Parameters 76 77 Other parameters are passed through a pointer to a DeleteCommandParams struct 78 79 80 Name | Type | Description 81 ------------- | ------------- | ------------- 82 83 ### Return type 84 85 (empty response body) 86 87 ### Authorization 88 89 [accountSid_authToken](../README.md#accountSid_authToken) 90 91 ### HTTP request headers 92 93 - **Content-Type**: Not defined 94 - **Accept**: Not defined 95 96 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 97 [[Back to Model list]](../README.md#documentation-for-models) 98 [[Back to README]](../README.md) 99 100 101 ## FetchCommand 102 103 > WirelessV1Command FetchCommand(ctx, Sid) 104 105 106 107 Fetch a Command instance from your account. 108 109 ### Path Parameters 110 111 112 Name | Type | Description 113 ------------- | ------------- | ------------- 114 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 115 **Sid** | **string** | The SID of the Command resource to fetch. 116 117 ### Other Parameters 118 119 Other parameters are passed through a pointer to a FetchCommandParams struct 120 121 122 Name | Type | Description 123 ------------- | ------------- | ------------- 124 125 ### Return type 126 127 [**WirelessV1Command**](WirelessV1Command.md) 128 129 ### Authorization 130 131 [accountSid_authToken](../README.md#accountSid_authToken) 132 133 ### HTTP request headers 134 135 - **Content-Type**: Not defined 136 - **Accept**: application/json 137 138 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 139 [[Back to Model list]](../README.md#documentation-for-models) 140 [[Back to README]](../README.md) 141 142 143 ## ListCommand 144 145 > []WirelessV1Command ListCommand(ctx, optional) 146 147 148 149 Retrieve a list of Commands from your account. 150 151 ### Path Parameters 152 153 This endpoint does not need any path parameter. 154 155 ### Other Parameters 156 157 Other parameters are passed through a pointer to a ListCommandParams struct 158 159 160 Name | Type | Description 161 ------------- | ------------- | ------------- 162 **Sim** | **string** | The `sid` or `unique_name` of the [Sim resources](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to read. 163 **Status** | **string** | The status of the resources to read. Can be: `queued`, `sent`, `delivered`, `received`, or `failed`. 164 **Direction** | **string** | Only return Commands with this direction value. 165 **Transport** | **string** | Only return Commands with this transport value. Can be: `sms` or `ip`. 166 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 167 **Limit** | **int** | Max number of records to return. 168 169 ### Return type 170 171 [**[]WirelessV1Command**](WirelessV1Command.md) 172 173 ### Authorization 174 175 [accountSid_authToken](../README.md#accountSid_authToken) 176 177 ### HTTP request headers 178 179 - **Content-Type**: Not defined 180 - **Accept**: application/json 181 182 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 183 [[Back to Model list]](../README.md#documentation-for-models) 184 [[Back to README]](../README.md) 185