github.com/twilio/twilio-go@v1.20.1/rest/messaging/v1/docs/ServicesApi.md (about) 1 # ServicesApi 2 3 All URIs are relative to *https://messaging.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 > MessagingV1Service CreateService(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 CreateServiceParams struct 30 31 32 Name | Type | Description 33 ------------- | ------------- | ------------- 34 **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. 35 **InboundRequestUrl** | **string** | The URL we call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. All messages sent to the Twilio phone number or short code will not be logged and received on the Account. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `inbound_request_url` defined for the Messaging Service. 36 **InboundMethod** | **string** | The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. 37 **FallbackUrl** | **string** | The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service. 38 **FallbackMethod** | **string** | The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. 39 **StatusCallback** | **string** | The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. 40 **StickySender** | **bool** | Whether to enable [Sticky Sender](https://www.twilio.com/docs/messaging/services#sticky-sender) on the Service instance. 41 **MmsConverter** | **bool** | Whether to enable the [MMS Converter](https://www.twilio.com/docs/messaging/services#mms-converter) for messages sent through the Service instance. 42 **SmartEncoding** | **bool** | Whether to enable [Smart Encoding](https://www.twilio.com/docs/messaging/services#smart-encoding) for messages sent through the Service instance. 43 **ScanMessageContent** | **string** | 44 **FallbackToLongCode** | **bool** | [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures. 45 **AreaCodeGeomatch** | **bool** | Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. 46 **ValidityPeriod** | **int** | How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. 47 **SynchronousValidation** | **bool** | Reserved. 48 **Usecase** | **string** | A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`. 49 **UseInboundWebhookOnNumber** | **bool** | A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. 50 51 ### Return type 52 53 [**MessagingV1Service**](MessagingV1Service.md) 54 55 ### Authorization 56 57 [accountSid_authToken](../README.md#accountSid_authToken) 58 59 ### HTTP request headers 60 61 - **Content-Type**: application/x-www-form-urlencoded 62 - **Accept**: application/json 63 64 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 65 [[Back to Model list]](../README.md#documentation-for-models) 66 [[Back to README]](../README.md) 67 68 69 ## DeleteService 70 71 > DeleteService(ctx, Sid) 72 73 74 75 76 77 ### Path Parameters 78 79 80 Name | Type | Description 81 ------------- | ------------- | ------------- 82 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 83 **Sid** | **string** | The SID of the Service resource to delete. 84 85 ### Other Parameters 86 87 Other parameters are passed through a pointer to a DeleteServiceParams struct 88 89 90 Name | Type | Description 91 ------------- | ------------- | ------------- 92 93 ### Return type 94 95 (empty response body) 96 97 ### Authorization 98 99 [accountSid_authToken](../README.md#accountSid_authToken) 100 101 ### HTTP request headers 102 103 - **Content-Type**: Not defined 104 - **Accept**: Not defined 105 106 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 107 [[Back to Model list]](../README.md#documentation-for-models) 108 [[Back to README]](../README.md) 109 110 111 ## FetchService 112 113 > MessagingV1Service FetchService(ctx, Sid) 114 115 116 117 118 119 ### Path Parameters 120 121 122 Name | Type | Description 123 ------------- | ------------- | ------------- 124 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 125 **Sid** | **string** | The SID of the Service resource to fetch. 126 127 ### Other Parameters 128 129 Other parameters are passed through a pointer to a FetchServiceParams struct 130 131 132 Name | Type | Description 133 ------------- | ------------- | ------------- 134 135 ### Return type 136 137 [**MessagingV1Service**](MessagingV1Service.md) 138 139 ### Authorization 140 141 [accountSid_authToken](../README.md#accountSid_authToken) 142 143 ### HTTP request headers 144 145 - **Content-Type**: Not defined 146 - **Accept**: application/json 147 148 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 149 [[Back to Model list]](../README.md#documentation-for-models) 150 [[Back to README]](../README.md) 151 152 153 ## ListService 154 155 > []MessagingV1Service ListService(ctx, optional) 156 157 158 159 160 161 ### Path Parameters 162 163 This endpoint does not need any path parameter. 164 165 ### Other Parameters 166 167 Other parameters are passed through a pointer to a ListServiceParams struct 168 169 170 Name | Type | Description 171 ------------- | ------------- | ------------- 172 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 173 **Limit** | **int** | Max number of records to return. 174 175 ### Return type 176 177 [**[]MessagingV1Service**](MessagingV1Service.md) 178 179 ### Authorization 180 181 [accountSid_authToken](../README.md#accountSid_authToken) 182 183 ### HTTP request headers 184 185 - **Content-Type**: Not defined 186 - **Accept**: application/json 187 188 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 189 [[Back to Model list]](../README.md#documentation-for-models) 190 [[Back to README]](../README.md) 191 192 193 ## UpdateService 194 195 > MessagingV1Service UpdateService(ctx, Sidoptional) 196 197 198 199 200 201 ### Path Parameters 202 203 204 Name | Type | Description 205 ------------- | ------------- | ------------- 206 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 207 **Sid** | **string** | The SID of the Service resource to update. 208 209 ### Other Parameters 210 211 Other parameters are passed through a pointer to a UpdateServiceParams struct 212 213 214 Name | Type | Description 215 ------------- | ------------- | ------------- 216 **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. 217 **InboundRequestUrl** | **string** | The URL we call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. All messages sent to the Twilio phone number or short code will not be logged and received on the Account. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `inbound_request_url` defined for the Messaging Service. 218 **InboundMethod** | **string** | The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. 219 **FallbackUrl** | **string** | The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service. 220 **FallbackMethod** | **string** | The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. 221 **StatusCallback** | **string** | The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. 222 **StickySender** | **bool** | Whether to enable [Sticky Sender](https://www.twilio.com/docs/messaging/services#sticky-sender) on the Service instance. 223 **MmsConverter** | **bool** | Whether to enable the [MMS Converter](https://www.twilio.com/docs/messaging/services#mms-converter) for messages sent through the Service instance. 224 **SmartEncoding** | **bool** | Whether to enable [Smart Encoding](https://www.twilio.com/docs/messaging/services#smart-encoding) for messages sent through the Service instance. 225 **ScanMessageContent** | **string** | 226 **FallbackToLongCode** | **bool** | [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures. 227 **AreaCodeGeomatch** | **bool** | Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. 228 **ValidityPeriod** | **int** | How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. 229 **SynchronousValidation** | **bool** | Reserved. 230 **Usecase** | **string** | A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`. 231 **UseInboundWebhookOnNumber** | **bool** | A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. 232 233 ### Return type 234 235 [**MessagingV1Service**](MessagingV1Service.md) 236 237 ### Authorization 238 239 [accountSid_authToken](../README.md#accountSid_authToken) 240 241 ### HTTP request headers 242 243 - **Content-Type**: application/x-www-form-urlencoded 244 - **Accept**: application/json 245 246 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 247 [[Back to Model list]](../README.md#documentation-for-models) 248 [[Back to README]](../README.md) 249