Zalo OA icon

Zalo OA

Tương tác với Zalo Official Account API

Zalo OA → Cập Nhật Menu OA

AI-generated

Summary

Update the Zalo Official Account (OA) menu by setting a list of menu items, each specifying a title, action type, and corresponding payload.

Inputs

  • Menu Items (required) — Array of menu items defining the OA menu structure. Each menu item includes a 'Tên Menu' (title) string, a 'Loại Menu' (type) option specifying the action type (Open URL, Send Message, Call Phone, or Open App), and a 'Giá Trị' (payload) string which is the value corresponding to the menu action (such as URL or phone number).

Output shape

a single JSON object representing the API response from posting the updated menu items to the Zalo OA API endpoint.

The operation sends a POST request to the Zalo OA API /menu endpoint with the constructed menu items. The response typically includes information about success or failure of the menu update. There is one output item per input item, paired by index. Errors returned by the API are included in the output JSON.

Examples

Example 1: Update the OA menu with two items: one that opens a URL, and another that sends a predefined message.

Set 'Menu Items' with two entries: the first with title 'Home', type 'Mở URL' (oa.open.url) and payload as the target URL; the second with title 'Support', type 'Gửi Tin Nhắn' (oa.query.show) and payload as the message to send.

Discussion