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

     1  # TrunksOriginationUrlsApi
     2  
     3  All URIs are relative to *https://trunking.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateOriginationUrl**](TrunksOriginationUrlsApi.md#CreateOriginationUrl) | **Post** /v1/Trunks/{TrunkSid}/OriginationUrls | 
     8  [**DeleteOriginationUrl**](TrunksOriginationUrlsApi.md#DeleteOriginationUrl) | **Delete** /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid} | 
     9  [**FetchOriginationUrl**](TrunksOriginationUrlsApi.md#FetchOriginationUrl) | **Get** /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid} | 
    10  [**ListOriginationUrl**](TrunksOriginationUrlsApi.md#ListOriginationUrl) | **Get** /v1/Trunks/{TrunkSid}/OriginationUrls | 
    11  [**UpdateOriginationUrl**](TrunksOriginationUrlsApi.md#UpdateOriginationUrl) | **Post** /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid} | 
    12  
    13  
    14  
    15  ## CreateOriginationUrl
    16  
    17  > TrunkingV1OriginationUrl CreateOriginationUrl(ctx, TrunkSidoptional)
    18  
    19  
    20  
    21  
    22  
    23  ### Path Parameters
    24  
    25  
    26  Name | Type | Description
    27  ------------- | ------------- | -------------
    28  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    29  **TrunkSid** | **string** | The SID of the Trunk to associate the resource with.
    30  
    31  ### Other Parameters
    32  
    33  Other parameters are passed through a pointer to a CreateOriginationUrlParams struct
    34  
    35  
    36  Name | Type | Description
    37  ------------- | ------------- | -------------
    38  **Weight** | **int** | The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority.
    39  **Priority** | **int** | The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI.
    40  **Enabled** | **bool** | Whether the URL is enabled. The default is `true`.
    41  **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long.
    42  **SipUrl** | **string** | The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema.
    43  
    44  ### Return type
    45  
    46  [**TrunkingV1OriginationUrl**](TrunkingV1OriginationUrl.md)
    47  
    48  ### Authorization
    49  
    50  [accountSid_authToken](../README.md#accountSid_authToken)
    51  
    52  ### HTTP request headers
    53  
    54  - **Content-Type**: application/x-www-form-urlencoded
    55  - **Accept**: application/json
    56  
    57  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    58  [[Back to Model list]](../README.md#documentation-for-models)
    59  [[Back to README]](../README.md)
    60  
    61  
    62  ## DeleteOriginationUrl
    63  
    64  > DeleteOriginationUrl(ctx, TrunkSidSid)
    65  
    66  
    67  
    68  
    69  
    70  ### Path Parameters
    71  
    72  
    73  Name | Type | Description
    74  ------------- | ------------- | -------------
    75  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    76  **TrunkSid** | **string** | The SID of the Trunk from which to delete the OriginationUrl.
    77  **Sid** | **string** | The unique string that we created to identify the OriginationUrl resource to delete.
    78  
    79  ### Other Parameters
    80  
    81  Other parameters are passed through a pointer to a DeleteOriginationUrlParams struct
    82  
    83  
    84  Name | Type | Description
    85  ------------- | ------------- | -------------
    86  
    87  ### Return type
    88  
    89   (empty response body)
    90  
    91  ### Authorization
    92  
    93  [accountSid_authToken](../README.md#accountSid_authToken)
    94  
    95  ### HTTP request headers
    96  
    97  - **Content-Type**: Not defined
    98  - **Accept**: Not defined
    99  
   100  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   101  [[Back to Model list]](../README.md#documentation-for-models)
   102  [[Back to README]](../README.md)
   103  
   104  
   105  ## FetchOriginationUrl
   106  
   107  > TrunkingV1OriginationUrl FetchOriginationUrl(ctx, TrunkSidSid)
   108  
   109  
   110  
   111  
   112  
   113  ### Path Parameters
   114  
   115  
   116  Name | Type | Description
   117  ------------- | ------------- | -------------
   118  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   119  **TrunkSid** | **string** | The SID of the Trunk from which to fetch the OriginationUrl.
   120  **Sid** | **string** | The unique string that we created to identify the OriginationUrl resource to fetch.
   121  
   122  ### Other Parameters
   123  
   124  Other parameters are passed through a pointer to a FetchOriginationUrlParams struct
   125  
   126  
   127  Name | Type | Description
   128  ------------- | ------------- | -------------
   129  
   130  ### Return type
   131  
   132  [**TrunkingV1OriginationUrl**](TrunkingV1OriginationUrl.md)
   133  
   134  ### Authorization
   135  
   136  [accountSid_authToken](../README.md#accountSid_authToken)
   137  
   138  ### HTTP request headers
   139  
   140  - **Content-Type**: Not defined
   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  
   147  
   148  ## ListOriginationUrl
   149  
   150  > []TrunkingV1OriginationUrl ListOriginationUrl(ctx, TrunkSidoptional)
   151  
   152  
   153  
   154  
   155  
   156  ### Path Parameters
   157  
   158  
   159  Name | Type | Description
   160  ------------- | ------------- | -------------
   161  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   162  **TrunkSid** | **string** | The SID of the Trunk from which to read the OriginationUrl.
   163  
   164  ### Other Parameters
   165  
   166  Other parameters are passed through a pointer to a ListOriginationUrlParams struct
   167  
   168  
   169  Name | Type | Description
   170  ------------- | ------------- | -------------
   171  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   172  **Limit** | **int** | Max number of records to return.
   173  
   174  ### Return type
   175  
   176  [**[]TrunkingV1OriginationUrl**](TrunkingV1OriginationUrl.md)
   177  
   178  ### Authorization
   179  
   180  [accountSid_authToken](../README.md#accountSid_authToken)
   181  
   182  ### HTTP request headers
   183  
   184  - **Content-Type**: Not defined
   185  - **Accept**: application/json
   186  
   187  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   188  [[Back to Model list]](../README.md#documentation-for-models)
   189  [[Back to README]](../README.md)
   190  
   191  
   192  ## UpdateOriginationUrl
   193  
   194  > TrunkingV1OriginationUrl UpdateOriginationUrl(ctx, TrunkSidSidoptional)
   195  
   196  
   197  
   198  
   199  
   200  ### Path Parameters
   201  
   202  
   203  Name | Type | Description
   204  ------------- | ------------- | -------------
   205  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   206  **TrunkSid** | **string** | The SID of the Trunk from which to update the OriginationUrl.
   207  **Sid** | **string** | The unique string that we created to identify the OriginationUrl resource to update.
   208  
   209  ### Other Parameters
   210  
   211  Other parameters are passed through a pointer to a UpdateOriginationUrlParams struct
   212  
   213  
   214  Name | Type | Description
   215  ------------- | ------------- | -------------
   216  **Weight** | **int** | The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority.
   217  **Priority** | **int** | The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI.
   218  **Enabled** | **bool** | Whether the URL is enabled. The default is `true`.
   219  **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long.
   220  **SipUrl** | **string** | The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported.
   221  
   222  ### Return type
   223  
   224  [**TrunkingV1OriginationUrl**](TrunkingV1OriginationUrl.md)
   225  
   226  ### Authorization
   227  
   228  [accountSid_authToken](../README.md#accountSid_authToken)
   229  
   230  ### HTTP request headers
   231  
   232  - **Content-Type**: application/x-www-form-urlencoded
   233  - **Accept**: application/json
   234  
   235  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   236  [[Back to Model list]](../README.md#documentation-for-models)
   237  [[Back to README]](../README.md)
   238