إرسال قائمة تفاعلية (List Message)

عرض قائمة خيارات مخصصة للعميل لاختيار الخدمة المطلوبة.

POST
https://api.wawp.net/v2/send/list?access_token=YOUR_ACCESS_TOKEN&chatId=201234567890&instance_id=YOUR_INSTANCE_ID&message=%7B%0A++%22title%22%3A+%22Simple+Menu%22%2C%0A++%22description%22%3A+%22Please+choose+an+option%22%2C%0A++%22footer%22%3A+%22Thank+you%21%22%2C%0A++%22button%22%3A+%22Open+Menu%22%2C%0A++%22sections%22%3A+%5B%0A++++%7B%0A++++++%22title%22%3A+%22Main+Options%22%2C%0A++++++%22rows%22%3A+%5B%0A++++++++%7B%0A++++++++++%22title%22%3A+%22Option+1%22%2C%0A++++++++++%22rowId%22%3A+%22opt1%22%2C%0A++++++++++%22description%22%3A+%22Description+for+1%22%0A++++++++%7D%2C%0A++++++++%7B%0A++++++++++%22title%22%3A+%22Option+2%22%2C%0A++++++++++%22rowId%22%3A+%22opt2%22%0A++++++++%7D%0A++++++%5D%0A++++%7D%0A++%5D%0A%7D&message.button=Open+Menu&message.description=Please+select+an+option+below&message.footer=Powered+by+Wawp&message.sections=%5B%7B+title%3A+%27Section+1%27%2C+rows%3A+%5B...%5D+%7D%5D&message.title=Simple+Menu&reply_to=false_111...AAAA

تسجيل الدخول مطلوب

سجل الدخول لاستبدال المعرفات (Instance ID) ورمز الوصول (Access Token) بمعلومات حسابك الحقيقي لاختبار ال API مباشرة.

تسجيل الدخول
اختبار /v2/send/list
POSTGET

لا توجد معاملات استعلام مطلوبة

هذه النهاية الطرفية لا تتوقع بيانات في الرابط.

توصيات

  • Use "reply_to" to maintain conversation context.

  • Handle distinct message types (text, image, video) appropriately.

  • Implement a robust retry mechanism for failed sends.

Conversational Navigation: Mastering the Interactive List Engine

In the evolution of commercial messaging, the /v2/send/list endpoint represents a shift from "Command-Line" style interactions to a modern, "App-like" user experience. List messages provide a structured, high-conversion way for users to select from a menu of options without the friction of typing words or numbers. By organizing choices into sections and rows, you can build complex navigation menus, product directories, or support triage flows that feel native to the WhatsApp ecosystem.

List.png

list options.png


🏗️ The List Message Hierarchy

A List message is a multi-layered object designed for clarity and scannability:

  1. The Header (Title): This is the first thing the user sees. It should clearly state the purpose of the menu (e.g., "Customer Support Menu").
  2. The Body (Description): Use this for the primary instruction or context (e.g., "Please select the department you wish to speak with").
  3. The Activation Button: A custom label (max 20 characters) that triggers the overlay.
  4. Sections and Rows: The core content. Sections allow you to group related options (e.g., "Technical Support" vs. "Billing Queries"), while rows represent the individual clickable items.

🛡️ Strategic Best Practices for Menu Design

1. The 10-Row Boundary

WhatsApp enforces a hard limit of 10 rows across all sections in a single list.

  • Developer Action: If you have 20 products to show, do not try to squeeze them into one list. Instead, use a "Category" list first, and then have the user's selection trigger a second list message for that specific category. This "Multi-Step Triage" prevents the user from being overwhelmed by a single, monolithic menu.
  • Row Descriptions: Each row has an optional description field. Use this to provide "Hint Text" (e.g., "Fastest response time") to guide the user's decision process.

2. Unique Identifier (rowId) Strategy

The rowId is for your backend, while the title is for the user.

  • Decoupling: Never rely on the row title for your logic. Always use a unique, alphanumeric rowId (e.g., dept_billing_v1). This allows you to change the display text for marketing purposes without breaking your backend processing logic.
  • State Persistence: You can include small bits of state metadata in the rowId (e.g., user_123_opt_4) if your system is completely stateless, though we recommend maintaining user state in your own database associated with the chatId.

3. Visual Scannability and Emojis

  • Section Headers: Use section titles as "Visual Anchors."
  • Emoji Bullet Points: Prefix your row titles with emojis (e.g., "💳 Billing," "🛠️ Technical"). This significantly reduces the cognitive load on the user, allowing them to find their desired option via icons rather than reading every word.

🧩 Advanced Use Cases

Automated Product Catalogs

Build a mini-storefront within the chat. The first section can be "New Arrivals," and the second "Best Sellers." When a user clicks a row, your Webhooks (list_response) will capture the rowId. Your system can then immediately send an /v2/send/image of that product with a "Buy Now" link.

Intelligent Support Triage

Instead of a human greeting every user, send a List message. Section 1: "Urgent Issues," Section 2: "General Info." Based on the user's selection, the bot can route the conversation to the most qualified agent or provide an automated knowledge-base article.


🛠️ Common Pitfalls and Solutions

  • Button Text Length: If your button text exceeds 20 characters, the message will fail to send with a Validation Error. Keep it punchy: "See Options," "Start Here," or "Main Menu."
  • Empty Sections: Every section must contain at least one row. Sending an empty section will cause a rendering failure on the WhatsApp network.
  • The "No Response" Trap: Users sometimes open a list but don't select anything. Ensure your bot has a "Timeout" or follow-up logic to re-engage the user if they've been inactive for more than 5 minutes after receiving a menu.

Summary of Capabilities:

  • Deliver interactive, overlay-style list menus with up to 10 rows.
  • Support for multiple logically grouped sections with custom titles.
  • High-conversion UX using custom buttons and descriptive row metadata.
  • Real-time interaction tracking via specialized list_response Webhook events.
  • Full markdown support for header titles and body descriptions.

البارامترات

قم بتهيئة المعاملات المطلوبة للتفاعل مع نقطة النهاية هذه. جميع وسائط الاستعلام والبيانات مدرجة أدناه مع تفاصيلها.

محتوى الطلب

يرسل كـ JSON
string

Unique ID of the WhatsApp session

مثال:
string

API access token

مثال:
string

Recipient's WhatsApp number

مثال:
object

The interactive list message structure.

مثال:
string

Header title of the list message.

مثال:
string

Body text of the message.

مثال:
string

Small text at the bottom.

مثال:
string

Text on the button that opens the list.

مثال:
array

Array of sections, each containing a title and rows.

مثال:
string—

The ID of the message you are replying to

مثال:

برمج بالذكاء الاصطناعي باستخدام Wawp MCP

MCP READY

قم بربط الـ API مباشرة مع Cursor أو Windsurf أو Claude Desktop، ودع الذكاء الاصطناعي يكتب لك كود الربط وينفذه تلقائياً!

طريقة الربط والإعداد

أمثلة الكود

استخدم أمثلة الكود الجاهزة لدمج واجهة برمجة التطبيقات (API) في مشروعك بسرعة وكفاءة. اختر لغة البرمجة والمكتبة التي تفضلها.

1const baseUrl = "https://api.wawp.net";
2const endpoint = "/v2/send/list";
3const params = new URLSearchParams({
4 "instance_id": "YOUR_INSTANCE_ID",
5 "access_token": "YOUR_ACCESS_TOKEN"
6}).toString();
7const body = {
8 "chatId": "201234567890",
9 "message": {
10 "title": "Simple Menu",
11 "description": "Please choose an option",
12 "footer": "Thank you!",
13 "button": "Open Menu",
14 "sections": [
15 {
16 "title": "Main Options",
17 "rows": [
18 {
19 "title": "Option 1",
20 "rowId": "opt1",
21 "description": "Description for 1"
22 },
23 {
24 "title": "Option 2",
25 "rowId": "opt2"
26 }
27 ]
28 }
29 ]
30 },
31 "message.title": "Simple Menu",
32 "message.description": "Please select an option below",
33 "message.footer": "Powered by Wawp",
34 "message.button": "Open Menu",
35 "message.sections": "[{ title: 'Section 1', rows: [...] }]",
36 "reply_to": "false_111...AAAA"
37};
38
39fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
40 method: "POST",
41 headers: { "Content-Type": "application/json" },
42 body: JSON.stringify(body)
43})
44 .then(async (response) => {
45 if (response.ok) {
46 const data = await response.json();
47 console.log("Success:", data);
48 return data;
49 }
50
51 // Error Handling
52 if (response.status === 400) {
53 console.error("Error 400: طلب غير صالح - معاملات مطلوبة مفقودة");
54 }
55 if (response.status === 400) {
56 console.error("Error 400: طلب غير صالح - الرقم المستهدف في قائمة الحظر الخاصة بك");
57 }
58 if (response.status === 400) {
59 console.error("Error 400: طلب غير صالح - المستلم قام بإلغاء الاشتراك تلقائياً");
60 }
61 if (response.status === 400) {
62 console.error("Error 400: Bad Request - Invalid Number (Egypt)");
63 }
64 if (response.status === 400) {
65 console.error("Error 400: Bad Request - Invalid Number (Saudi Arabia)");
66 }
67 if (response.status === 400) {
68 console.error("Error 400: Bad Request - Invalid Number (Unknown)");
69 }
70 if (response.status === 400) {
71 console.error("Error 400: طلب غير صالح (تنسيق XML)");
72 }
73 if (response.status === 400) {
74 console.error("Error 400: طلب غير صالح (نص عادي)");
75 }
76 if (response.status === 401) {
77 console.error("Error 401: غير مصرح - مفتاح الوصول غير صالح أو مفقود");
78 }
79 if (response.status === 401) {
80 console.error("Error 401: غير مصرح (تنسيق XML)");
81 }
82 if (response.status === 404) {
83 console.error("Error 404: غير موجود - الجلسة غير موجودة");
84 }
85 if (response.status === 404) {
86 console.error("Error 404: غير موجود (تنسيق XML)");
87 }
88 if (response.status === 429) {
89 console.error("Error 429: طلبات كثيرة جداً - تم تجاوز حد المعدل");
90 }
91 if (response.status === 500) {
92 console.error("Error 500: خطأ في الخادم الداخلي - فشل غير متوقع");
93 }
94 if (response.status === 500) {
95 console.error("Error 500: خطأ في الخادم الداخلي (HTML)");
96 }
97 if (response.status === 502) {
98 console.error("Error 502: بوابة غير صالحة - فشل الاتصال بالخادم الرئيسي");
99 }
100 if (response.status === 502) {
101 console.error("Error 502: بوابة غير صالحة (تنسيق XML)");
102 }
103
104 const errorText = await response.text();
105 console.error(`Error ${response.status}: ${errorText}`);
106 })
107 .catch((error) => console.error("Network Error:", error));
عينات تفاعلية
Ln 107, Col 1javascript

الردود المتوقعة

استكشف كافة الردود والنتائج المحتملة من الخادم. قمنا بتوثيق كل كود حالة (Status Code) مع أمثلة للبيانات لتسهيل معالجة الأخطاء والنجاح.

تم إرسال الرسالة بنجاح
النوع:
application/json
object *
string *
object *
number *
boolean *
string *
string *
number *
string *
string *
string *
boolean *
number *
boolean *
boolean *
boolean *
boolean *
boolean *
array *
array *
array *
boolean *
array *

Example

{
"_data": {
  "id": {
    "fromMe": true,
    "remote": "000000000000@c.us",
    "id": "MSG_ID_123456",
    "_serialized": "true_000000000000@c.us_MSG_ID_123456"
    },
  "viewed": false,
  "body": "BASE64_IMAGE_DATA",
  "type": "image",
  "t": 1759108866,
  "from": {
    "server": "c.us",
    "user": "111111111111",
    "_serialized": "111111111111@c.us"
    },
  "to": {
    "server": "c.us",
    "user": "000000000000",
    "_serialized": "000000000000@c.us"
    },
  "ack": 0,
  "isNewMsg": true,
  "star": false,
  "kicNotified": false,
  "caption": "Here's your requested image.",
  "deprecatedMms3Url": "https://example.com/media-url",
  "directPath": "/media/direct/path/example",
  "mimetype": "image/jpeg",
  "filehash": "FILE_HASH_PLACEHOLDER",
  "encFilehash": "ENC_FILE_HASH_PLACEHOLDER",
  "size": 192487,
  "mediaKey": "MEDIA_KEY_PLACEHOLDER",
  "mediaKeyTimestamp": 1759108865,
  "streamable": false,
  "mediaHandle": null,
  "isFromTemplate": false,
  "pollInvalidated": false,
  "isSentCagPollCreation": false,
  "latestEditMsgKey": null,
  "latestEditSenderTimestampMs": null,
  "mentionedJidList": {
    },
  "groupMentions": {
    },
  "isEventCanceled": false,
  "eventInvalidated": false,
  "isVcardOverMmsDocument": false,
  "isForwarded": false,
  "isQuestion": false,
  "questionReplyQuotedMessage": null,
  "questionResponsesCount": 0,
  "readQuestionResponsesCount": 0,
  "labels": {
    },
  "hasReaction": false,
  "disappearingModeInitiator": "chat",
  "disappearingModeTrigger": "chat_settings",
  "productHeaderImageRejected": false,
  "lastPlaybackProgress": 0,
  "isDynamicReplyButtonsMsg": false,
  "isCarouselCard": false,
  "parentMsgId": null,
  "callSilenceReason": null,
  "isVideoCall": false,
  "callDuration": null,
  "callCreator": null,
  "callParticipants": null,
  "isCallLink": null,
  "callLinkToken": null,
  "isMdHistoryMsg": false,
  "stickerSentTs": 0,
  "lastUpdateFromServerTs": 0,
  "invokedBotWid": null,
  "bizBotType": null,
  "botResponseTargetId": null,
  "botPluginType": null,
  "botPluginReferenceIndex": null,
  "botPluginSearchProvider": null,
  "botPluginSearchUrl": null,
  "botPluginSearchQuery": null,
  "botPluginMaybeParent": false,
  "botReelPluginThumbnailCdnUrl": null,
  "botMessageDisclaimerText": null,
  "botMsgBodyType": null,
  "requiresDirectConnection": false,
  "bizContentPlaceholderType": null,
  "hostedBizEncStateMismatch": false,
  "senderOrRecipientAccountTypeHosted": false,
  "placeholderCreatedWhenAccountIsHosted": false,
  "galaxyFlowDisabled": false,
  "links": {
    }
  },
"mediaKey": "MEDIA_KEY_PLACEHOLDER",
"id": {
  "fromMe": true,
  "remote": "000000000000@c.us",
  "id": "MSG_ID_123456",
  "_serialized": "true_000000000000@c.us_MSG_ID_123456"
  },
"ack": 0,
"hasMedia": true,
"body": "Here's your requested image.",
"type": "image",
"timestamp": 1759108866,
"from": "111111111111@c.us",
"to": "000000000000@c.us",
"deviceType": "android",
"isForwarded": false,
"forwardingScore": 0,
"isStatus": false,
"isStarred": false,
"fromMe": true,
"hasQuotedMsg": false,
"hasReaction": false,
"vCards": {
  },
"mentionedIds": {
  },
"groupMentions": {
  },
"isGif": false,
"links": {
  }
}
طلب غير صالح - معاملات مطلوبة مفقودة
غير مصرح - مفتاح الوصول غير صالح أو مفقود
غير موجود - الجلسة غير موجودة
طلبات كثيرة جداً - تم تجاوز حد المعدل
خطأ في الخادم الداخلي - فشل غير متوقع
بوابة غير صالحة - فشل الاتصال بالخادم الرئيسي
الموضوع السابقإرسال مستند PDF عبر الواتساب
الموضوع التاليإرسال حدث (Event)

Command Palette

Search for a command to run...