メニュー

Expand
ページを評価:

Conversation Message Resource

APIのベースURL

リファレンスドキュメントの URL はすべて、次のベース URL を使用しています。

https://conversations.twilio.com/v1

Using the shortened base URL

Using the REST API, you can interact with Conversation Message resources in the default Conversation Service instance via a "shortened" URL that does not include the Conversation Service instance SID ("ISXXX..."). If you are only using one Conversation Service (the default), you do not need to include the Conversation Service SID in your URL, e.g.

GET /v1/Conversations/CHxx/Messages

For Conversations applications that build on more than one Conversation Service instance, you will need to specify the Conversation Service SID in the REST API call:

GET /v1/Services/ISxx/Conversations/CHxx/Messages

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

このリソースを一意に識別する 34 文字の文字列です。

index
integer Not PII

The index of the message within the Conversation. Indices may skip numbers, but will always be in order of when the message was received.

author
文字列 PII MTL: 30 DAYS

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

body
文字列 PII MTL: 30 DAYS

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

media
object[] PII MTL: 30 DAYS

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
文字列 PII MTL: 30 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.

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

このリソースの作成された日付です。

date_updated
date_time<iso8601> Not PII

このリソースが最後に更新された日付です。 編集されていない場合はnullを返します。

url
url Not PII

An absolute API resource API URL for this message.

delivery
オブジェクト Not PII

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

links
uri_map Not PII

Contains an absolute API resource URL to access the delivery & read receipts of this message.

Create a ConversationMessage resource

post
https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages
パラメーター
Parameters in REST API format
conversation_sid
Path
post sid_like<CH> Not PII

The unique ID of the Conversation for this message.

author
オプション
post 文字列 PII MTL: 30 DAYS

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

body
オプション
post 文字列 PII MTL: 30 DAYS

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

date_created
オプション
post date_time<iso8601> Not PII

このリソースの作成された日付です。

date_updated
オプション
post date_time<iso8601> Not PII

このリソースが最後に更新された日付です。 編集されていない場合はnullを返します。

attributes
オプション
post 文字列 PII MTL: 30 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
オプション
post sid<ME> Not PII

The Media SID to be attached to the new Message.

x_twilio_webhook_enabled
ヘッダー
post ienum:webhook_enabled_type Not PII

The X-Twilio-Webhook-Enabled HTTP request header

例 1
        
        
        

        Fetch a ConversationMessage resource

        GET
        https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{Sid}
        パラメーター
        Parameters in REST API format
        conversation_sid
        Path
        GET sid_like<CH> Not PII

        The unique ID of the Conversation for this message.

        sid
        Path
        GET sid<IM> Not PII

        このリソースを一意に識別する 34 文字の文字列です。

        例 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 in REST API format
              conversation_sid
              Path
              GET sid_like<CH> Not PII

              The unique ID of the Conversation for messages.

              order
              オプション
              GET ienum:order_type Not PII

              The sort order of the returned messages. Can be: asc (ascending) or desc (descending), with asc as the default.

              例 1
                    
                    
                    
                    List all messages in a Conversation

                    List all Conversation Messages

                    List all messages in a Conversation
                    例 2
                          
                          
                          

                          Update a ConversationMessage resource

                          post
                          https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{Sid}
                          パラメーター
                          Parameters in REST API format
                          conversation_sid
                          Path
                          post sid_like<CH> Not PII

                          The unique ID of the Conversation for this message.

                          sid
                          Path
                          post sid<IM> Not PII

                          このリソースを一意に識別する 34 文字の文字列です。

                          author
                          オプション
                          post 文字列 PII MTL: 30 DAYS

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

                          body
                          オプション
                          post 文字列 PII MTL: 30 DAYS

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

                          date_created
                          オプション
                          post date_time<iso8601> Not PII

                          このリソースの作成された日付です。

                          date_updated
                          オプション
                          post date_time<iso8601> Not PII

                          このリソースが最後に更新された日付です。 編集されていない場合はnullを返します。

                          attributes
                          オプション
                          post 文字列 PII MTL: 30 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.

                          x_twilio_webhook_enabled
                          ヘッダー
                          post ienum:webhook_enabled_type Not PII

                          The X-Twilio-Webhook-Enabled HTTP request header

                          例 1
                                
                                
                                

                                Delete a ConversationMessage resource

                                削除する
                                https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{Sid}
                                パラメーター
                                Parameters in REST API format
                                conversation_sid
                                Path
                                削除する sid_like<CH> Not PII

                                The unique ID of the Conversation for this message.

                                sid
                                Path
                                削除する sid<IM> Not PII

                                このリソースを一意に識別する 34 文字の文字列です。

                                x_twilio_webhook_enabled
                                ヘッダー
                                削除する ienum:webhook_enabled_type Not PII

                                The X-Twilio-Webhook-Enabled HTTP request header

                                例 1
                                      
                                      
                                      
                                      ページを評価:

                                      ヘルプが必要ですか?

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

                                            
                                            
                                            

                                            フィードバックくださりありがとうございます!

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

                                            Sending your feedback...
                                            🎉 Thank you for your feedback!
                                            Something went wrong. Please try again.

                                            Thanks for your feedback!

                                            Refer us and get $10 in 3 simple steps!

                                            ステップ1

                                            Get link

                                            Get a free personal referral link here

                                            ステップ2:

                                            Give $10

                                            Your user signs up and upgrade using link

                                            ステップ3

                                            Get $10

                                            1,250 free SMSes
                                            OR 1,000 free voice mins
                                            OR 12,000 chats
                                            OR more