Skip to contentSkip to navigationSkip to topbar
Rate this Page:

twilio/list-picker


Twilio/list-picker includes a menu of up to 10 options, which offers a simple way for users to make a selection.

(information)

Info

List-picker templates are only available once the end user is in a 24 hr session. They can not initiate a business initiated session.

List-picker templates are not supported for approval on WhatsApp and can't be submitted for approval.


Supported Channels

supported-channels page anchor

WhatsApp


Message Preview.

body:

  • Type: string
  • Required: yes
  • Variable Support: yes
  • Description: The text of the message you want to send. This is included as a regular text message.

    • Maximum 1024 characters

button:

  • Type: string
  • Required: yes
  • Variable Support: yes
  • Description: Display value for the primary button.

    • It cannot be an empty string and must be unique within the message.

items:

  • Type: array[List Items]
  • Required: yes
  • Variable Support: See List Item definition below.
  • Description: Array of list item objects.

    • Minimum: 1 item; maximum: 10 items

item:

  • Type: string
  • Required: yes
  • Variable Support: yes
  • Description: Display value for the item

    • Maximum: 24 characters

id:

  • Type: string
  • Required: yes
  • Variable Support: yes
  • Description: Unique item identifier. Not visible to the recipient.

    • Maximum: 200 characters

description:

  • Type: string
  • Required: no
  • Variable Support: yes
  • Description: Description of the item.

    • Maximum: 72 characters

Create List Picker Template

create-list-picker-template page anchor
curl

_36
curl -X POST 'https://content.twilio.com/v1/Content' \
_36
-H 'Content-Type: application/json' \
_36
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \
_36
-d '{
_36
"friendly_name": "owl_sale_list",
_36
"language": "en",
_36
"variables": {
_36
"1": "end_date"
_36
},
_36
"types": {
_36
"twilio/list-picker": {
_36
"body": "Owl Air Flash Sale! Hurry! Sale ends on {{1}}!",
_36
"button": "Select a destination",
_36
"items": [
_36
{
_36
"item": "SFO to NYC for $299",
_36
"description": "Owl Air Flight 1337 to LGA",
_36
"id": "SFO1337"
_36
},
_36
{
_36
"item": "OAK to Denver for $149",
_36
"description": "Owl Air Flight 5280 to DEN",
_36
"id": "OAK5280"
_36
},
_36
{
_36
"item": "LAX to Chicago for $199",
_36
"description": "Owl Air Flight 96 to ORD",
_36
"id": "LAX96"
_36
}
_36
]
_36
},
_36
"twilio/text": {
_36
"body": "We have flights to the following destinations: (1) SFO, (2) OAK, (3) LAX. Hurry! Sale ends on {{1}}!"
_36
}
_36
}
_36
}'

Output

_42
{
_42
"language": "en",
_42
"date_updated": "2022-08-29T15:46:11Z",
_42
"variables": {
_42
"1": "end_date"
_42
},
_42
"friendly_name": "owl_sale_list",
_42
"account_sid": "ACXXXXXXXXXXXXXXXXXXX",
_42
"url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXX",
_42
"sid": "HXXXXXXXXXXXXXXXXXXX",
_42
"date_created": "2022-08-29T15:46:11Z",
_42
"types": {
_42
"twilio/list-picker": {
_42
"body": "Owl Air Flash Sale! Hurry! Sale ends on {{1}}!",
_42
"items": [
_42
{
_42
"item": "SFO to NYC for $299",
_42
"id": "SFO1337",
_42
"description": "Owl Air Flight 1337 to LGA"
_42
},
_42
{
_42
"item": "OAK to Denver for $149",
_42
"id": "OAK5280",
_42
"description": "Owl Air Flight 5280 to DEN"
_42
},
_42
{
_42
"item": "LAX to Chicago for $199",
_42
"id": "LAX96",
_42
"description": "Owl Air Flight 96 to ORD"
_42
}
_42
],
_42
"button": "Select a destination"
_42
},
_42
"twilio/text": {
_42
"body": "We have flights to the following destinations: (1) SFO, (2) OAK, (3) LAX. Hurry! Sale ends on {{1}}!"
_42
}
_42
},
_42
"links": {
_42
"approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXX/ApprovalRequests",
_42
"approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp"
_42
}
_42
}


Rate this Page: