Messages

Send list message

POST
/messages/list

A button that opens a list of options. The contact's choice arrives through the message.received webhook, with the row's row_id. One-on-one chats only. WhatsApp may stop delivering lists sent outside the official API at any time: have a plan B (text or poll).

Autorisation

X-Api-Key: wpf_YOUR_KEY

The connection's API key (wpf_...), generated in the dashboard.

Authorization: Bearer wpf_YOUR_KEY

The same key in Authorization: Bearer wpf_... (what n8n, Make and HTTP libraries support out of the box).

Paramètres d'en-tête

Idempotency-Key?string

Optional. Repeating the same value within 24 h, with the same API key, returns the first response without sending again. See Idempotency in the introduction.

Corps de la requête

application/json
  1. body
to*string

Recipient: phone number with country code and area code, digits only (5581999999999; +, spaces and dashes are ignored), or the chatId (5581999999999@c.us, ...@lid, or a group ...@g.us). Brazilian phone numbers are checked on WhatsApp before sending. Individual chats only: groups are rejected.

title*string

The list header (up to 60 characters).

Longueur1 <= length <= 60
description*string

The message text (up to 1024 characters).

Longueur1 <= length <= 1024
footer?string

Optional: the footer (up to 60 characters).

Longueur1 <= length <= 60
button*string

The text of the button that opens the options (up to 20 characters).

Longueur1 <= length <= 20
sections*array<>

The sections, up to 10, with up to 10 rows in total. Each section has title (up to 24) and rows; each row has title (up to 24), optional description (up to 72) and optional row_id (up to 200, unique; generated if omitted).

Éléments1 <= items <= 10
reply_to?string

Optional: the message_id of a message to reply to, quoting it.

Corps de la réponse

Sent. Keep the message_id: it is what appears in the message.sent and message.status events.

application/json
  1. response
data*
curl -X POST 'https://app.wappfy.io/api/v1/messages/list' \  -H 'X-Api-Key: wpf_YOUR_KEY' \  -H 'Content-Type: application/json' \  -d '{  "to": "5581999999999",  "title": "Menu",  "description": "Choose an option",  "footer": "Loja Centro",  "button": "Ver opções",  "sections": [    {      "title": "Orders",      "rows": [        {          "title": "Place an order",          "row_id": "pedido"        },        {          "title": "Talk to an agent",          "description": "Mon to Fri, 8am to 6pm"        }      ]    }  ]}'
{  "data": {    "message_id": "string",    "chat_id": "string",    "rows": [      {        "row_id": "string",        "title": "string"      }    ]  }}