NAME
Twilio::Rest::Accounts::V1::MessagingGeopermissions - The MessagingGeopermissions resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $messaging_geopermissions = $client->accounts->v1->messaging_geopermissions->fetch;
my $messaging_geopermissions = $client->accounts->v1->messaging_geopermissions->update($permissions);
DESCRIPTION
Manage Geo Permissions for each country.
This file holds MessagingGeopermissionsList and MessagingGeopermissionsInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
MessagingGeopermissionsList
Returned by $client->accounts->v1->messaging_geopermissions. See also Twilio::ListResource.
fetch
my $messaging_geopermissions = $client->accounts->v1->messaging_geopermissions->fetch(\%options);
Returns a MessagingGeopermissionsInstance.
The options are:
country_code-
The country code to filter the geo permissions. If provided, only the geo permission for the specified country will be returned.
update
my $messaging_geopermissions = $client->accounts->v1->messaging_geopermissions->update($permissions);
Returns a MessagingGeopermissionsInstance.
The required values are:
$permissions-
A list of objects where each object represents the Geo Permission to be updated. Each object contains the following fields:
country_code, unique code for each country of Geo Permission;type, permission type of the Geo Permission i.e. country;enabled, configure true for enabling the Geo Permission, false for disabling the Geo Permission. An array reference. A hash or array reference, or a string of JSON.
MessagingGeopermissionsInstance
See also Twilio::InstanceResource.
Its fields are:
- permissions
-
A list of objects where each object represents the result of processing a messaging Geo Permission. Each object contains the following fields:
country_code, the country code of the country for which the permission was updated;type, the type of the permission i.e. country;enabled, true if the permission is enabled else false;error_code, an integer where 0 indicates success and any non-zero value represents an error; anderror_messages, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
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.