NAME
Twilio::Rest::Accounts::V1::BulkConsents - The BulkConsents resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $bulk_consents = $client->accounts->v1->bulk_consents->create($items);
DESCRIPTION
This file holds BulkConsentsList and BulkConsentsInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
BulkConsentsList
Returned by $client->accounts->v1->bulk_consents. See also Twilio::ListResource.
create
my $bulk_consents = $client->accounts->v1->bulk_consents->create($items);
Returns a BulkConsentsInstance.
The required values are:
$items-
This is a list of objects that describes a contact's opt-in status. Each object contains the following fields:
contact_id, which must be a string representing phone number in E.164 format;correlation_id, a unique 32-character UUID used to uniquely map the request item with the response item;sender_id, which can be either a valid messaging service SID or a from phone number;status, a string representing the consent status. Can be one of [opt-in,opt-out];source, a string indicating the medium through which the consent was collected. Can be one of [website,offline,opt-in-message,opt-out-message,others];date_of_consent, an optional datetime string field in ISO-8601 format that captures the exact date and time when the user gave or revoked consent. If not provided, it will be empty. An array reference. A hash or array reference, or a string of JSON.
BulkConsentsInstance
See also Twilio::InstanceResource.
Its fields are:
- items
-
A list of objects where each object represents the result of processing a
correlation_id. Each object contains the following fields:correlation_id, a unique 32-character UUID that maps the response to the original request;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.