github.com/twilio/twilio-go@v1.20.1/rest/conversations/v1/docs/ServicesConversationsApi.md (about)

     1  # ServicesConversationsApi
     2  
     3  All URIs are relative to *https://conversations.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateServiceConversation**](ServicesConversationsApi.md#CreateServiceConversation) | **Post** /v1/Services/{ChatServiceSid}/Conversations | 
     8  [**DeleteServiceConversation**](ServicesConversationsApi.md#DeleteServiceConversation) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{Sid} | 
     9  [**FetchServiceConversation**](ServicesConversationsApi.md#FetchServiceConversation) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{Sid} | 
    10  [**ListServiceConversation**](ServicesConversationsApi.md#ListServiceConversation) | **Get** /v1/Services/{ChatServiceSid}/Conversations | 
    11  [**UpdateServiceConversation**](ServicesConversationsApi.md#UpdateServiceConversation) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{Sid} | 
    12  
    13  
    14  
    15  ## CreateServiceConversation
    16  
    17  > ConversationsV1ServiceConversation CreateServiceConversation(ctx, ChatServiceSidoptional)
    18  
    19  
    20  
    21  Create a new conversation in your service
    22  
    23  ### Path Parameters
    24  
    25  
    26  Name | Type | Description
    27  ------------- | ------------- | -------------
    28  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    29  **ChatServiceSid** | **string** | The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with.
    30  
    31  ### Other Parameters
    32  
    33  Other parameters are passed through a pointer to a CreateServiceConversationParams struct
    34  
    35  
    36  Name | Type | Description
    37  ------------- | ------------- | -------------
    38  **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header
    39  **FriendlyName** | **string** | The human-readable name of this conversation, limited to 256 characters. Optional.
    40  **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.
    41  **Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified.  **Note** that if the attributes are not set \\\"{}\\\" will be returned.
    42  **MessagingServiceSid** | **string** | The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
    43  **DateCreated** | **time.Time** | The date that this resource was created.
    44  **DateUpdated** | **time.Time** | The date that this resource was last updated.
    45  **State** | **string** | 
    46  **TimersInactive** | **string** | ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute.
    47  **TimersClosed** | **string** | ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes.
    48  **BindingsEmailAddress** | **string** | The default email address that will be used when sending outbound emails in this conversation.
    49  **BindingsEmailName** | **string** | The default name that will be used when sending outbound emails in this conversation.
    50  
    51  ### Return type
    52  
    53  [**ConversationsV1ServiceConversation**](ConversationsV1ServiceConversation.md)
    54  
    55  ### Authorization
    56  
    57  [accountSid_authToken](../README.md#accountSid_authToken)
    58  
    59  ### HTTP request headers
    60  
    61  - **Content-Type**: application/x-www-form-urlencoded
    62  - **Accept**: application/json
    63  
    64  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    65  [[Back to Model list]](../README.md#documentation-for-models)
    66  [[Back to README]](../README.md)
    67  
    68  
    69  ## DeleteServiceConversation
    70  
    71  > DeleteServiceConversation(ctx, ChatServiceSidSidoptional)
    72  
    73  
    74  
    75  Remove a conversation from your service
    76  
    77  ### Path Parameters
    78  
    79  
    80  Name | Type | Description
    81  ------------- | ------------- | -------------
    82  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    83  **ChatServiceSid** | **string** | The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with.
    84  **Sid** | **string** | A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation.
    85  
    86  ### Other Parameters
    87  
    88  Other parameters are passed through a pointer to a DeleteServiceConversationParams struct
    89  
    90  
    91  Name | Type | Description
    92  ------------- | ------------- | -------------
    93  **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header
    94  
    95  ### Return type
    96  
    97   (empty response body)
    98  
    99  ### Authorization
   100  
   101  [accountSid_authToken](../README.md#accountSid_authToken)
   102  
   103  ### HTTP request headers
   104  
   105  - **Content-Type**: Not defined
   106  - **Accept**: Not defined
   107  
   108  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   109  [[Back to Model list]](../README.md#documentation-for-models)
   110  [[Back to README]](../README.md)
   111  
   112  
   113  ## FetchServiceConversation
   114  
   115  > ConversationsV1ServiceConversation FetchServiceConversation(ctx, ChatServiceSidSid)
   116  
   117  
   118  
   119  Fetch a conversation from your service
   120  
   121  ### Path Parameters
   122  
   123  
   124  Name | Type | Description
   125  ------------- | ------------- | -------------
   126  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   127  **ChatServiceSid** | **string** | The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with.
   128  **Sid** | **string** | A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation.
   129  
   130  ### Other Parameters
   131  
   132  Other parameters are passed through a pointer to a FetchServiceConversationParams struct
   133  
   134  
   135  Name | Type | Description
   136  ------------- | ------------- | -------------
   137  
   138  ### Return type
   139  
   140  [**ConversationsV1ServiceConversation**](ConversationsV1ServiceConversation.md)
   141  
   142  ### Authorization
   143  
   144  [accountSid_authToken](../README.md#accountSid_authToken)
   145  
   146  ### HTTP request headers
   147  
   148  - **Content-Type**: Not defined
   149  - **Accept**: application/json
   150  
   151  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   152  [[Back to Model list]](../README.md#documentation-for-models)
   153  [[Back to README]](../README.md)
   154  
   155  
   156  ## ListServiceConversation
   157  
   158  > []ConversationsV1ServiceConversation ListServiceConversation(ctx, ChatServiceSidoptional)
   159  
   160  
   161  
   162  Retrieve a list of conversations in your service
   163  
   164  ### Path Parameters
   165  
   166  
   167  Name | Type | Description
   168  ------------- | ------------- | -------------
   169  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   170  **ChatServiceSid** | **string** | The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with.
   171  
   172  ### Other Parameters
   173  
   174  Other parameters are passed through a pointer to a ListServiceConversationParams struct
   175  
   176  
   177  Name | Type | Description
   178  ------------- | ------------- | -------------
   179  **StartDate** | **string** | Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
   180  **EndDate** | **string** | Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results.  The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
   181  **State** | **string** | State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
   182  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   183  **Limit** | **int** | Max number of records to return.
   184  
   185  ### Return type
   186  
   187  [**[]ConversationsV1ServiceConversation**](ConversationsV1ServiceConversation.md)
   188  
   189  ### Authorization
   190  
   191  [accountSid_authToken](../README.md#accountSid_authToken)
   192  
   193  ### HTTP request headers
   194  
   195  - **Content-Type**: Not defined
   196  - **Accept**: application/json
   197  
   198  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   199  [[Back to Model list]](../README.md#documentation-for-models)
   200  [[Back to README]](../README.md)
   201  
   202  
   203  ## UpdateServiceConversation
   204  
   205  > ConversationsV1ServiceConversation UpdateServiceConversation(ctx, ChatServiceSidSidoptional)
   206  
   207  
   208  
   209  Update an existing conversation in your service
   210  
   211  ### Path Parameters
   212  
   213  
   214  Name | Type | Description
   215  ------------- | ------------- | -------------
   216  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   217  **ChatServiceSid** | **string** | The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with.
   218  **Sid** | **string** | A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation.
   219  
   220  ### Other Parameters
   221  
   222  Other parameters are passed through a pointer to a UpdateServiceConversationParams struct
   223  
   224  
   225  Name | Type | Description
   226  ------------- | ------------- | -------------
   227  **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header
   228  **FriendlyName** | **string** | The human-readable name of this conversation, limited to 256 characters. Optional.
   229  **DateCreated** | **time.Time** | The date that this resource was created.
   230  **DateUpdated** | **time.Time** | The date that this resource was last updated.
   231  **Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified.  **Note** that if the attributes are not set \\\"{}\\\" will be returned.
   232  **MessagingServiceSid** | **string** | The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
   233  **State** | **string** | 
   234  **TimersInactive** | **string** | ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute.
   235  **TimersClosed** | **string** | ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes.
   236  **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.
   237  **BindingsEmailAddress** | **string** | The default email address that will be used when sending outbound emails in this conversation.
   238  **BindingsEmailName** | **string** | The default name that will be used when sending outbound emails in this conversation.
   239  
   240  ### Return type
   241  
   242  [**ConversationsV1ServiceConversation**](ConversationsV1ServiceConversation.md)
   243  
   244  ### Authorization
   245  
   246  [accountSid_authToken](../README.md#accountSid_authToken)
   247  
   248  ### HTTP request headers
   249  
   250  - **Content-Type**: application/x-www-form-urlencoded
   251  - **Accept**: application/json
   252  
   253  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   254  [[Back to Model list]](../README.md#documentation-for-models)
   255  [[Back to README]](../README.md)
   256