OverviewPlatformsAPI ReferenceResources
WhatsApp

Upload flow JSON

PUThttps://zernio.com/api/v1/whatsapp/flows/{flowId}/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

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

flowIdstringRequired

Flow ID

Body

application/json

What every request needs

accountIdstringRequired

WhatsApp account ID

flow_jsonone of 2 typesRequired

The Flow JSON content. Pass as a JSON object or a JSON string.

Responses

Success· the request worked

Errors· the request failed

PUT/v1/whatsapp/flows/{flowId}/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: '507f1f77bcf86cd799439011',    flow_json: {      version: '6.0',      screens: [        {          id: 'LEAD_FORM',          title: 'Get a Quote',          terminal: true,          success: true,          layout: {            type: 'SingleColumnLayout',            children: [              {                type: 'TextInput',                name: 'full_name',                label: 'Full Name',                required: true,                'input-type': 'text',              },              {                type: 'TextInput',                name: 'email',                label: 'Email',                required: true,                'input-type': 'email',              },              {                type: 'Footer',                label: 'Submit',                'on-click-action': {                  name: 'complete',                  payload: {                    full_name: '${form.full_name}',                    email: '${form.email}',                  },                },              },            ],          },        },      ],    },  },});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    }  ]}
OpenAPI specification
Was this page helpful?