github.com/twilio/twilio-go@v1.20.1/rest/chat/v2/docs/ServicesChannelsWebhooksApi.md (about) 1 # ServicesChannelsWebhooksApi 2 3 All URIs are relative to *https://chat.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateChannelWebhook**](ServicesChannelsWebhooksApi.md#CreateChannelWebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | 8 [**DeleteChannelWebhook**](ServicesChannelsWebhooksApi.md#DeleteChannelWebhook) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | 9 [**FetchChannelWebhook**](ServicesChannelsWebhooksApi.md#FetchChannelWebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | 10 [**ListChannelWebhook**](ServicesChannelsWebhooksApi.md#ListChannelWebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | 11 [**UpdateChannelWebhook**](ServicesChannelsWebhooksApi.md#UpdateChannelWebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | 12 13 14 15 ## CreateChannelWebhook 16 17 > ChatV2ChannelWebhook CreateChannelWebhook(ctx, ServiceSidChannelSidoptional) 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 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to create the Webhook resource under. 30 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Channel Webhook resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. 31 32 ### Other Parameters 33 34 Other parameters are passed through a pointer to a CreateChannelWebhookParams struct 35 36 37 Name | Type | Description 38 ------------- | ------------- | ------------- 39 **Type** | **string** | 40 **ConfigurationUrl** | **string** | The URL of the webhook to call using the `configuration.method`. 41 **ConfigurationMethod** | **string** | 42 **ConfigurationFilters** | **[]string** | The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). 43 **ConfigurationTriggers** | **[]string** | A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. 44 **ConfigurationFlowSid** | **string** | The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`. 45 **ConfigurationRetryCount** | **int** | The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. 46 47 ### Return type 48 49 [**ChatV2ChannelWebhook**](ChatV2ChannelWebhook.md) 50 51 ### Authorization 52 53 [accountSid_authToken](../README.md#accountSid_authToken) 54 55 ### HTTP request headers 56 57 - **Content-Type**: application/x-www-form-urlencoded 58 - **Accept**: application/json 59 60 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 61 [[Back to Model list]](../README.md#documentation-for-models) 62 [[Back to README]](../README.md) 63 64 65 ## DeleteChannelWebhook 66 67 > DeleteChannelWebhook(ctx, ServiceSidChannelSidSid) 68 69 70 71 72 73 ### Path Parameters 74 75 76 Name | Type | Description 77 ------------- | ------------- | ------------- 78 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 79 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to delete the Webhook resource from. 80 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. 81 **Sid** | **string** | The SID of the Channel Webhook resource to delete. 82 83 ### Other Parameters 84 85 Other parameters are passed through a pointer to a DeleteChannelWebhookParams struct 86 87 88 Name | Type | Description 89 ------------- | ------------- | ------------- 90 91 ### Return type 92 93 (empty response body) 94 95 ### Authorization 96 97 [accountSid_authToken](../README.md#accountSid_authToken) 98 99 ### HTTP request headers 100 101 - **Content-Type**: Not defined 102 - **Accept**: Not defined 103 104 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 105 [[Back to Model list]](../README.md#documentation-for-models) 106 [[Back to README]](../README.md) 107 108 109 ## FetchChannelWebhook 110 111 > ChatV2ChannelWebhook FetchChannelWebhook(ctx, ServiceSidChannelSidSid) 112 113 114 115 116 117 ### Path Parameters 118 119 120 Name | Type | Description 121 ------------- | ------------- | ------------- 122 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 123 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to fetch the Webhook resource from. 124 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. 125 **Sid** | **string** | The SID of the Channel Webhook resource to fetch. 126 127 ### Other Parameters 128 129 Other parameters are passed through a pointer to a FetchChannelWebhookParams struct 130 131 132 Name | Type | Description 133 ------------- | ------------- | ------------- 134 135 ### Return type 136 137 [**ChatV2ChannelWebhook**](ChatV2ChannelWebhook.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 ## ListChannelWebhook 154 155 > []ChatV2ChannelWebhook ListChannelWebhook(ctx, ServiceSidChannelSidoptional) 156 157 158 159 160 161 ### Path Parameters 162 163 164 Name | Type | Description 165 ------------- | ------------- | ------------- 166 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 167 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to read the resources from. 168 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`. 169 170 ### Other Parameters 171 172 Other parameters are passed through a pointer to a ListChannelWebhookParams struct 173 174 175 Name | Type | Description 176 ------------- | ------------- | ------------- 177 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 178 **Limit** | **int** | Max number of records to return. 179 180 ### Return type 181 182 [**[]ChatV2ChannelWebhook**](ChatV2ChannelWebhook.md) 183 184 ### Authorization 185 186 [accountSid_authToken](../README.md#accountSid_authToken) 187 188 ### HTTP request headers 189 190 - **Content-Type**: Not defined 191 - **Accept**: application/json 192 193 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 194 [[Back to Model list]](../README.md#documentation-for-models) 195 [[Back to README]](../README.md) 196 197 198 ## UpdateChannelWebhook 199 200 > ChatV2ChannelWebhook UpdateChannelWebhook(ctx, ServiceSidChannelSidSidoptional) 201 202 203 204 205 206 ### Path Parameters 207 208 209 Name | Type | Description 210 ------------- | ------------- | ------------- 211 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 212 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel that has the Webhook resource to update. 213 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`. 214 **Sid** | **string** | The SID of the Channel Webhook resource to update. 215 216 ### Other Parameters 217 218 Other parameters are passed through a pointer to a UpdateChannelWebhookParams struct 219 220 221 Name | Type | Description 222 ------------- | ------------- | ------------- 223 **ConfigurationUrl** | **string** | The URL of the webhook to call using the `configuration.method`. 224 **ConfigurationMethod** | **string** | 225 **ConfigurationFilters** | **[]string** | The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). 226 **ConfigurationTriggers** | **[]string** | A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. 227 **ConfigurationFlowSid** | **string** | The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`. 228 **ConfigurationRetryCount** | **int** | The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. 229 230 ### Return type 231 232 [**ChatV2ChannelWebhook**](ChatV2ChannelWebhook.md) 233 234 ### Authorization 235 236 [accountSid_authToken](../README.md#accountSid_authToken) 237 238 ### HTTP request headers 239 240 - **Content-Type**: application/x-www-form-urlencoded 241 - **Accept**: application/json 242 243 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 244 [[Back to Model list]](../README.md#documentation-for-models) 245 [[Back to README]](../README.md) 246