NAME
Twilio::Rest::Verify::V2::Safelist - The Safelist resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $safelist = $client->verify->v2->safelist->create($phone_number);
my $safelist = $client->verify->v2->safelist($phone_number)->fetch;
$client->verify->v2->safelist($phone_number)->delete;
DESCRIPTION
This file holds SafelistList, SafelistContext and SafelistInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
SafelistList
Returned by $client->verify->v2->safelist. See also Twilio::ListResource.
create
my $safelist = $client->verify->v2->safelist->create($phone_number);
Add a new phone number to SafeList. Returns a SafelistInstance.
The required values are:
$phone_number-
The phone number to be added in SafeList. Phone numbers must be in E.164 format.
get_context
my $context = $client->verify->v2->safelist->get_context($phone_number);
Returns a SafelistContext, and makes no request.
SafelistContext
Returned by $client->verify->v2->safelist($phone_number). It makes no request until one of these methods is called.
fetch
my $safelist = $client->verify->v2->safelist($phone_number)->fetch;
Check if a phone number exists in SafeList. Returns a SafelistInstance.
delete
$client->verify->v2->safelist($phone_number)->delete;
Remove a phone number from SafeList. Returns true.
SafelistInstance
See also Twilio::InstanceResource.
It has fetch and delete, which work as they do on the context.
Its fields are:
- phone_number
-
The phone number in SafeList.
- sid
-
The unique string that we created to identify the SafeList resource.
- url
-
The absolute URL of the SafeList resource.
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.