Path parameters
-
The unique SID identifier of the Service.
-
The Twilio-provided string that uniquely identifies the Webhook resource to update.
Body
-
EventTypes array[string]
The array of events that this Webhook is subscribed to. Possible event types:
*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied
-
FriendlyName string
The string that you assigned to describe the webhook. This value should not contain PII.
-
Status string
The webhook status. Default value is
enabled
. One of:enabled
ordisabled
Values are
enabled
ordisabled
. -
Version string
The webhook version. Default value is
v2
which includes all the latest fields. Versionv1
is legacy and may be removed in the future.Values are
v1
orv2
. -
WebhookUrl string
The URL associated with this Webhook.
POST /v2/Services/{ServiceSid}/Webhooks/{Sid}
curl \
-X POST https://verify.twilio.com/v2/Services/{ServiceSid}/Webhooks/{Sid} \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'EventTypes=string&FriendlyName=string&Status=enabled&Version=v1&WebhookUrl=string'
Request example
{
"EventTypes": [
"string"
],
"FriendlyName": "string",
"Status": "enabled",
"Version": "v1",
"WebhookUrl": "string"
}
Request examples
{
"EventTypes": [
"string"
],
"FriendlyName": "string",
"Status": "enabled",
"Version": "v1",
"WebhookUrl": "string"
}
Response examples (200)
{
"account_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"event_types": [
"string"
],
"friendly_name": "string",
"service_sid": "string",
"sid": "string",
"status": "enabled",
"url": "https://example.com",
"version": "v1",
"webhook_method": "GET",
"webhook_url": "https://example.com"
}
Response examples (200)
{
"account_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"event_types": [
"string"
],
"friendly_name": "string",
"service_sid": "string",
"sid": "string",
"status": "enabled",
"url": "https://example.com",
"version": "v1",
"webhook_method": "GET",
"webhook_url": "https://example.com"
}