NAME

Twilio::Rest::Webhooks::V1::Setting - The Setting resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $setting = $client->webhooks->v1->settings->create(\%body, \%options);
for my $setting ($client->webhooks->v1->settings->read({}, 20)) {
  ...
}
my $setting = $client->webhooks->v1->settings($setting_id)->fetch;
$client->webhooks->v1->settings($setting_id)->patch(\%body);
$client->webhooks->v1->settings($setting_id)->delete;

DESCRIPTION

This file holds SettingList, SettingPage, SettingContext and SettingInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

SettingList

Returned by $client->webhooks->v1->settings. See also Twilio::ListResource.

create

my $setting = $client->webhooks->v1->settings->create(\%body, \%options);

Creates an immutable webhook configuration. ### Authentication: Inline vs Shared Inline (Recommended): - Credentials directly in Setting (source: INLINE) - Use when: Each Setting has unique credentials Shared (Advanced): - Multiple Settings share one AuthProfile resource (source: REFERENCE) - Use when: Centralizing credentials, managing one AuthProfile instead of duplicating across Settings ### Immutability Settings are immutable (except friendlyName, description). To change configuration: Create new Setting → Update Rule → Delete old Setting. This enables safe testing before production cutover. Returns a SettingInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

Its fields are:

auth

Required. No description in the specification.

connection

HTTP connection settings. If omitted, system defaults are applied.

description

Optional description of the Setting's purpose and usage

edgeZones

Edge zone configuration for webhook delivery. When omitted, all zones are eligible and Twilio selects freely. When set, zones lists preferred zones in priority order.

friendlyName

Human-readable name (optional, defaults to blank)

signature

No description in the specification.

The options are:

idempotency_key

Idempotency key for mutation operations. Must be a UUIDv7 (other UUID versions are rejected with a 400).

read

my @records = $client->webhooks->v1->settings->read(\%options, $limit, $page_size);

Returns a paginated list of Setting summaries. Use query parameters to filter by authProfileId or sharedKeyId, or to list Twilio-managed system Settings instead of your own. Returns the records as a list, fetching as many pages as it needs.

The options are:

auth_profile_id

Filter Settings that reference this AuthProfile ID

shared_key_id

Filter Settings that reference this SharedKey ID

type

Whether to list your own Settings or Twilio-managed system Settings. - CUSTOMER (default): Settings created by you - SYSTEM: Twilio-managed Settings, such as the account's default legacy configuration One of CUSTOMER or SYSTEM.

stream

my $stream = $client->webhooks->v1->settings->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->webhooks->v1->settings->page(\%options, $page_size, $page_token);

Fetches one page, and returns a Twilio::TokenPaginationPage. This API pages by token, so there is no page number.

get_page

my $page = $client->webhooks->v1->settings->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->webhooks->v1->settings->get_context($setting_id);

Returns a SettingContext, and makes no request.

SettingPage

A Twilio::Page of SettingInstance objects.

records_key

build_instance

Used by Twilio::Page.

SettingContext

Returned by $client->webhooks->v1->settings($setting_id). It makes no request until one of these methods is called.

fetch

my $setting = $client->webhooks->v1->settings($setting_id)->fetch;

Returns a Setting by its ID, including full auth, signature, connection, and edge configuration. Returns a SettingInstance.

patch

my $setting = $client->webhooks->v1->settings($setting_id)->patch(\%body);

Updates only the friendlyName and/or description fields. Settings are immutable except for these fields. To change configuration (auth, signature, connection, etc.), create a new Setting resource. Returns 409 Conflict if attempting to modify a system-created Setting. Returns a SettingInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

Its fields are:

description

Optional description of the Setting's purpose and usage

friendlyName

Human-readable name

delete

$client->webhooks->v1->settings($setting_id)->delete;

Permanently deletes the Setting resource. Returns 409 Conflict if the Setting is still referenced by any Rule or if it's a system-created Setting. 409 Resolution: 1. List dependencies: GET /Rules?settingId={id} 2. Delete/update them 3. Retry deletion. Returns true.

SettingInstance

See also Twilio::InstanceResource.

It has fetch, patch and delete, which work as they do on the context.

Its fields are:

auth

No description in the specification.

connection

HTTP connection settings. If omitted, system defaults are applied.

created_at

A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

description

Optional description of the Setting's purpose and usage

edge_zones

Edge zone configuration for webhook delivery. When omitted, all zones are eligible and Twilio selects freely. When set, zones lists preferred zones in priority order.

friendly_name

Human-readable name

id

Unique Setting identifier (TypeID/TTID format)

signature

No description in the specification.

type

Setting ownership (read-only): - system: Managed by Twilio - Twilio provides managed Settings to simplify your onboarding journey - Cannot be modified or deleted - Used for default account configuration - customer: Created by you - Can update friendlyName via PATCH - Can delete via DELETE (if not in use) - Core config (auth, signature) is immutable One of SYSTEM or CUSTOMER.

updated_at

A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

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.