github.com/twilio/twilio-go@v1.20.1/rest/chat/v1/docs/ServicesChannelsApi.md (about) 1 # ServicesChannelsApi 2 3 All URIs are relative to *https://chat.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateChannel**](ServicesChannelsApi.md#CreateChannel) | **Post** /v1/Services/{ServiceSid}/Channels | 8 [**DeleteChannel**](ServicesChannelsApi.md#DeleteChannel) | **Delete** /v1/Services/{ServiceSid}/Channels/{Sid} | 9 [**FetchChannel**](ServicesChannelsApi.md#FetchChannel) | **Get** /v1/Services/{ServiceSid}/Channels/{Sid} | 10 [**ListChannel**](ServicesChannelsApi.md#ListChannel) | **Get** /v1/Services/{ServiceSid}/Channels | 11 [**UpdateChannel**](ServicesChannelsApi.md#UpdateChannel) | **Post** /v1/Services/{ServiceSid}/Channels/{Sid} | 12 13 14 15 ## CreateChannel 16 17 > ChatV1Channel CreateChannel(ctx, ServiceSidoptional) 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/api/chat/rest/services) to create the resource under. 30 31 ### Other Parameters 32 33 Other parameters are passed through a pointer to a CreateChannelParams struct 34 35 36 Name | Type | Description 37 ------------- | ------------- | ------------- 38 **FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. 39 **UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. 40 **Attributes** | **string** | A valid JSON string that contains application-specific data. 41 **Type** | **string** | 42 43 ### Return type 44 45 [**ChatV1Channel**](ChatV1Channel.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 ## DeleteChannel 62 63 > DeleteChannel(ctx, ServiceSidSid) 64 65 66 67 68 69 ### Path Parameters 70 71 72 Name | Type | Description 73 ------------- | ------------- | ------------- 74 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 75 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. 76 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Channel resource to delete. 77 78 ### Other Parameters 79 80 Other parameters are passed through a pointer to a DeleteChannelParams struct 81 82 83 Name | Type | Description 84 ------------- | ------------- | ------------- 85 86 ### Return type 87 88 (empty response body) 89 90 ### Authorization 91 92 [accountSid_authToken](../README.md#accountSid_authToken) 93 94 ### HTTP request headers 95 96 - **Content-Type**: Not defined 97 - **Accept**: Not defined 98 99 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 100 [[Back to Model list]](../README.md#documentation-for-models) 101 [[Back to README]](../README.md) 102 103 104 ## FetchChannel 105 106 > ChatV1Channel FetchChannel(ctx, ServiceSidSid) 107 108 109 110 111 112 ### Path Parameters 113 114 115 Name | Type | Description 116 ------------- | ------------- | ------------- 117 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 118 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. 119 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Channel resource to fetch. 120 121 ### Other Parameters 122 123 Other parameters are passed through a pointer to a FetchChannelParams struct 124 125 126 Name | Type | Description 127 ------------- | ------------- | ------------- 128 129 ### Return type 130 131 [**ChatV1Channel**](ChatV1Channel.md) 132 133 ### Authorization 134 135 [accountSid_authToken](../README.md#accountSid_authToken) 136 137 ### HTTP request headers 138 139 - **Content-Type**: Not defined 140 - **Accept**: application/json 141 142 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 143 [[Back to Model list]](../README.md#documentation-for-models) 144 [[Back to README]](../README.md) 145 146 147 ## ListChannel 148 149 > []ChatV1Channel ListChannel(ctx, ServiceSidoptional) 150 151 152 153 154 155 ### Path Parameters 156 157 158 Name | Type | Description 159 ------------- | ------------- | ------------- 160 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 161 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. 162 163 ### Other Parameters 164 165 Other parameters are passed through a pointer to a ListChannelParams struct 166 167 168 Name | Type | Description 169 ------------- | ------------- | ------------- 170 **Type** | [**[]ChannelEnumChannelType**](ChannelEnumChannelType.md) | The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. 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 [**[]ChatV1Channel**](ChatV1Channel.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 ## UpdateChannel 193 194 > ChatV1Channel UpdateChannel(ctx, ServiceSidSidoptional) 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 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. 207 **Sid** | **string** | The Twilio-provided string that uniquely identifies the Channel resource to update. 208 209 ### Other Parameters 210 211 Other parameters are passed through a pointer to a UpdateChannelParams 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 **UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. 218 **Attributes** | **string** | A valid JSON string that contains application-specific data. 219 220 ### Return type 221 222 [**ChatV1Channel**](ChatV1Channel.md) 223 224 ### Authorization 225 226 [accountSid_authToken](../README.md#accountSid_authToken) 227 228 ### HTTP request headers 229 230 - **Content-Type**: application/x-www-form-urlencoded 231 - **Accept**: application/json 232 233 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 234 [[Back to Model list]](../README.md#documentation-for-models) 235 [[Back to README]](../README.md) 236