Upload flow JSON
Upload or update the Flow JSON for a DRAFT flow. The Flow JSON defines all screens, components (text inputs, dropdowns, date pickers, etc.), and navigation.
Meta validates the JSON on upload and returns any validation errors. See: https://developers.facebook.com/docs/whatsapp/flows/reference/flowjson
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Flow ID
WhatsApp social account ID
The Flow JSON content. Pass as a JSON object or a JSON string.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.whatsappflows.uploadWhatsAppFlowJson({ path: { flowId: 'flow_abc123', }, body: { accountId: 'account_abc123', flow_json: {}, },});console.log(data);{
"success": true,
"validation_errors": [
{
"error": "string",
"error_type": "string",
"message": "string",
"line_start": 0,
"line_end": 0,
"column_start": 0,
"column_end": 0
}
]
}{
"error": "Unauthorized"
}Get flow JSON asset GET
Get the flow JSON asset metadata, including a temporary download URL for the Flow JSON file.
Get flow preview URL GET
Get Meta's public web-preview URL for a flow (drafts included), embeddable as an interactive iframe. The link is reused across calls (valid ~30 days); pass invalidate=true to mint a fresh one (the previous link stops working).