Update channel webhook
Webhooks for specific channels
Path parameters
-
The SID of the Service with the Channel that has the Webhook resource to update.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IS[0-9a-fA-F]{32}$
. -
The SID of the Channel the Channel Webhook resource to update belongs to. This value can be the Channel resource's
sid
orunique_name
. -
The SID of the Channel Webhook resource to update.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WH[0-9a-fA-F]{32}$
.
Body
-
The URL of the webhook to call using the
configuration.method
. -
Values are
GET
orPOST
. -
The events that cause us to call the Channel Webhook. Used when
type
iswebhook
. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see Webhook Event Triggers. -
A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when
type
=trigger
. -
The SID of the Studio Flow to call when an event in
configuration.filters
occurs. Used only whentype
=studio
.Minimum length is
34
, maximum length is34
. Format should match the following pattern:^FW[0-9a-fA-F]{32}$
. -
The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
curl \
--request POST 'https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Configuration.Url=dummy&Configuration.Method=POST&Configuration.Triggers=keyword1&Configuration.Triggers=keyword2&Configuration.RetryCount=5'
{"Configuration.Url"=>"dummy", "Configuration.Method"=>"POST", "Configuration.Triggers"=>["keyword1", "keyword2"], "Configuration.RetryCount"=>5}
{
"sid": "WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/WHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "trigger",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-03-24T21:05:50Z",
"date_updated": "2016-03-24T21:05:51Z",
"configuration": {
"url": "dummy",
"method": "POST",
"filters": [
"keyword1",
"keyword2"
],
"retry_count": 3
}
}