endpointUri
when you create a Flow or update its metadata.
This guide describes the plain JSON requests YCloud forwards to your endpoint.
It does not describe a direct connection to Meta’s encrypted data endpoint.
See Manage WhatsApp Flows
for Flow creation, preview, publishing, and lifecycle management.
Before you begin
- Expose a public HTTPS endpoint that accepts
POSTrequests. - Return JSON within 15 seconds.
- Define the screens and their data fields in your Flow JSON.
- Generate a
flow_tokenwhen sending the Flow message so you can correlate the interaction with your application session. - Use server-side validation before accepting submitted data.
Request flow
- The user opens or interacts with a Flow in WhatsApp.
- YCloud forwards a JSON request to your configured endpoint.
- Your endpoint reads
actionand processes the request. - Your JSON response selects a screen and supplies its data, or completes the Flow.
Handle a health check
A health check containsaction: ping:
Handle an error notification
Error notifications includedata.error and data.error_message. They can use
INIT or data_exchange as the action. Check for this error data before routing
ordinary requests by action.
Handle data exchange
Handle each action according to the screens you have defined:
Navigate to a screen
screen must exist in your Flow JSON. Its declared data schema must accept
the fields in data.
Return a validation error
Stay on the current screen and return an error field that your screen displays:Complete the Flow
Returnscreen: SUCCESS with extension_message_response.params. Include the
original flow_token and any additional result fields you want in the Flow
response message.
Implementation example
This Express example handles all three request categories. Match the screen IDs and response fields to your own Flow JSON. Mount any endpoint access controls used by your deployment before this handler.Verify the endpoint
Testping, error acknowledgement, INIT without screen or data, valid
and invalid submissions, BACK, and SUCCESS completion. Check the 15-second
response limit and confirm that the completion webhook carries your original
flow_token. Preview the Flow before publishing it.
