github.com/twilio/twilio-go@v1.20.1/rest/conversations/v1/docs/ServicesConversationsMessagesApi.md (about) 1 # ServicesConversationsMessagesApi 2 3 All URIs are relative to *https://conversations.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateServiceConversationMessage**](ServicesConversationsMessagesApi.md#CreateServiceConversationMessage) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages | 8 [**DeleteServiceConversationMessage**](ServicesConversationsMessagesApi.md#DeleteServiceConversationMessage) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid} | 9 [**FetchServiceConversationMessage**](ServicesConversationsMessagesApi.md#FetchServiceConversationMessage) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid} | 10 [**ListServiceConversationMessage**](ServicesConversationsMessagesApi.md#ListServiceConversationMessage) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages | 11 [**UpdateServiceConversationMessage**](ServicesConversationsMessagesApi.md#UpdateServiceConversationMessage) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid} | 12 13 14 15 ## CreateServiceConversationMessage 16 17 > ConversationsV1ServiceConversationMessage CreateServiceConversationMessage(ctx, ChatServiceSidConversationSidoptional) 18 19 20 21 Add a new message to the conversation in a specific 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 Participant resource is associated with. 30 **ConversationSid** | **string** | The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. 31 32 ### Other Parameters 33 34 Other parameters are passed through a pointer to a CreateServiceConversationMessageParams struct 35 36 37 Name | Type | Description 38 ------------- | ------------- | ------------- 39 **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header 40 **Author** | **string** | The channel specific identifier of the message's author. Defaults to `system`. 41 **Body** | **string** | The content of the message, can be up to 1,600 characters long. 42 **DateCreated** | **time.Time** | The date that this resource was created. 43 **DateUpdated** | **time.Time** | The date that this resource was last updated. `null` if the message has not been edited. 44 **Attributes** | **string** | A 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. 45 **MediaSid** | **string** | The Media SID to be attached to the new Message. 46 **ContentSid** | **string** | The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. 47 **ContentVariables** | **string** | A structurally valid JSON string that contains values to resolve Rich Content template variables. 48 **Subject** | **string** | The subject of the message, can be up to 256 characters long. 49 50 ### Return type 51 52 [**ConversationsV1ServiceConversationMessage**](ConversationsV1ServiceConversationMessage.md) 53 54 ### Authorization 55 56 [accountSid_authToken](../README.md#accountSid_authToken) 57 58 ### HTTP request headers 59 60 - **Content-Type**: application/x-www-form-urlencoded 61 - **Accept**: application/json 62 63 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 64 [[Back to Model list]](../README.md#documentation-for-models) 65 [[Back to README]](../README.md) 66 67 68 ## DeleteServiceConversationMessage 69 70 > DeleteServiceConversationMessage(ctx, ChatServiceSidConversationSidSidoptional) 71 72 73 74 Remove a message from the conversation 75 76 ### Path Parameters 77 78 79 Name | Type | Description 80 ------------- | ------------- | ------------- 81 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 82 **ChatServiceSid** | **string** | The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. 83 **ConversationSid** | **string** | The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. 84 **Sid** | **string** | A 34 character string that uniquely identifies this resource. 85 86 ### Other Parameters 87 88 Other parameters are passed through a pointer to a DeleteServiceConversationMessageParams 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 ## FetchServiceConversationMessage 114 115 > ConversationsV1ServiceConversationMessage FetchServiceConversationMessage(ctx, ChatServiceSidConversationSidSid) 116 117 118 119 Fetch a message from the conversation 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 Participant resource is associated with. 128 **ConversationSid** | **string** | The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. 129 **Sid** | **string** | A 34 character string that uniquely identifies this resource. 130 131 ### Other Parameters 132 133 Other parameters are passed through a pointer to a FetchServiceConversationMessageParams struct 134 135 136 Name | Type | Description 137 ------------- | ------------- | ------------- 138 139 ### Return type 140 141 [**ConversationsV1ServiceConversationMessage**](ConversationsV1ServiceConversationMessage.md) 142 143 ### Authorization 144 145 [accountSid_authToken](../README.md#accountSid_authToken) 146 147 ### HTTP request headers 148 149 - **Content-Type**: Not defined 150 - **Accept**: application/json 151 152 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 153 [[Back to Model list]](../README.md#documentation-for-models) 154 [[Back to README]](../README.md) 155 156 157 ## ListServiceConversationMessage 158 159 > []ConversationsV1ServiceConversationMessage ListServiceConversationMessage(ctx, ChatServiceSidConversationSidoptional) 160 161 162 163 Retrieve a list of all messages in the conversation 164 165 ### Path Parameters 166 167 168 Name | Type | Description 169 ------------- | ------------- | ------------- 170 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 171 **ChatServiceSid** | **string** | The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. 172 **ConversationSid** | **string** | The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for messages. 173 174 ### Other Parameters 175 176 Other parameters are passed through a pointer to a ListServiceConversationMessageParams struct 177 178 179 Name | Type | Description 180 ------------- | ------------- | ------------- 181 **Order** | **string** | The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending), with `asc` as the default. 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 [**[]ConversationsV1ServiceConversationMessage**](ConversationsV1ServiceConversationMessage.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 ## UpdateServiceConversationMessage 204 205 > ConversationsV1ServiceConversationMessage UpdateServiceConversationMessage(ctx, ChatServiceSidConversationSidSidoptional) 206 207 208 209 Update an existing message in the conversation 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 Participant resource is associated with. 218 **ConversationSid** | **string** | The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. 219 **Sid** | **string** | A 34 character string that uniquely identifies this resource. 220 221 ### Other Parameters 222 223 Other parameters are passed through a pointer to a UpdateServiceConversationMessageParams struct 224 225 226 Name | Type | Description 227 ------------- | ------------- | ------------- 228 **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header 229 **Author** | **string** | The channel specific identifier of the message's author. Defaults to `system`. 230 **Body** | **string** | The content of the message, can be up to 1,600 characters long. 231 **DateCreated** | **time.Time** | The date that this resource was created. 232 **DateUpdated** | **time.Time** | The date that this resource was last updated. `null` if the message has not been edited. 233 **Attributes** | **string** | A 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. 234 **Subject** | **string** | The subject of the message, can be up to 256 characters long. 235 236 ### Return type 237 238 [**ConversationsV1ServiceConversationMessage**](ConversationsV1ServiceConversationMessage.md) 239 240 ### Authorization 241 242 [accountSid_authToken](../README.md#accountSid_authToken) 243 244 ### HTTP request headers 245 246 - **Content-Type**: application/x-www-form-urlencoded 247 - **Accept**: application/json 248 249 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 250 [[Back to Model list]](../README.md#documentation-for-models) 251 [[Back to README]](../README.md) 252