github.com/twilio/twilio-go@v1.20.1/rest/chat/v2/docs/ServicesApi.md (about)

     1  # ServicesApi
     2  
     3  All URIs are relative to *https://chat.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateService**](ServicesApi.md#CreateService) | **Post** /v2/Services | 
     8  [**DeleteService**](ServicesApi.md#DeleteService) | **Delete** /v2/Services/{Sid} | 
     9  [**FetchService**](ServicesApi.md#FetchService) | **Get** /v2/Services/{Sid} | 
    10  [**ListService**](ServicesApi.md#ListService) | **Get** /v2/Services | 
    11  [**UpdateService**](ServicesApi.md#UpdateService) | **Post** /v2/Services/{Sid} | 
    12  
    13  
    14  
    15  ## CreateService
    16  
    17  > ChatV2Service 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 new resource.
    35  
    36  ### Return type
    37  
    38  [**ChatV2Service**](ChatV2Service.md)
    39  
    40  ### Authorization
    41  
    42  [accountSid_authToken](../README.md#accountSid_authToken)
    43  
    44  ### HTTP request headers
    45  
    46  - **Content-Type**: application/x-www-form-urlencoded
    47  - **Accept**: application/json
    48  
    49  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    50  [[Back to Model list]](../README.md#documentation-for-models)
    51  [[Back to README]](../README.md)
    52  
    53  
    54  ## DeleteService
    55  
    56  > DeleteService(ctx, Sid)
    57  
    58  
    59  
    60  
    61  
    62  ### Path Parameters
    63  
    64  
    65  Name | Type | Description
    66  ------------- | ------------- | -------------
    67  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    68  **Sid** | **string** | The SID of the Service resource to delete.
    69  
    70  ### Other Parameters
    71  
    72  Other parameters are passed through a pointer to a DeleteServiceParams struct
    73  
    74  
    75  Name | Type | Description
    76  ------------- | ------------- | -------------
    77  
    78  ### Return type
    79  
    80   (empty response body)
    81  
    82  ### Authorization
    83  
    84  [accountSid_authToken](../README.md#accountSid_authToken)
    85  
    86  ### HTTP request headers
    87  
    88  - **Content-Type**: Not defined
    89  - **Accept**: Not defined
    90  
    91  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    92  [[Back to Model list]](../README.md#documentation-for-models)
    93  [[Back to README]](../README.md)
    94  
    95  
    96  ## FetchService
    97  
    98  > ChatV2Service FetchService(ctx, Sid)
    99  
   100  
   101  
   102  
   103  
   104  ### Path Parameters
   105  
   106  
   107  Name | Type | Description
   108  ------------- | ------------- | -------------
   109  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   110  **Sid** | **string** | The SID of the Service resource to fetch.
   111  
   112  ### Other Parameters
   113  
   114  Other parameters are passed through a pointer to a FetchServiceParams struct
   115  
   116  
   117  Name | Type | Description
   118  ------------- | ------------- | -------------
   119  
   120  ### Return type
   121  
   122  [**ChatV2Service**](ChatV2Service.md)
   123  
   124  ### Authorization
   125  
   126  [accountSid_authToken](../README.md#accountSid_authToken)
   127  
   128  ### HTTP request headers
   129  
   130  - **Content-Type**: Not defined
   131  - **Accept**: application/json
   132  
   133  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   134  [[Back to Model list]](../README.md#documentation-for-models)
   135  [[Back to README]](../README.md)
   136  
   137  
   138  ## ListService
   139  
   140  > []ChatV2Service ListService(ctx, optional)
   141  
   142  
   143  
   144  
   145  
   146  ### Path Parameters
   147  
   148  This endpoint does not need any path parameter.
   149  
   150  ### Other Parameters
   151  
   152  Other parameters are passed through a pointer to a ListServiceParams struct
   153  
   154  
   155  Name | Type | Description
   156  ------------- | ------------- | -------------
   157  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   158  **Limit** | **int** | Max number of records to return.
   159  
   160  ### Return type
   161  
   162  [**[]ChatV2Service**](ChatV2Service.md)
   163  
   164  ### Authorization
   165  
   166  [accountSid_authToken](../README.md#accountSid_authToken)
   167  
   168  ### HTTP request headers
   169  
   170  - **Content-Type**: Not defined
   171  - **Accept**: application/json
   172  
   173  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   174  [[Back to Model list]](../README.md#documentation-for-models)
   175  [[Back to README]](../README.md)
   176  
   177  
   178  ## UpdateService
   179  
   180  > ChatV2Service UpdateService(ctx, Sidoptional)
   181  
   182  
   183  
   184  
   185  
   186  ### Path Parameters
   187  
   188  
   189  Name | Type | Description
   190  ------------- | ------------- | -------------
   191  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   192  **Sid** | **string** | The SID of the Service resource to update.
   193  
   194  ### Other Parameters
   195  
   196  Other parameters are passed through a pointer to a UpdateServiceParams struct
   197  
   198  
   199  Name | Type | Description
   200  ------------- | ------------- | -------------
   201  **FriendlyName** | **string** | A descriptive string that you create to describe the resource.
   202  **DefaultServiceRoleSid** | **string** | The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
   203  **DefaultChannelRoleSid** | **string** | The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
   204  **DefaultChannelCreatorRoleSid** | **string** | The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
   205  **ReadStatusEnabled** | **bool** | Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`.
   206  **ReachabilityEnabled** | **bool** | Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`.
   207  **TypingIndicatorTimeout** | **int** | How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received.  The default is 5 seconds.
   208  **ConsumptionReportInterval** | **int** | DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.
   209  **NotificationsNewMessageEnabled** | **bool** | Whether to send a notification when a new message is added to a channel. The default is `false`.
   210  **NotificationsNewMessageTemplate** | **string** | The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
   211  **NotificationsNewMessageSound** | **string** | The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
   212  **NotificationsNewMessageBadgeCountEnabled** | **bool** | Whether the new message badge is enabled. The default is `false`.
   213  **NotificationsAddedToChannelEnabled** | **bool** | Whether to send a notification when a member is added to a channel. The default is `false`.
   214  **NotificationsAddedToChannelTemplate** | **string** | The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
   215  **NotificationsAddedToChannelSound** | **string** | The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
   216  **NotificationsRemovedFromChannelEnabled** | **bool** | Whether to send a notification to a user when they are removed from a channel. The default is `false`.
   217  **NotificationsRemovedFromChannelTemplate** | **string** | The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
   218  **NotificationsRemovedFromChannelSound** | **string** | The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
   219  **NotificationsInvitedToChannelEnabled** | **bool** | Whether to send a notification when a user is invited to a channel. The default is `false`.
   220  **NotificationsInvitedToChannelTemplate** | **string** | The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
   221  **NotificationsInvitedToChannelSound** | **string** | The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
   222  **PreWebhookUrl** | **string** | The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
   223  **PostWebhookUrl** | **string** | The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
   224  **WebhookMethod** | **string** | The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks.  Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
   225  **WebhookFilters** | **[]string** | The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
   226  **LimitsChannelMembers** | **int** | The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.
   227  **LimitsUserChannels** | **int** | The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.
   228  **MediaCompatibilityMessage** | **string** | The message to send when a media message has no text. Can be used as placeholder message.
   229  **PreWebhookRetryCount** | **int** | The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried.
   230  **PostWebhookRetryCount** | **int** | The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried.
   231  **NotificationsLogEnabled** | **bool** | Whether to log notifications. The default is `false`.
   232  
   233  ### Return type
   234  
   235  [**ChatV2Service**](ChatV2Service.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