Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Conversation Message Resource

ConversationMessage properties

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The unique id of the Account responsible for this message.

conversation_sid
sid<CH> Not PII

The unique id of the Conversation for this message.

sid
sid<IM> Not PII

A 34 character string that uniquely identifies this resource.

index
integer Not PII

The index of the message within the Conversation.

author

The channel specific identifier of the message's author. Defaults to system.

body

The content of the message, can be up to 1,600 characters long.

media
object[] Not PII

An array of objects that describe the Message's media, if the message contains media. Each object contains these fields: content_type with the MIME type of the media, filename with the name of the media, sid with the SID of the Media resource, and size with the media object's file size in bytes. If the Message has no media, this value is null.

attributes

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.

participant_sid
sid<MB> Not PII

The unique id of messages's author participant. Null in case of system sent message.

date_created
date_time<iso8601> Not PII

The date that this resource was created.

date_updated
date_time<iso8601> Not PII

The date that this resource was last updated. null if the message has not been edited.

url
url Not PII

An absolute URL for this message.

delivery
object Not PII

An object that contains the summary of delivery statuses for the message to non-chat participants.

links
uri_map Not PII

Create a ConversationMessage resource

post
https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages
Parameters
Parameters in REST API format
conversation_sid
Path
post sid<CH> Not PII

The unique id of the Conversation for this message.

author
Optional
post string PII MTL: 120 DAYS

The channel specific identifier of the message's author. Defaults to system.

body
Optional
post string PII MTL: 120 DAYS

The content of the message, can be up to 1,600 characters long.

date_created
Optional
post date_time<iso8601> Not PII

The date that this resource was created.

date_updated
Optional
post date_time<iso8601> Not PII

The date that this resource was last updated. null if the message has not been edited.

attributes
Optional
post string PII MTL: 120 DAYS

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.

media_sid
Optional
post sid<ME> Not PII

The Media Sid to be attached to the new Message.

Example 1
        
        
        
        

        Fetch a ConversationMessage resource

        get
        https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{Sid}
        Parameters
        Parameters in REST API format
        conversation_sid
        Path
        get sid<CH> Not PII

        The unique id of the Conversation for this message.

        sid
        Path
        get sid<IM> Not PII

        A 34 character string that uniquely identifies this resource.

        Example 1
              
              
              
              
              Fetch a Conversation Message by SID

              Fetch a Conversation Message

              Fetch a Conversation Message by SID

              List all Conversation Message(s)

              get
              https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages
              Parameters
              Parameters in REST API format
              conversation_sid
              Path
              get sid<CH> Not PII

              The unique id of the Conversation for messages.

              Example 1
                    
                    
                    
                    
                    List all messages in a Conversation

                    List all Conversation Messages

                    List all messages in a Conversation

                    Update a ConversationMessage resource

                    post
                    https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{Sid}
                    Parameters
                    Parameters in REST API format
                    conversation_sid
                    Path
                    post sid<CH> Not PII

                    The unique id of the Conversation for this message.

                    sid
                    Path
                    post sid<IM> Not PII

                    A 34 character string that uniquely identifies this resource.

                    author
                    Optional
                    post string PII MTL: 120 DAYS

                    The channel specific identifier of the message's author. Defaults to system.

                    body
                    Optional
                    post string PII MTL: 120 DAYS

                    The content of the message, can be up to 1,600 characters long.

                    date_created
                    Optional
                    post date_time<iso8601> Not PII

                    The date that this resource was created.

                    date_updated
                    Optional
                    post date_time<iso8601> Not PII

                    The date that this resource was last updated. null if the message has not been edited.

                    attributes
                    Optional
                    post string PII MTL: 120 DAYS

                    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.

                    Example 1
                          
                          
                          
                          

                          Delete a ConversationMessage resource

                          delete
                          https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{Sid}
                          Parameters
                          Parameters in REST API format
                          conversation_sid
                          Path
                          delete sid<CH> Not PII

                          The unique id of the Conversation for this message.

                          sid
                          Path
                          delete sid<IM> Not PII

                          A 34 character string that uniquely identifies this resource.

                          Example 1
                                
                                
                                
                                
                                Rate this page:

                                Need some help?

                                We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.