メニュー

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 Resource

A Conversation is a unique thread of a conversation.

Each Conversation includes a list of current Participants and the Messages that they have sent amongst each other.

APIのベースURL

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

https://conversations.twilio.com/v1

Conversation properties

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

The unique ID of the Account responsible for this conversation.

chat_service_sid
sid<IS> Not PII

The unique ID of the Conversation Service this conversation belongs to.

messaging_service_sid
sid<MG> Not PII

The unique ID of the Messaging Service this conversation belongs to.

sid
sid<CH> Not PII

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

friendly_name
文字列 PII MTL: 120 DAYS

The human-readable name of this conversation, limited to 256 characters. Optional.

unique_name
文字列 PII MTL: 120 DAYS

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.

attributes
文字列 PII MTL: 120 DAYS

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.

state
enum:state Not PII

Current state of this conversation. Can be either active, inactive or closed and defaults to active

date_created
date_time<iso8601> Not PII

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

date_updated
date_time<iso8601> Not PII

このリソースが最後に更新された日付です。

timers
オブジェクト Not PII

Timer date values representing state update for this conversation.

url
url Not PII

An absolute API resource URL for this conversation.

links
uri_map Not PII

Contains absolute URLs to access the participants, messages and webhooks of this conversation.

Create a Conversation resource

post
https://conversations.twilio.com/v1/Conversations
パラメーター
Parameters in REST API format
friendly_name
オプション
post 文字列 PII MTL: 120 DAYS

The human-readable name of this conversation, limited to 256 characters. Optional.

unique_name
オプション
post 文字列 PII MTL: 120 DAYS

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.

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

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

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

このリソースが最後に更新された日付です。

messaging_service_sid
オプション
post sid<MG> Not PII

The unique ID of the Messaging Service this conversation belongs to.

attributes
オプション
post 文字列 PII MTL: 120 DAYS

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.

state
オプション
post ienum:state Not PII

Current state of this conversation. Can be either active, inactive or closed and defaults to active

timers.inactive
オプション
post 文字列 Not PII

ISO8601 duration when conversation will be switched to inactive state. Minimum value for this timer is 1 minute.

timers.closed
オプション
post 文字列 Not PII

ISO8601 duration when conversation will be switched to closed state. Minimum value for this timer is 10 minutes.

x_twilio_webhook_enabled
ヘッダー
post ienum:webhook_enabled_type Not PII

The X-Twilio-Webhook-Enabled HTTP request header

例 1
        
        
        
        

        Fetch a Conversation resource

        GET
        https://conversations.twilio.com/v1/Conversations/{Sid}

        You can fetch a Conversation by providing your account credentials and the conversation SID (provided when the Conversation is created).

        The most valuable part of the Conversation resource itself is the attributes key, which includes metadata attached to the conversation from the moment of its creation.

        The other relevant parts of a Conversation include its Participants (the entities who are currently conversing) and the Messages they've sent. Both of these are linked directly from the top-level url key.

        パラメーター
        Parameters in REST API format
        sid
        Path
        GET sid_like<CH> Not PII

        A 34 character string that uniquely identifies this resource. Can also be the unique_name of the Conversation.

        例 1
              
              
              
              
              Fetch Conversation by SID

              Fetch Conversation

              Fetch Conversation by SID

              Read multiple Conversation resources

              GET
              https://conversations.twilio.com/v1/Conversations
              例 1
                    
                    
                    
                    

                    Update Conversation

                    post
                    https://conversations.twilio.com/v1/Conversations/{Sid}

                    The core definition of any Conversation can be modified on the fly. Update a Conversation to attach metadata that you extract on the fly (e.g. "customer-loyalty-status": "gold", or "aml-risk-level": "heightened"), or to correct mistakes manually.

                    パラメーター
                    Parameters in REST API format
                    sid
                    Path
                    post sid_like<CH> Not PII

                    A 34 character string that uniquely identifies this resource. Can also be the unique_name of the Conversation.

                    friendly_name
                    オプション
                    post 文字列 PII MTL: 120 DAYS

                    The human-readable name of this conversation, limited to 256 characters. Optional.

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

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

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

                    このリソースが最後に更新された日付です。

                    attributes
                    オプション
                    post 文字列 PII MTL: 120 DAYS

                    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.

                    messaging_service_sid
                    オプション
                    post sid<MG> Not PII

                    The unique ID of the Messaging Service this conversation belongs to.

                    state
                    オプション
                    post ienum:state Not PII

                    Current state of this conversation. Can be either active, inactive or closed and defaults to active

                    timers.inactive
                    オプション
                    post 文字列 Not PII

                    ISO8601 duration when conversation will be switched to inactive state. Minimum value for this timer is 1 minute.

                    timers.closed
                    オプション
                    post 文字列 Not PII

                    ISO8601 duration when conversation will be switched to closed state. Minimum value for this timer is 10 minutes.

                    x_twilio_webhook_enabled
                    ヘッダー
                    post ienum:webhook_enabled_type Not PII

                    The X-Twilio-Webhook-Enabled HTTP request header

                    例 1
                          
                          
                          
                          
                          Update a Conversation's property

                          Update Conversation

                          Update a Conversation's property

                          Delete a Conversation resource

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

                          A 34 character string that uniquely identifies this resource. Can also be the unique_name of the Conversation.

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

                          The X-Twilio-Webhook-Enabled HTTP request header

                          例 1
                                
                                
                                
                                
                                Rate this page:

                                ヘルプが必要ですか?

                                誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。