github.com/twilio/twilio-go@v1.20.1/rest/chat/v1/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** /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  > ChatV1Service 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  
    36  ### Return type
    37  
    38  [**ChatV1Service**](ChatV1Service.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 Twilio-provided string that uniquely identifies 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  > ChatV1Service 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 Twilio-provided string that uniquely identifies 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  [**ChatV1Service**](ChatV1Service.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  > []ChatV1Service 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  [**[]ChatV1Service**](ChatV1Service.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  > ChatV1Service 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 Twilio-provided string that uniquely identifies 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. It can be up to 64 characters long.
   202  **DefaultServiceRoleSid** | **string** | The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
   203  **DefaultChannelRoleSid** | **string** | The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
   204  **DefaultChannelCreatorRoleSid** | **string** | The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
   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. Can be: `true` or `false` and 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  **NotificationsAddedToChannelEnabled** | **bool** | Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`.
   212  **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`.
   213  **NotificationsRemovedFromChannelEnabled** | **bool** | Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`.
   214  **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`.
   215  **NotificationsInvitedToChannelEnabled** | **bool** | Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`.
   216  **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`.
   217  **PreWebhookUrl** | **string** | The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.
   218  **PostWebhookUrl** | **string** | The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.
   219  **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.
   220  **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.
   221  **WebhooksOnMessageSendUrl** | **string** | The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method.
   222  **WebhooksOnMessageSendMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_send.url`.
   223  **WebhooksOnMessageUpdateUrl** | **string** | The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method.
   224  **WebhooksOnMessageUpdateMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_update.url`.
   225  **WebhooksOnMessageRemoveUrl** | **string** | The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method.
   226  **WebhooksOnMessageRemoveMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_remove.url`.
   227  **WebhooksOnChannelAddUrl** | **string** | The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method.
   228  **WebhooksOnChannelAddMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_add.url`.
   229  **WebhooksOnChannelDestroyUrl** | **string** | The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method.
   230  **WebhooksOnChannelDestroyMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_destroy.url`.
   231  **WebhooksOnChannelUpdateUrl** | **string** | The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method.
   232  **WebhooksOnChannelUpdateMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_update.url`.
   233  **WebhooksOnMemberAddUrl** | **string** | The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method.
   234  **WebhooksOnMemberAddMethod** | **string** | The HTTP method to use when calling the `webhooks.on_member_add.url`.
   235  **WebhooksOnMemberRemoveUrl** | **string** | The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method.
   236  **WebhooksOnMemberRemoveMethod** | **string** | The HTTP method to use when calling the `webhooks.on_member_remove.url`.
   237  **WebhooksOnMessageSentUrl** | **string** | The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method.
   238  **WebhooksOnMessageSentMethod** | **string** | The URL of the webhook to call in response to the `on_message_sent` event`.
   239  **WebhooksOnMessageUpdatedUrl** | **string** | The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method.
   240  **WebhooksOnMessageUpdatedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_updated.url`.
   241  **WebhooksOnMessageRemovedUrl** | **string** | The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method.
   242  **WebhooksOnMessageRemovedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_removed.url`.
   243  **WebhooksOnChannelAddedUrl** | **string** | The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method.
   244  **WebhooksOnChannelAddedMethod** | **string** | The URL of the webhook to call in response to the `on_channel_added` event`.
   245  **WebhooksOnChannelDestroyedUrl** | **string** | The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method.
   246  **WebhooksOnChannelDestroyedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`.
   247  **WebhooksOnChannelUpdatedUrl** | **string** | The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.
   248  **WebhooksOnChannelUpdatedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_updated.url`.
   249  **WebhooksOnMemberAddedUrl** | **string** | The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.
   250  **WebhooksOnMemberAddedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_updated.url`.
   251  **WebhooksOnMemberRemovedUrl** | **string** | The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method.
   252  **WebhooksOnMemberRemovedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_member_removed.url`.
   253  **LimitsChannelMembers** | **int** | The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.
   254  **LimitsUserChannels** | **int** | The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.
   255  
   256  ### Return type
   257  
   258  [**ChatV1Service**](ChatV1Service.md)
   259  
   260  ### Authorization
   261  
   262  [accountSid_authToken](../README.md#accountSid_authToken)
   263  
   264  ### HTTP request headers
   265  
   266  - **Content-Type**: application/x-www-form-urlencoded
   267  - **Accept**: application/json
   268  
   269  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   270  [[Back to Model list]](../README.md#documentation-for-models)
   271  [[Back to README]](../README.md)
   272