Sending Interactive Lists

🔒 WhatsApp 24-Hour Session Rule

Before sending interactive lists, make sure the WhatsApp session with the user is active.

If the user has not messaged your business within the last 24 hours, WhatsApp requires the first message to be a template message.

After the customer replies, the 24-hour session opens and you may send interactive lists using this API. For sandbox testing, send your join code to the sandbox number to activate your session. Learn more

WhatsApp offers an API to send lists.

POST https://gateway.lipachat.com/api/v1/whatsapp/interactive/list

Headers

Name
Value

Content-Type

application/json

apiKey

Get apiKey from App portal settings tabhttps://app.lipachat.com/app/settings

Body

Name
Type
Description

messageId

string

A unique identifier for the message. This will be used to track the message status and for deduplication purposes.

message

string

The message being sent.

from

string

Sandbox number +254110090747 or your own WABA phone number.

to

string

Receiver phone number. It should start with a country code.

buttons[0].sectionTitle

string

buttons[0].sectionItems[0].id

string

Unique identifier of button in your app. eg 1 or YES_BTN

buttons[0].sectionItems[0].title

string

Text to be displayed to user.

buttons[0].sectionItems[0].description

string

Optional description

For interactive list messages, WhatsApp allows up to 10 sections, with a maximum of 10 rows across all sections combined.

curl --location 'https://gateway.lipachat.com/api/v1/whatsapp/interactive/list' \
--header 'apiKey: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "headerText": "Welcome to Lipachat",
  "body": "Please choose a product you would like below",
  "buttonText": "Click Here",
  "buttons": [
    {
      "sectionTitle": "Airtime",
      "sectionItems": [
        {
          "id": "SAFARICOM_AIRTIME",
          "title": "Safaricom",
          "description": "mpesa network"
        },
        {
          "id": "AIRTEL_AIRTIME",
          "title": "Airtel",
          "description": "airtel money"
        }
      ]
    },
    {
      "sectionTitle": "Bill Payment",
      "sectionItems": [
        {
          "id": "KPLC",
          "title": "KPLC",
          "description": "electricity"
        },
        {
          "id": "NAIROBI_WATER",
          "title": "Nairobi Water",
          "description": "county gov water"
        }
      ]
    }
  ],
  "messageId": "ca739107-4b0d-4581-acb1-4c4af70555de",
  "to": "2547XXXX",
  "from": "254110090747"
}'

Response

{
      "timestamp": "2023-08-06T01:27:56.825898971",
      "data": {
            "messageId": "7addc006-07db-4fae-aac5-b285903b41d4",
            "waId": "wamid.HBgMMjU0NzE3NzQ2NTY1FQIAEnRgSRjJGRkMzNkQ0QUVENTIxQ0NBAA==",
            "status": "SENT",
            "statusDesc": "Message sent successfully"
      },
      "status": "success",
      "message": "",
      "errors": null
}

Last updated