github.com/twilio/twilio-go@v1.20.1/rest/chat/v2/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** /v2/Services/{ServiceSid}/Channels | 
     8  [**DeleteChannel**](ServicesChannelsApi.md#DeleteChannel) | **Delete** /v2/Services/{ServiceSid}/Channels/{Sid} | 
     9  [**FetchChannel**](ServicesChannelsApi.md#FetchChannel) | **Get** /v2/Services/{ServiceSid}/Channels/{Sid} | 
    10  [**ListChannel**](ServicesChannelsApi.md#ListChannel) | **Get** /v2/Services/{ServiceSid}/Channels | 
    11  [**UpdateChannel**](ServicesChannelsApi.md#UpdateChannel) | **Post** /v2/Services/{ServiceSid}/Channels/{Sid} | 
    12  
    13  
    14  
    15  ## CreateChannel
    16  
    17  > ChatV2Channel 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/chat/rest/service-resource) to create the Channel 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  **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header
    39  **FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
    40  **UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
    41  **Attributes** | **string** | A valid JSON string that contains application-specific data.
    42  **Type** | **string** | 
    43  **DateCreated** | **time.Time** | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service.  Note that this should only be used in cases where a Channel is being recreated from a backup/separate source.
    44  **DateUpdated** | **time.Time** | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source  and where a Message was previously updated.
    45  **CreatedBy** | **string** | The `identity` of the User that created the channel. Default is: `system`.
    46  
    47  ### Return type
    48  
    49  [**ChatV2Channel**](ChatV2Channel.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  ## DeleteChannel
    66  
    67  > DeleteChannel(ctx, ServiceSidSidoptional)
    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) to delete the resource from.
    80  **Sid** | **string** | The SID of the Channel resource to delete.  This value can be either the `sid` or the `unique_name` of the Channel resource to delete.
    81  
    82  ### Other Parameters
    83  
    84  Other parameters are passed through a pointer to a DeleteChannelParams struct
    85  
    86  
    87  Name | Type | Description
    88  ------------- | ------------- | -------------
    89  **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header
    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  ## FetchChannel
   110  
   111  > ChatV2Channel FetchChannel(ctx, ServiceSidSid)
   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) to fetch the Channel resource from.
   124  **Sid** | **string** | The SID of the Channel resource to fetch. This value can be either the `sid` or the `unique_name` of the Channel resource to fetch.
   125  
   126  ### Other Parameters
   127  
   128  Other parameters are passed through a pointer to a FetchChannelParams struct
   129  
   130  
   131  Name | Type | Description
   132  ------------- | ------------- | -------------
   133  
   134  ### Return type
   135  
   136  [**ChatV2Channel**](ChatV2Channel.md)
   137  
   138  ### Authorization
   139  
   140  [accountSid_authToken](../README.md#accountSid_authToken)
   141  
   142  ### HTTP request headers
   143  
   144  - **Content-Type**: Not defined
   145  - **Accept**: application/json
   146  
   147  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   148  [[Back to Model list]](../README.md#documentation-for-models)
   149  [[Back to README]](../README.md)
   150  
   151  
   152  ## ListChannel
   153  
   154  > []ChatV2Channel ListChannel(ctx, ServiceSidoptional)
   155  
   156  
   157  
   158  
   159  
   160  ### Path Parameters
   161  
   162  
   163  Name | Type | Description
   164  ------------- | ------------- | -------------
   165  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   166  **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Channel resources from.
   167  
   168  ### Other Parameters
   169  
   170  Other parameters are passed through a pointer to a ListChannelParams struct
   171  
   172  
   173  Name | Type | Description
   174  ------------- | ------------- | -------------
   175  **Type** | [**[]ChannelEnumChannelType**](ChannelEnumChannelType.md) | The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.
   176  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   177  **Limit** | **int** | Max number of records to return.
   178  
   179  ### Return type
   180  
   181  [**[]ChatV2Channel**](ChatV2Channel.md)
   182  
   183  ### Authorization
   184  
   185  [accountSid_authToken](../README.md#accountSid_authToken)
   186  
   187  ### HTTP request headers
   188  
   189  - **Content-Type**: Not defined
   190  - **Accept**: application/json
   191  
   192  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   193  [[Back to Model list]](../README.md#documentation-for-models)
   194  [[Back to README]](../README.md)
   195  
   196  
   197  ## UpdateChannel
   198  
   199  > ChatV2Channel UpdateChannel(ctx, ServiceSidSidoptional)
   200  
   201  
   202  
   203  
   204  
   205  ### Path Parameters
   206  
   207  
   208  Name | Type | Description
   209  ------------- | ------------- | -------------
   210  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   211  **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Channel resource in.
   212  **Sid** | **string** | The SID of the Channel resource to update. This value can be either the `sid` or the `unique_name` of the Channel resource to update.
   213  
   214  ### Other Parameters
   215  
   216  Other parameters are passed through a pointer to a UpdateChannelParams struct
   217  
   218  
   219  Name | Type | Description
   220  ------------- | ------------- | -------------
   221  **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header
   222  **FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 256 characters long.
   223  **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 256 characters or less in length and unique within the Service.
   224  **Attributes** | **string** | A valid JSON string that contains application-specific data.
   225  **DateCreated** | **time.Time** | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service.  Note that this should only be used in cases where a Channel is being recreated from a backup/separate source.
   226  **DateUpdated** | **time.Time** | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
   227  **CreatedBy** | **string** | The `identity` of the User that created the channel. Default is: `system`.
   228  
   229  ### Return type
   230  
   231  [**ChatV2Channel**](ChatV2Channel.md)
   232  
   233  ### Authorization
   234  
   235  [accountSid_authToken](../README.md#accountSid_authToken)
   236  
   237  ### HTTP request headers
   238  
   239  - **Content-Type**: application/x-www-form-urlencoded
   240  - **Accept**: application/json
   241  
   242  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   243  [[Back to Model list]](../README.md#documentation-for-models)
   244  [[Back to README]](../README.md)
   245