How it works
- User opens the flow in WhatsApp
- Meta sends an encrypted request to Kapso
- Kapso decrypts and forwards to your function
- Your function returns screen data
- Kapso encrypts and returns to Meta
- User sees the dynamic content
Setup requirements
Before using data endpoints:- WhatsApp phone number - Set in the Info tab
- Flows encryption - One-time setup per phone number (Kapso handles the key exchange)
- Function - Your code that returns screen data
Share a function across flows
Attach an existing deployed function using the Platform API:flow.id or
flow.meta_flow_id in the request payload to distinguish flows.
Changing or deploying the shared function affects all flows attached to it,
including changes made through a flow’s data endpoint code API. Attaching a new
function replaces the association without deleting the old function. A missing,
null, or empty function_id is rejected; this endpoint does not detach functions.
The flow’s function_logs and function_invocations endpoints return activity for
the entire attached function, including calls from other flows sharing it. They
do not filter activity to the requested flow.
For published flows, Kapso attempts to republish automatically. If republishing
fails, the request still returns HTTP 200 with data.warning: the association was
saved, but you need to republish the flow manually.
Request format
Kapso sends this payload to your function:data_exchange object contains Meta’s original payload with the current screen and any user-submitted data.

