github.com/twilio/twilio-go@v1.20.1/rest/proxy/v1/docs/ServicesShortCodesApi.md (about)

     1  # ServicesShortCodesApi
     2  
     3  All URIs are relative to *https://proxy.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateShortCode**](ServicesShortCodesApi.md#CreateShortCode) | **Post** /v1/Services/{ServiceSid}/ShortCodes | 
     8  [**DeleteShortCode**](ServicesShortCodesApi.md#DeleteShortCode) | **Delete** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | 
     9  [**FetchShortCode**](ServicesShortCodesApi.md#FetchShortCode) | **Get** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | 
    10  [**ListShortCode**](ServicesShortCodesApi.md#ListShortCode) | **Get** /v1/Services/{ServiceSid}/ShortCodes | 
    11  [**UpdateShortCode**](ServicesShortCodesApi.md#UpdateShortCode) | **Post** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | 
    12  
    13  
    14  
    15  ## CreateShortCode
    16  
    17  > ProxyV1ShortCode CreateShortCode(ctx, ServiceSidoptional)
    18  
    19  
    20  
    21  Add a Short Code to the Proxy Number Pool for the Service.
    22  
    23  ### Path Parameters
    24  
    25  
    26  Name | Type | Description
    27  ------------- | ------------- | -------------
    28  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    29  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
    30  
    31  ### Other Parameters
    32  
    33  Other parameters are passed through a pointer to a CreateShortCodeParams struct
    34  
    35  
    36  Name | Type | Description
    37  ------------- | ------------- | -------------
    38  **Sid** | **string** | The SID of a Twilio [ShortCode](https://www.twilio.com/en-us/messaging/channels/sms/short-codes) resource that represents the short code you would like to assign to your Proxy Service.
    39  
    40  ### Return type
    41  
    42  [**ProxyV1ShortCode**](ProxyV1ShortCode.md)
    43  
    44  ### Authorization
    45  
    46  [accountSid_authToken](../README.md#accountSid_authToken)
    47  
    48  ### HTTP request headers
    49  
    50  - **Content-Type**: application/x-www-form-urlencoded
    51  - **Accept**: application/json
    52  
    53  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    54  [[Back to Model list]](../README.md#documentation-for-models)
    55  [[Back to README]](../README.md)
    56  
    57  
    58  ## DeleteShortCode
    59  
    60  > DeleteShortCode(ctx, ServiceSidSid)
    61  
    62  
    63  
    64  Delete a specific Short Code from a Service.
    65  
    66  ### Path Parameters
    67  
    68  
    69  Name | Type | Description
    70  ------------- | ------------- | -------------
    71  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    72  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource to delete the ShortCode resource from.
    73  **Sid** | **string** | The Twilio-provided string that uniquely identifies the ShortCode resource to delete.
    74  
    75  ### Other Parameters
    76  
    77  Other parameters are passed through a pointer to a DeleteShortCodeParams 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  ## FetchShortCode
   102  
   103  > ProxyV1ShortCode FetchShortCode(ctx, ServiceSidSid)
   104  
   105  
   106  
   107  Fetch a specific Short Code.
   108  
   109  ### Path Parameters
   110  
   111  
   112  Name | Type | Description
   113  ------------- | ------------- | -------------
   114  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   115  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to fetch the resource from.
   116  **Sid** | **string** | The Twilio-provided string that uniquely identifies the ShortCode resource to fetch.
   117  
   118  ### Other Parameters
   119  
   120  Other parameters are passed through a pointer to a FetchShortCodeParams struct
   121  
   122  
   123  Name | Type | Description
   124  ------------- | ------------- | -------------
   125  
   126  ### Return type
   127  
   128  [**ProxyV1ShortCode**](ProxyV1ShortCode.md)
   129  
   130  ### Authorization
   131  
   132  [accountSid_authToken](../README.md#accountSid_authToken)
   133  
   134  ### HTTP request headers
   135  
   136  - **Content-Type**: Not defined
   137  - **Accept**: application/json
   138  
   139  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   140  [[Back to Model list]](../README.md#documentation-for-models)
   141  [[Back to README]](../README.md)
   142  
   143  
   144  ## ListShortCode
   145  
   146  > []ProxyV1ShortCode ListShortCode(ctx, ServiceSidoptional)
   147  
   148  
   149  
   150  Retrieve a list of all Short Codes in the Proxy Number Pool for the Service. A maximum of 100 records will be returned per page.
   151  
   152  ### Path Parameters
   153  
   154  
   155  Name | Type | Description
   156  ------------- | ------------- | -------------
   157  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   158  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to read the resources from.
   159  
   160  ### Other Parameters
   161  
   162  Other parameters are passed through a pointer to a ListShortCodeParams struct
   163  
   164  
   165  Name | Type | Description
   166  ------------- | ------------- | -------------
   167  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   168  **Limit** | **int** | Max number of records to return.
   169  
   170  ### Return type
   171  
   172  [**[]ProxyV1ShortCode**](ProxyV1ShortCode.md)
   173  
   174  ### Authorization
   175  
   176  [accountSid_authToken](../README.md#accountSid_authToken)
   177  
   178  ### HTTP request headers
   179  
   180  - **Content-Type**: Not defined
   181  - **Accept**: application/json
   182  
   183  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   184  [[Back to Model list]](../README.md#documentation-for-models)
   185  [[Back to README]](../README.md)
   186  
   187  
   188  ## UpdateShortCode
   189  
   190  > ProxyV1ShortCode UpdateShortCode(ctx, ServiceSidSidoptional)
   191  
   192  
   193  
   194  Update a specific Short Code.
   195  
   196  ### Path Parameters
   197  
   198  
   199  Name | Type | Description
   200  ------------- | ------------- | -------------
   201  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   202  **ServiceSid** | **string** | The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to update.
   203  **Sid** | **string** | The Twilio-provided string that uniquely identifies the ShortCode resource to update.
   204  
   205  ### Other Parameters
   206  
   207  Other parameters are passed through a pointer to a UpdateShortCodeParams struct
   208  
   209  
   210  Name | Type | Description
   211  ------------- | ------------- | -------------
   212  **IsReserved** | **bool** | Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
   213  
   214  ### Return type
   215  
   216  [**ProxyV1ShortCode**](ProxyV1ShortCode.md)
   217  
   218  ### Authorization
   219  
   220  [accountSid_authToken](../README.md#accountSid_authToken)
   221  
   222  ### HTTP request headers
   223  
   224  - **Content-Type**: application/x-www-form-urlencoded
   225  - **Accept**: application/json
   226  
   227  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   228  [[Back to Model list]](../README.md#documentation-for-models)
   229  [[Back to README]](../README.md)
   230