Update an existing message in the conversation
A Service Message resource represents a message in a conversation within a specific service.
Update an existing message in the conversation
Path parameters
-
The SID of the Conversation Service the Participant resource is associated with.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IS[0-9a-fA-F]{32}$
. -
The unique ID of the Conversation for this message.
-
A 34 character string that uniquely identifies this resource.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IM[0-9a-fA-F]{32}$
.
Body
-
The content of the message, can be up to 1,600 characters long.
-
The date that this resource was created.
-
The date that this resource was last updated.
null
if the message has not been edited. -
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.
-
The subject of the message, can be up to 256 characters long.
curl \
--request POST 'https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "X-Twilio-Webhook-Enabled: true" \
--data 'Body=Hello&Author=message+author&Attributes=%7B+%22importance%22%3A+%22high%22+%7D&DateCreated=2015-12-16T22%3A18%3A37Z&DateUpdated=2015-12-16T22%3A18%3A38Z'
{"Body"=>"Hello", "Author"=>"message author", "Attributes"=>"{ \"importance\": \"high\" }", "DateCreated"=>"2015-12-16T22:18:37Z", "DateUpdated"=>"2015-12-16T22:18:38Z"}
{
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"body": "Hello",
"index": 0,
"links": {
"channel_metadata": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelMetadata",
"delivery_receipts": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts"
},
"media": null,
"author": "message author",
"delivery": {
"read": "some",
"sent": "all",
"total": 2,
"failed": "none",
"delivered": "some",
"undelivered": "none"
},
"attributes": "{ \"importance\": \"high\" }",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"content_sid": null,
"date_created": "2015-12-16T22:18:37Z",
"date_updated": "2015-12-16T22:18:38Z",
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}