logo

updateMenuCell β€” Write to Component Cells

Writes values into cells of a component screen for one user, in real time.
πŸ’‘ All the cells in a single call must belong to the same menu. To touch two menus, send two calls.
Use it to pre-fill forms with known user data, load dropdown options on demand, or push values driven by your backend.
⚠️ Components are designed in the nandbox App Builder and cannot be created over the API. This method only writes into screens that already exist.

Request

method is "updateMenuCell".
Field
Type
Required
Description
cells
Array of Cell
Yes
The cells to write, with the properties to set on each.
menu_id
String
Yes
The component screen to update. Must be an existing Custom Component menu in your app.
user_id
String
Yes
The user whose screen you are updating.
app_id
String
Yes
The app the component belongs to.
reference
String
Yes
Your id for this request. Echoed back in the acknowledgement.
disable_notification
Boolean
Optional
Suppress the notification for this update.

Response

messageAck

Field
Type
Returned
Description
method
String
Yes
"messageAck"
ack
Object
Yes
Carries reference, message_id, date, and gmid.

SDKs

SDK
Call
Callback
Java
api.updateMenuCell(userId, menuId, appId, cells, reference, disableNotification);
onMessagAckCallback(MessageAck msgAck)
JavaScript
api.updateMenuCell(userId, menuId, appId, cells, reference, disableNotification);
onMessagAckCallback(msgAck)
Python
napi.update_menu_cell(user_id, menu_id, app_id, cells, reference, disable_notification)
on_message_ack_callback(self, msg_ack)
cells is raw JSON in all three SDKs, so build it as a JSON array rather than with a DTO.

Example

Request

json
{ "method": "updateMenuCell", "app_id": "90090684341943480", "user_id": "90089584793718478", "menu_id": "uV1kyCyvseaar5j", "reference": "123452342", "cells": [ { "cell_id": "b_MwoZavDgnumnsYt", "callback": "b_MwoZavDgnumnsYt", "form": "output", "style": "balanced", "cell_order": 0, "version": "RnB2nis36P1VTH9Z", "headline": "Hello!", "subhead": "World!", "body": "Hi!", "font_size": { "headline": "md", "subhead": "md", "body": "md" }, "text_align": { "headline": "center", "subhead": "center", "body": "center" } } ] }
java
String cellsJson = "[ ... the cells array shown above ... ]"; JSONArray cells = (JSONArray) new JSONParser(-1).parse(cellsJson); api.updateMenuCell( "90089584793718478", "uV1kyCyvseaar5j", "90090684341943480", cells, "123452342", null);
javascript
const cells = JSON.parse("[ ... the cells array shown above ... ]"); api.updateMenuCell( "90089584793718478", "uV1kyCyvseaar5j", "90090684341943480", cells, "123452342", null );
python
import json cells = json.loads("[ ... the cells array shown above ... ]") napi.update_menu_cell( user_id="90089584793718478", menu_id="uV1kyCyvseaar5j", app_id="90090684341943480", cells=cells, reference="123452342", disable_notification=None, )

Response

json
{ "method": "messageAck", "ack": { "reference": 123452342, "message_id": "d1_GNYzeUL5126172", "date": 1744222895009, "gmid": null } }