twilio/list-picker
The twilio/list-picker content type includes a menu of up to 10 options for users to make a selection.
(information)
Info
List-picker templates are only available once the end user is in a 24 hour session. They can't initiate a business initiated session.
List-picker templates aren't supported for approval on WhatsApp and can't be submitted for approval.

| Parameter | Type | Required | Variable support | Description |
|---|---|---|---|---|
body | string | Yes | Yes | The text of the message you want to send. This is included as a regular text message. Maximum length: 1,024 characters |
button | string | Yes | Yes | Display value for the primary button. |
items | array | Yes | See items properties. | Array of list item objects. Minimum: 1 item Maximum: 10 items |
| Property | Type | Required | Variable support | Description |
|---|---|---|---|---|
item | string | Yes | Yes | Display value for the item. Maximum length: 24 characters |
id | string | Yes | Yes | Unique item identifier. Not visible to the recipient. Maximum length: 200 characters |
description | string | Yes | Yes | Description of the item. Maximum length: 72 characters |
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createContent() {11const content = await client.content.v1.contents.create({12friendly_name: "owl_air_list",13variables: {141: "end_date",15},16language: "en",17types: {18"twilio/text": {19body: "We have flights to the following destinations: (1) SFO, (2) OAK, (3) LAX. Hurry! Sale ends on {{1}}!",20},21"twilio/list-picker": {22body: "Owl Air Flash Sale! Hurry! Sale ends on {{1}}!",23button: "Select a destination",24items: [25{26id: "SFO1337",27item: "SFO to NYC for $299",28description: "Owl Air Flight 1337 to LGA",29},30{31id: "OAK5280",32item: "OAK to Denver for $149",33description: "Owl Air Flight 5280 to DEN",34},35{36id: "LAX96",37item: "LAX to Chicago for $199",38description: "Owl Air Flight 96 to ORD",39},40],41},42},43});4445console.log(content.dateCreated);46}4748createContent();
Response
1{2"sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"friendly_name": "owl_air_list",5"language": "en",6"variables": {7"1": "end_date"8},9"types": {10"twilio/text": {11"body": "We have flights to the following destinations: (1) SFO, (2) OAK, (3) LAX. Hurry! Sale ends on {{1}}!"12},13"twilio/list-picker": {14"body": "Owl Air Flash Sale! Hurry! Sale ends on {{1}}!",15"button": "Select a destination",16"items": [17{18"id": "SFO1337",19"item": "SFO to NYC for $299",20"description": "Owl Air Flight 1337 to LGA"21},22{23"id": "OAK5280",24"item": "OAK to Denver for $149",25"description": "Owl Air Flight 5280 to DEN"26},27{28"id": "LAX96",29"item": "LAX to Chicago for $199",30"description": "Owl Air Flight 96 to ORD"31}32]33}34},35"url": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",36"date_created": "2015-07-30T19:00:00Z",37"date_updated": "2015-07-30T19:00:00Z",38"links": {39"approval_create": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests/whatsapp",40"approval_fetch": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests"41}42}