Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

List resource

A Sync List is an ordered collection of individual items, each storing separate JSON objects.

After you create a List, use the ListItem resource to add, retrieve, update, and delete items from your List. See that page for more details on how items are stored in lists, including ordering, expiration, and limitations on each item's size.

List properties

Names in PHP format
sid
sid<ES> Not PII

The unique 34-character SID identifier of the List.

uniqueName

The unique and addressable name of this List. Optional, up to 320 characters long.

accountSid
sid<AC> Not PII

The unique SID identifier of the Twilio Account.

serviceSid
sid<IS> Not PII

The unique SID identifier of the Service Instance that hosts this List object.

url
url Not PII

The absolute URL for this List.

links
uri_map Not PII

A dictionary of URL links to nested resources of this List.

revision
string Not PII

Contains the current revision of this List, represented by a string identifier.

dateExpires
date_time<iso8601> Not PII

Contains the date this List expires and gets deleted automatically. Contains null if the List persists permanently.

dateCreated
date_time<iso8601> Not PII

The date this List was created, given in UTC ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

Specifies the date this List was last updated, given in UTC ISO 8601 format.

createdBy

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

Create a List resource

post
https://sync.twilio.com/v1/Services/{ServiceSid}/Lists
Parameters
Names in None format
unique_name
Optional
post string PII MTL: 30 DAYS

Human-readable name for this list

ttl
Optional
post integer Not PII

Alias for collection_ttl. If both are provided, this value is ignored.

collection_ttl
Optional
post integer Not PII

Time-to-live of this List in seconds, defaults to no expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity.

Example
        
        
        
        

        Fetch a List resource

        get
        https://sync.twilio.com/v1/Services/{ServiceSid}/Lists/{Sid}
        Example
              
              
              
              

              Read a List resource

              get
              https://sync.twilio.com/v1/Services/{ServiceSid}/Lists
              Example
                    
                    
                    
                    

                    Update a List resource

                    post
                    https://sync.twilio.com/v1/Services/{ServiceSid}/Lists/{Sid}
                    Parameters
                    Names in None format
                    ttl
                    Optional
                    post integer Not PII

                    Alias for collection_ttl. If both are provided, this value is ignored.

                    collection_ttl
                    Optional
                    post integer Not PII

                    Time-to-live of this List in seconds, defaults to no expiration. In the range [1, 31 536 000 (1 year)], or 0 for infinity.

                    Example
                          
                          
                          
                          

                          Delete a List resource

                          delete
                          https://sync.twilio.com/v1/Services/{ServiceSid}/Lists/{Sid}

                          Permanently delete a List along with all items belonging to it.

                          Example
                                
                                
                                
                                
                                Rate this page:

                                Need some help?

                                We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.