Create a new webhook scoped to the conversation
A Scoped Webhook resource manages a set of callback URLs and their configuration for receiving events specific to one conversation.
Create a new webhook scoped to the conversation
Path parameters
-
The unique ID of the Conversation for this webhook.
Body
-
Configuration.Filters array[string]
The list of events, firing webhook event for this Conversation.
-
Configuration.FlowSid string
The studio flow SID, where the webhook should be sent to.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^FW[0-9a-fA-F]{32}$
. -
Configuration.Method string
The HTTP method to be used when sending a webhook request.
Values are
GET
orPOST
. -
Configuration.ReplayAfter integer
The message index for which and it's successors the webhook will be replayed. Not set by default
-
Configuration.Triggers array[string]
The list of keywords, firing webhook event for this Conversation.
-
Configuration.Url string
The absolute url the webhook request should be sent to.
-
The target of this webhook:
webhook
,studio
,trigger
Values are
webhook
,trigger
, orstudio
.
curl \
-X POST https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Webhooks \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'Configuration.Filters=string&Configuration.FlowSid=string&Configuration.Method=GET&Configuration.ReplayAfter=42&Configuration.Triggers=string&Configuration.Url=string&Target=webhook'
{
"Configuration.Filters": [
"string"
],
"Configuration.FlowSid": "string",
"Configuration.Method": "GET",
"Configuration.ReplayAfter": 42,
"Configuration.Triggers": [
"string"
],
"Configuration.Url": "string",
"Target": "webhook"
}
{
"Configuration.Filters": [
"string"
],
"Configuration.FlowSid": "string",
"Configuration.Method": "GET",
"Configuration.ReplayAfter": 42,
"Configuration.Triggers": [
"string"
],
"Configuration.Url": "string",
"Target": "webhook"
}
{
"account_sid": "string",
"conversation_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"sid": "string",
"target": "string",
"url": "https://example.com"
}
{
"account_sid": "string",
"conversation_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"sid": "string",
"target": "string",
"url": "https://example.com"
}