github.com/twilio/twilio-go@v1.20.1/rest/proxy/v1/docs/ServicesApi.md (about) 1 # ServicesApi 2 3 All URIs are relative to *https://proxy.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateService**](ServicesApi.md#CreateService) | **Post** /v1/Services | 8 [**DeleteService**](ServicesApi.md#DeleteService) | **Delete** /v1/Services/{Sid} | 9 [**FetchService**](ServicesApi.md#FetchService) | **Get** /v1/Services/{Sid} | 10 [**ListService**](ServicesApi.md#ListService) | **Get** /v1/Services | 11 [**UpdateService**](ServicesApi.md#UpdateService) | **Post** /v1/Services/{Sid} | 12 13 14 15 ## CreateService 16 17 > ProxyV1Service CreateService(ctx, optional) 18 19 20 21 Create a new Service for Twilio Proxy 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 CreateServiceParams struct 30 31 32 Name | Type | Description 33 ------------- | ------------- | ------------- 34 **UniqueName** | **string** | An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** 35 **DefaultTtl** | **int** | The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value. 36 **CallbackUrl** | **string** | The URL we should call when the interaction status changes. 37 **GeoMatchLevel** | **string** | 38 **NumberSelectionBehavior** | **string** | 39 **InterceptCallbackUrl** | **string** | The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. 40 **OutOfSessionCallbackUrl** | **string** | The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. 41 **ChatInstanceSid** | **string** | The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. 42 43 ### Return type 44 45 [**ProxyV1Service**](ProxyV1Service.md) 46 47 ### Authorization 48 49 [accountSid_authToken](../README.md#accountSid_authToken) 50 51 ### HTTP request headers 52 53 - **Content-Type**: application/x-www-form-urlencoded 54 - **Accept**: application/json 55 56 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 57 [[Back to Model list]](../README.md#documentation-for-models) 58 [[Back to README]](../README.md) 59 60 61 ## DeleteService 62 63 > DeleteService(ctx, Sid) 64 65 66 67 Delete a specific Service. 68 69 ### Path Parameters 70 71 72 Name | Type | Description 73 ------------- | ------------- | ------------- 74 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 75 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Service resource to delete. 76 77 ### Other Parameters 78 79 Other parameters are passed through a pointer to a DeleteServiceParams struct 80 81 82 Name | Type | Description 83 ------------- | ------------- | ------------- 84 85 ### Return type 86 87 (empty response body) 88 89 ### Authorization 90 91 [accountSid_authToken](../README.md#accountSid_authToken) 92 93 ### HTTP request headers 94 95 - **Content-Type**: Not defined 96 - **Accept**: Not defined 97 98 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 99 [[Back to Model list]](../README.md#documentation-for-models) 100 [[Back to README]](../README.md) 101 102 103 ## FetchService 104 105 > ProxyV1Service FetchService(ctx, Sid) 106 107 108 109 Fetch a specific Service. 110 111 ### Path Parameters 112 113 114 Name | Type | Description 115 ------------- | ------------- | ------------- 116 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 117 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Service resource to fetch. 118 119 ### Other Parameters 120 121 Other parameters are passed through a pointer to a FetchServiceParams struct 122 123 124 Name | Type | Description 125 ------------- | ------------- | ------------- 126 127 ### Return type 128 129 [**ProxyV1Service**](ProxyV1Service.md) 130 131 ### Authorization 132 133 [accountSid_authToken](../README.md#accountSid_authToken) 134 135 ### HTTP request headers 136 137 - **Content-Type**: Not defined 138 - **Accept**: application/json 139 140 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 141 [[Back to Model list]](../README.md#documentation-for-models) 142 [[Back to README]](../README.md) 143 144 145 ## ListService 146 147 > []ProxyV1Service ListService(ctx, optional) 148 149 150 151 Retrieve a list of all Services for Twilio Proxy. A maximum of 100 records will be returned per page. 152 153 ### Path Parameters 154 155 This endpoint does not need any path parameter. 156 157 ### Other Parameters 158 159 Other parameters are passed through a pointer to a ListServiceParams struct 160 161 162 Name | Type | Description 163 ------------- | ------------- | ------------- 164 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 165 **Limit** | **int** | Max number of records to return. 166 167 ### Return type 168 169 [**[]ProxyV1Service**](ProxyV1Service.md) 170 171 ### Authorization 172 173 [accountSid_authToken](../README.md#accountSid_authToken) 174 175 ### HTTP request headers 176 177 - **Content-Type**: Not defined 178 - **Accept**: application/json 179 180 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 181 [[Back to Model list]](../README.md#documentation-for-models) 182 [[Back to README]](../README.md) 183 184 185 ## UpdateService 186 187 > ProxyV1Service UpdateService(ctx, Sidoptional) 188 189 190 191 Update a specific Service. 192 193 ### Path Parameters 194 195 196 Name | Type | Description 197 ------------- | ------------- | ------------- 198 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 199 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Service resource to update. 200 201 ### Other Parameters 202 203 Other parameters are passed through a pointer to a UpdateServiceParams struct 204 205 206 Name | Type | Description 207 ------------- | ------------- | ------------- 208 **UniqueName** | **string** | An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** 209 **DefaultTtl** | **int** | The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value. 210 **CallbackUrl** | **string** | The URL we should call when the interaction status changes. 211 **GeoMatchLevel** | **string** | 212 **NumberSelectionBehavior** | **string** | 213 **InterceptCallbackUrl** | **string** | The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. 214 **OutOfSessionCallbackUrl** | **string** | The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. 215 **ChatInstanceSid** | **string** | The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. 216 217 ### Return type 218 219 [**ProxyV1Service**](ProxyV1Service.md) 220 221 ### Authorization 222 223 [accountSid_authToken](../README.md#accountSid_authToken) 224 225 ### HTTP request headers 226 227 - **Content-Type**: application/x-www-form-urlencoded 228 - **Accept**: application/json 229 230 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 231 [[Back to Model list]](../README.md#documentation-for-models) 232 [[Back to README]](../README.md) 233