NAME
Twilio::Rest::Verify::V2::Service::Webhook - The Webhook resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $webhook = $client->verify->v2->services($service_sid)->webhooks->create($friendly_name, $event_types, $webhook_url, \%options);
for my $webhook ($client->verify->v2->services($service_sid)->webhooks->read({}, 20)) {
...
}
my $webhook = $client->verify->v2->services($service_sid)->webhooks($sid)->fetch;
$client->verify->v2->services($service_sid)->webhooks($sid)->update(\%options);
$client->verify->v2->services($service_sid)->webhooks($sid)->delete;
DESCRIPTION
This file holds WebhookList, WebhookPage, WebhookContext and WebhookInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
WebhookList
Returned by $client->verify->v2->services($service_sid)->webhooks. See also Twilio::ListResource.
create
my $webhook = $client->verify->v2->services($service_sid)->webhooks->create($friendly_name, $event_types, $webhook_url, \%options);
Create a new Webhook for the Service. Returns a WebhookInstance.
The required values are:
$friendly_name-
The string that you assigned to describe the webhook. This value should not contain PII.
$event_types-
The array of events that this Webhook is subscribed to. Possible event types:
*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.deniedAn array reference. $webhook_url-
The URL associated with this Webhook.
The options are:
status-
One of
enabledordisabled. version-
One of
v1orv2.
read
my @records = $client->verify->v2->services($service_sid)->webhooks->read(\%options, $limit, $page_size);
Retrieve a list of all Webhooks for a Service. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->verify->v2->services($service_sid)->webhooks->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->verify->v2->services($service_sid)->webhooks->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->verify->v2->services($service_sid)->webhooks->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->verify->v2->services($service_sid)->webhooks->get_context($sid);
Returns a WebhookContext, and makes no request.
WebhookPage
A Twilio::Page of WebhookInstance objects.
records_key
build_instance
Used by Twilio::Page.
WebhookContext
Returned by $client->verify->v2->services($service_sid)->webhooks($sid). It makes no request until one of these methods is called.
fetch
my $webhook = $client->verify->v2->services($service_sid)->webhooks($sid)->fetch;
Fetch a specific Webhook. Returns a WebhookInstance.
update
my $webhook = $client->verify->v2->services($service_sid)->webhooks($sid)->update(\%options);
Returns a WebhookInstance.
The options are:
event_types-
The array of events that this Webhook is subscribed to. Possible event types:
*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.deniedAn array reference. friendly_name-
The string that you assigned to describe the webhook. This value should not contain PII.
status-
One of
enabledordisabled. version-
One of
v1orv2. webhook_url-
The URL associated with this Webhook.
delete
$client->verify->v2->services($service_sid)->webhooks($sid)->delete;
Delete a specific Webhook. Returns true.
WebhookInstance
See also Twilio::InstanceResource.
It has fetch, update and delete, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Service resource.
- date_created
-
The date and time in GMT when the resource was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_updated
-
The date and time in GMT when the resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- event_types
-
The array of events that this Webhook is subscribed to. Possible event types:
*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied - friendly_name
-
The string that you assigned to describe the webhook. This value should not contain PII.
- service_sid
-
The unique SID identifier of the Service.
- sid
-
The unique string that we created to identify the Webhook resource.
- status
-
One of
enabledordisabled. - url
-
The absolute URL of the Webhook resource.
- version
-
One of
v1orv2. - webhook_method
-
One of
GETorPOST. - webhook_url
-
The URL associated with this Webhook.
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.