NAME

Twilio::Rest::Sync::V1::Service::SyncList::SyncListItem - The SyncListItem resource

SYNOPSIS

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

my $sync_list_item = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items->create($data, \%options);
for my $sync_list_item ($client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items->read({}, 20)) {
  ...
}
my $sync_list_item = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items($index)->fetch;
$client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items($index)->update(\%options);
$client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items($index)->delete;

DESCRIPTION

Items in a sync list

This file holds SyncListItemList, SyncListItemPage, SyncListItemContext and SyncListItemInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

SyncListItemList

Returned by $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items. See also Twilio::ListResource.

create

my $sync_list_item = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items->create($data, \%options);

Returns a SyncListItemInstance.

The required values are:

$data

A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. A hash or array reference, or a string of JSON.

The options are:

collection_ttl

How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted.

item_ttl

How long, in seconds, before the List Item expires (time-to-live) and is deleted.

ttl

An alias for item_ttl. If both parameters are provided, this value is ignored.

read

my @records = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

The options are:

bounds

Whether to include the List Item referenced by the from parameter. Can be: inclusive to include the List Item referenced by the from parameter or exclusive to start with the next List Item. The default value is inclusive. One of inclusive or exclusive.

from

The index of the first Sync List Item resource to read. See also bounds.

order

How to order the List Items returned by their index value. Can be: asc (ascending) or desc (descending) and the default is ascending. One of asc or desc.

stream

my $stream = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items->stream(\%options, $limit, $page_size);

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

page

my $page = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items->page(\%options, $page_size, $page_token, $page_number);

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

get_page

my $page = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items->get_context($index);

Returns a SyncListItemContext, and makes no request.

SyncListItemPage

A Twilio::Page of SyncListItemInstance objects.

records_key

build_instance

Used by Twilio::Page.

SyncListItemContext

Returned by $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items($index). It makes no request until one of these methods is called.

fetch

my $sync_list_item = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items($index)->fetch;

Returns a SyncListItemInstance.

update

my $sync_list_item = $client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items($index)->update(\%options);

Returns a SyncListItemInstance.

The options are:

collection_ttl

How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. This parameter can only be used when the List Item's data or ttl is updated in the same request.

data

A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. A hash or array reference, or a string of JSON.

item_ttl

How long, in seconds, before the List Item expires (time-to-live) and is deleted.

ttl

An alias for item_ttl. If both parameters are provided, this value is ignored.

if_match

If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP If-Match header.

delete

$client->sync->v1->services($service_sid)->sync_lists($list_sid)->sync_list_items($index)->delete(\%options);

Returns true.

The options are:

if_match

If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP If-Match header.

SyncListItemInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The SID of the Account that created the List Item resource.

created_by

The identity of the List Item's creator. If the item is created from the client SDK, the value matches the Access Token's identity field. If the item was created from the REST API, the value is system.

data

An arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length.

date_created

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

date_expires

The date and time in GMT when the List Item expires and will be deleted, specified in ISO 8601 format. If the List Item does not expire, this value is null. The List Item resource might not be deleted immediately after it expires. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

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

index

The automatically generated index of the List Item. The index values of the List Items in a Sync List can have gaps in their sequence.

list_sid

The SID of the Sync List that contains the List Item.

revision

The current revision of the item, represented as a string.

service_sid

The SID of the Sync Service the resource is associated with.

url

The absolute URL of the List Item 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.