github.com/twilio/twilio-go@v1.20.1/rest/api/v2010/docs/AccountsSMSShortCodesApi.md (about)

     1  # AccountsSMSShortCodesApi
     2  
     3  All URIs are relative to *https://api.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**FetchShortCode**](AccountsSMSShortCodesApi.md#FetchShortCode) | **Get** /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json | 
     8  [**ListShortCode**](AccountsSMSShortCodesApi.md#ListShortCode) | **Get** /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json | 
     9  [**UpdateShortCode**](AccountsSMSShortCodesApi.md#UpdateShortCode) | **Post** /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json | 
    10  
    11  
    12  
    13  ## FetchShortCode
    14  
    15  > ApiV2010ShortCode FetchShortCode(ctx, Sidoptional)
    16  
    17  
    18  
    19  Fetch an instance of a short code
    20  
    21  ### Path Parameters
    22  
    23  
    24  Name | Type | Description
    25  ------------- | ------------- | -------------
    26  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    27  **Sid** | **string** | The Twilio-provided string that uniquely identifies the ShortCode resource to fetch
    28  
    29  ### Other Parameters
    30  
    31  Other parameters are passed through a pointer to a FetchShortCodeParams struct
    32  
    33  
    34  Name | Type | Description
    35  ------------- | ------------- | -------------
    36  **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch.
    37  
    38  ### Return type
    39  
    40  [**ApiV2010ShortCode**](ApiV2010ShortCode.md)
    41  
    42  ### Authorization
    43  
    44  [accountSid_authToken](../README.md#accountSid_authToken)
    45  
    46  ### HTTP request headers
    47  
    48  - **Content-Type**: Not defined
    49  - **Accept**: application/json
    50  
    51  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    52  [[Back to Model list]](../README.md#documentation-for-models)
    53  [[Back to README]](../README.md)
    54  
    55  
    56  ## ListShortCode
    57  
    58  > []ApiV2010ShortCode ListShortCode(ctx, optional)
    59  
    60  
    61  
    62  Retrieve a list of short-codes belonging to the account used to make the request
    63  
    64  ### Path Parameters
    65  
    66  This endpoint does not need any path parameter.
    67  
    68  ### Other Parameters
    69  
    70  Other parameters are passed through a pointer to a ListShortCodeParams struct
    71  
    72  
    73  Name | Type | Description
    74  ------------- | ------------- | -------------
    75  **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to read.
    76  **FriendlyName** | **string** | The string that identifies the ShortCode resources to read.
    77  **ShortCode** | **string** | Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.
    78  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
    79  **Limit** | **int** | Max number of records to return.
    80  
    81  ### Return type
    82  
    83  [**[]ApiV2010ShortCode**](ApiV2010ShortCode.md)
    84  
    85  ### Authorization
    86  
    87  [accountSid_authToken](../README.md#accountSid_authToken)
    88  
    89  ### HTTP request headers
    90  
    91  - **Content-Type**: Not defined
    92  - **Accept**: application/json
    93  
    94  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    95  [[Back to Model list]](../README.md#documentation-for-models)
    96  [[Back to README]](../README.md)
    97  
    98  
    99  ## UpdateShortCode
   100  
   101  > ApiV2010ShortCode UpdateShortCode(ctx, Sidoptional)
   102  
   103  
   104  
   105  Update a short code with the following parameters
   106  
   107  ### Path Parameters
   108  
   109  
   110  Name | Type | Description
   111  ------------- | ------------- | -------------
   112  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   113  **Sid** | **string** | The Twilio-provided string that uniquely identifies the ShortCode resource to update
   114  
   115  ### Other Parameters
   116  
   117  Other parameters are passed through a pointer to a UpdateShortCodeParams struct
   118  
   119  
   120  Name | Type | Description
   121  ------------- | ------------- | -------------
   122  **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to update.
   123  **FriendlyName** | **string** | A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code.
   124  **ApiVersion** | **string** | The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`.
   125  **SmsUrl** | **string** | The URL we should call when receiving an incoming SMS message to this short code.
   126  **SmsMethod** | **string** | The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`.
   127  **SmsFallbackUrl** | **string** | The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`.
   128  **SmsFallbackMethod** | **string** | The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`.
   129  
   130  ### Return type
   131  
   132  [**ApiV2010ShortCode**](ApiV2010ShortCode.md)
   133  
   134  ### Authorization
   135  
   136  [accountSid_authToken](../README.md#accountSid_authToken)
   137  
   138  ### HTTP request headers
   139  
   140  - **Content-Type**: application/x-www-form-urlencoded
   141  - **Accept**: application/json
   142  
   143  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   144  [[Back to Model list]](../README.md#documentation-for-models)
   145  [[Back to README]](../README.md)
   146