NAME

Twilio::Rest::Content::V2::Content - The Content resource

SYNOPSIS

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

for my $content ($client->content->v2->contents->read({}, 20)) {
  ...
}

DESCRIPTION

A Content resource represents rich messaging content.

This file holds ContentList, ContentPage and ContentInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

ContentList

Returned by $client->content->v2->contents. See also Twilio::ListResource.

read

my @records = $client->content->v2->contents->read(\%options, $limit, $page_size);

Retrieve a list of Contents belonging to the account used to make the request. Returns the records as a list, fetching as many pages as it needs.

The options are:

channel_eligibility

Filter by array of ChannelEligibility(s), where ChannelEligibility=<channel>:<status> An array reference.

content

Filter by Regex Pattern in template content

content_name

Filter by Regex Pattern in content name

content_type

Filter by array of contentType(s) An array reference.

date_created_after

Filter by >=[date-time] A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

date_created_before

Filter by <=[date-time] A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

language

Filter by array of valid language(s) An array reference.

sort_by_content_name

Whether to sort by ascending or descending content name

sort_by_date

Whether to sort by ascending or descending date updated

stream

my $stream = $client->content->v2->contents->stream(\%options, $limit, $page_size);

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

page

my $page = $client->content->v2->contents->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->content->v2->contents->get_page($url);

Fetches the page at a URL given by Twilio.

ContentPage

A Twilio::Page of ContentInstance objects.

records_key

build_instance

Used by Twilio::Page.

ContentInstance

See also Twilio::InstanceResource.

Its fields are:

account_sid

The SID of the Account that created Content resource.

date_created

The date and time in GMT that the resource was created specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date and time in GMT that the resource was last updated specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

friendly_name

A string name used to describe the Content resource. Not visible to the end recipient.

language

Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.

A list of links related to the Content resource, such as approval_fetch and approval_create

sid

The unique string that that we created to identify the Content resource.

types

The Content types (e.g. twilio/text) for this Content resource.

url

The URL of the resource, relative to https://content.twilio.com.

variables

Defines the default placeholder values for variables included in the Content resource. e.g. {"1": "Customer_Name"}.

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.