ConversationsWebhook
Create Service Conversation Scoped Webhook
Create a new webhook scoped to the conversation in a specific service
Authorization
accountSid_authToken AuthorizationBasic <token>
In: header
Path Parameters
ChatServiceSid*string
The SID of the Conversation Service the Participant resource is associated with.
Match
^IS[0-9a-fA-F]{32}$Length
34 <= length <= 34ConversationSid*string
The unique ID of the Conversation for this webhook.
Request Body
application/x-www-form-urlencoded
Target*ServiceConversationScopedWebhookTarget
The target of this webhook: webhook, studio, trigger
Value in
- "webhook"
- "trigger"
- "studio"
Configuration.Url?string
The absolute url the webhook request should be sent to.
Configuration.Method?ServiceConversationScopedWebhookMethod
Value in
- "get"
- "post"
Configuration.Filters?array<string>
The list of events, firing webhook event for this Conversation.
Configuration.Triggers?array<string>
The list of keywords, firing webhook event for this Conversation.
Configuration.FlowSid?string
The studio flow SID, where the webhook should be sent to.
Match
^FW[0-9a-fA-F]{32}$Length
34 <= length <= 34Configuration.ReplayAfter?integer
The message index for which and it's successors the webhook will be replayed. Not set by default
Response Body
application/json
curl -X POST "https://example.com/v1/Services/stringstringstringstringstringstri/Conversations/string/Webhooks" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'Target=webhook&Configuration.Url=https%3A%2F%2Fexample.com&Configuration.Method=get&Configuration.Filters=onMessageSent%2ConConversationDestroyed&Configuration.ReplayAfter=7'{ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "target": "webhook", "configuration": { "url": "https://example.com", "method": "get", "filters": [ "onMessageSent", "onConversationDestroyed" ] }, "date_created": "2016-03-24T21:05:50Z", "date_updated": "2016-03-24T21:05:50Z", "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}