メニュー

Expand
ページを評価:

Service-Scoped Conversation-Scoped Webhook Resource

Service-Scoped Conversation-Scoped Webhooks provide a way to attach a unique monitor, bot, or other integration to each service-scoped Conversation within a non-default Conversation Service.

Each individual service-scoped Conversation can have as many as five such webhooks, as needed for your use case.

Please see the API Reference for the Conversation-Scoped Webhook resource for creating and managing Conversation-Scoped Webhooks within the default Conversation Service.

APIのベースURL

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

https://conversations.twilio.com/v1

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

Service-Scoped Conversation-Scoped Webhook Properties

Resource Properties in REST API format
sid
sid<WH> Not PII

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

account_sid
sid<AC> Not PII

The unique ID of the Account responsible for this conversation.

chat_service_sid
sid<IS> Not PII

The SID of the Conversation Service the Participant resource is associated with.

conversation_sid
sid<CH> Not PII

The unique ID of the Conversation for this webhook.

target
文字列 Not PII

The target of this webhook: webhook, studio, trigger

url
url Not PII

An absolute API resource URL for this webhook.

configuration
オブジェクト Not PII

The configuration of this webhook. Is defined based on target.

date_created
date_time<iso8601> Not PII

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

date_updated
date_time<iso8601> Not PII

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

Create a Service-Scoped Conversation-Scoped Webhook resource

post
https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks
パラメーター
Parameters in REST API format
chat_service_sid
Path
post sid<IS> Not PII

The SID of the Conversation Service the Participant resource is associated with.

conversation_sid
Path
post sid_like<CH> Not PII

The unique ID of the Conversation for this webhook.

target
必須
post ienum:target Not PII

The target of this webhook: webhook, studio, trigger

configuration.url
オプション
post 文字列 Not PII

The absolute url the webhook request should be sent to.

configuration.method
オプション
post ienum:method Not PII

The HTTP method to be used when sending a webhook request.

configuration.filters
オプション
post string[] Not PII

The list of events, firing webhook event for this Conversation.

configuration.triggers
オプション
post string[] Not PII

The list of keywords, firing webhook event for this Conversation.

configuration.flow_sid
オプション
post sid<FW> Not PII

The studio flow SID, where the webhook should be sent to.

configuration.replay_after
オプション
post integer Not PII

The message index for which and it's successors the webhook will be replayed. Not set by default

例 1
        
        
        

        Fetch a Service-Scoped Conversation-Scoped Webhook resource

        GET
        https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}
        パラメーター
        Parameters in REST API format
        chat_service_sid
        Path
        GET sid<IS> Not PII

        The SID of the Conversation Service the Participant resource is associated with.

        conversation_sid
        Path
        GET sid_like<CH> Not PII

        The unique ID of the Conversation for this webhook.

        sid
        Path
        GET sid<WH> Not PII

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

        例 1
              
              
              

              Read multiple Service-Scoped Conversation-Scoped Webhook resources

              GET
              https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks
              パラメーター
              Parameters in REST API format
              chat_service_sid
              Path
              GET sid<IS> Not PII

              The SID of the Conversation Service the Participant resource is associated with.

              conversation_sid
              Path
              GET sid_like<CH> Not PII

              The unique ID of the Conversation for this webhook.

              例 1
                    
                    
                    

                    Update a Service-Scoped Conversation-Scoped Webhook resources

                    post
                    https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}
                    パラメーター
                    Parameters in REST API format
                    chat_service_sid
                    Path
                    post sid<IS> Not PII

                    The SID of the Conversation Service the Participant resource is associated with.

                    conversation_sid
                    Path
                    post sid_like<CH> Not PII

                    The unique ID of the Conversation for this webhook.

                    sid
                    Path
                    post sid<WH> Not PII

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

                    configuration.url
                    オプション
                    post 文字列 Not PII

                    The absolute url the webhook request should be sent to.

                    configuration.method
                    オプション
                    post ienum:method Not PII

                    The HTTP method to be used when sending a webhook request.

                    configuration.filters
                    オプション
                    post string[] Not PII

                    The list of events, firing webhook event for this Conversation.

                    configuration.triggers
                    オプション
                    post string[] Not PII

                    The list of keywords, firing webhook event for this Conversation.

                    configuration.flow_sid
                    オプション
                    post sid<FW> Not PII

                    The studio flow SID, where the webhook should be sent to.

                    例 1
                          
                          
                          

                          Delete a Service-Scoped, Conversation-Scoped Webhook resource

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

                          The SID of the Conversation Service the Participant resource is associated with.

                          conversation_sid
                          Path
                          削除する sid_like<CH> Not PII

                          The unique ID of the Conversation for this webhook.

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

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

                          例 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