github.com/twilio/twilio-go@v1.20.1/rest/api/v2010/docs/AccountsKeysApi.md (about) 1 # AccountsKeysApi 2 3 All URIs are relative to *https://api.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateNewKey**](AccountsKeysApi.md#CreateNewKey) | **Post** /2010-04-01/Accounts/{AccountSid}/Keys.json | 8 [**DeleteKey**](AccountsKeysApi.md#DeleteKey) | **Delete** /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json | 9 [**FetchKey**](AccountsKeysApi.md#FetchKey) | **Get** /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json | 10 [**ListKey**](AccountsKeysApi.md#ListKey) | **Get** /2010-04-01/Accounts/{AccountSid}/Keys.json | 11 [**UpdateKey**](AccountsKeysApi.md#UpdateKey) | **Post** /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json | 12 13 14 15 ## CreateNewKey 16 17 > ApiV2010NewKey CreateNewKey(ctx, optional) 18 19 20 21 22 23 ### Path Parameters 24 25 This endpoint does not need any path parameter. 26 27 ### Other Parameters 28 29 Other parameters are passed through a pointer to a CreateNewKeyParams struct 30 31 32 Name | Type | Description 33 ------------- | ------------- | ------------- 34 **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. 35 **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. 36 37 ### Return type 38 39 [**ApiV2010NewKey**](ApiV2010NewKey.md) 40 41 ### Authorization 42 43 [accountSid_authToken](../README.md#accountSid_authToken) 44 45 ### HTTP request headers 46 47 - **Content-Type**: application/x-www-form-urlencoded 48 - **Accept**: application/json 49 50 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 51 [[Back to Model list]](../README.md#documentation-for-models) 52 [[Back to README]](../README.md) 53 54 55 ## DeleteKey 56 57 > DeleteKey(ctx, Sidoptional) 58 59 60 61 62 63 ### Path Parameters 64 65 66 Name | Type | Description 67 ------------- | ------------- | ------------- 68 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 69 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Key resource to delete. 70 71 ### Other Parameters 72 73 Other parameters are passed through a pointer to a DeleteKeyParams struct 74 75 76 Name | Type | Description 77 ------------- | ------------- | ------------- 78 **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete. 79 80 ### Return type 81 82 (empty response body) 83 84 ### Authorization 85 86 [accountSid_authToken](../README.md#accountSid_authToken) 87 88 ### HTTP request headers 89 90 - **Content-Type**: Not defined 91 - **Accept**: Not defined 92 93 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 94 [[Back to Model list]](../README.md#documentation-for-models) 95 [[Back to README]](../README.md) 96 97 98 ## FetchKey 99 100 > ApiV2010Key FetchKey(ctx, Sidoptional) 101 102 103 104 105 106 ### Path Parameters 107 108 109 Name | Type | Description 110 ------------- | ------------- | ------------- 111 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 112 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Key resource to fetch. 113 114 ### Other Parameters 115 116 Other parameters are passed through a pointer to a FetchKeyParams struct 117 118 119 Name | Type | Description 120 ------------- | ------------- | ------------- 121 **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resource to fetch. 122 123 ### Return type 124 125 [**ApiV2010Key**](ApiV2010Key.md) 126 127 ### Authorization 128 129 [accountSid_authToken](../README.md#accountSid_authToken) 130 131 ### HTTP request headers 132 133 - **Content-Type**: Not defined 134 - **Accept**: application/json 135 136 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 137 [[Back to Model list]](../README.md#documentation-for-models) 138 [[Back to README]](../README.md) 139 140 141 ## ListKey 142 143 > []ApiV2010Key ListKey(ctx, optional) 144 145 146 147 148 149 ### Path Parameters 150 151 This endpoint does not need any path parameter. 152 153 ### Other Parameters 154 155 Other parameters are passed through a pointer to a ListKeyParams struct 156 157 158 Name | Type | Description 159 ------------- | ------------- | ------------- 160 **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to read. 161 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 162 **Limit** | **int** | Max number of records to return. 163 164 ### Return type 165 166 [**[]ApiV2010Key**](ApiV2010Key.md) 167 168 ### Authorization 169 170 [accountSid_authToken](../README.md#accountSid_authToken) 171 172 ### HTTP request headers 173 174 - **Content-Type**: Not defined 175 - **Accept**: application/json 176 177 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 178 [[Back to Model list]](../README.md#documentation-for-models) 179 [[Back to README]](../README.md) 180 181 182 ## UpdateKey 183 184 > ApiV2010Key UpdateKey(ctx, Sidoptional) 185 186 187 188 189 190 ### Path Parameters 191 192 193 Name | Type | Description 194 ------------- | ------------- | ------------- 195 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 196 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Key resource to update. 197 198 ### Other Parameters 199 200 Other parameters are passed through a pointer to a UpdateKeyParams struct 201 202 203 Name | Type | Description 204 ------------- | ------------- | ------------- 205 **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to update. 206 **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. 207 208 ### Return type 209 210 [**ApiV2010Key**](ApiV2010Key.md) 211 212 ### Authorization 213 214 [accountSid_authToken](../README.md#accountSid_authToken) 215 216 ### HTTP request headers 217 218 - **Content-Type**: application/x-www-form-urlencoded 219 - **Accept**: application/json 220 221 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 222 [[Back to Model list]](../README.md#documentation-for-models) 223 [[Back to README]](../README.md) 224