Conversation Scoped Webhook Resource
Conversation Scoped Webhooks provide a way to attach a unique monitor, bot, or other integration to each conversation.
Each individual Conversation can have as many as five such webhooks, as needed for your use case. This is your go-to tool for adding integrations with third-party bots or Twilio Studio.
For bot integrations, in particular, pay specific attention to the ReplayAfter
parameter to ensure that you don't miss any messages that arrive while you're configuring the integration.
Only post-event webhooks are supported by the Conversation-Scoped Webhooks.
APIのベースURL
リファレンスドキュメントの URL はすべて、次のベース URL を使用しています。
https://conversations.twilio.com/v1
Using the shortened base URL
Using the REST API, you can interact with Conversation Scoped Webhook 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/CHxxx/Webhooks
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/Webhooks
ConversationScopedWebhook properties
Resource Properties in REST API format | |
---|---|
sid
|
このリソースを一意に識別する 34 文字の文字列です。 |
account_sid
|
The unique ID of the Account responsible for this conversation. |
conversation_sid
|
The unique ID of the Conversation for this webhook. |
target
|
The target of this webhook: |
url
|
An absolute API resource URL for this webhook. |
configuration
|
The configuration of this webhook. Is defined based on target. |
date_created
|
このリソースの作成された日付です。 |
date_updated
|
このリソースが最後に更新された日付です。 |
Create a ConversationScopedWebhook resource
https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks
パラメーター
Parameters in REST API format | |
---|---|
conversation_sid
Path
|
The unique ID of the Conversation for this webhook. |
target
必須
|
The target of this webhook: |
configuration.url
オプション
|
The absolute url the webhook request should be sent to. |
configuration.method
オプション
|
The HTTP method to be used when sending a webhook request. |
configuration.filters
オプション
|
The list of events, firing webhook event for this Conversation. |
configuration.triggers
オプション
|
The list of keywords, firing webhook event for this Conversation. |
configuration.flow_sid
オプション
|
The studio flow SID, where the webhook should be sent to. |
configuration.replay_after
オプション
|
The message index for which and it's successors the webhook will be replayed. Not set by default |
例 1
Fetch a ConversationScopedWebhook resource
https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
conversation_sid
Path
|
The unique ID of the Conversation for this webhook. |
sid
Path
|
このリソースを一意に識別する 34 文字の文字列です。 |
例 1
Read multiple ConversationScopedWebhook resources
https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks
パラメーター
Parameters in REST API format | |
---|---|
conversation_sid
Path
|
The unique ID of the Conversation for this webhook. |
例 1
Update a ConversationScopedWebhook resource
https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
conversation_sid
Path
|
The unique ID of the Conversation for this webhook. |
sid
Path
|
このリソースを一意に識別する 34 文字の文字列です。 |
configuration.url
オプション
|
The absolute url the webhook request should be sent to. |
configuration.method
オプション
|
The HTTP method to be used when sending a webhook request. |
configuration.filters
オプション
|
The list of events, firing webhook event for this Conversation. |
configuration.triggers
オプション
|
The list of keywords, firing webhook event for this Conversation. |
configuration.flow_sid
オプション
|
The studio flow SID, where the webhook should be sent to. |
例 1
Delete a ConversationScopedWebhook resource
https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
conversation_sid
Path
|
The unique ID of the Conversation for this webhook. |
sid
Path
|
このリソースを一意に識別する 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 Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.