List flows
List all WhatsApp Flows for the Business Account (WABA) associated with the given account.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
WhatsApp social account ID
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.listWhatsAppFlows({ query: { accountId: 'account_abc123', },});console.log(data);{
"success": true,
"flows": [
{
"id": "string",
"name": "string",
"status": "DRAFT",
"categories": [
"string"
],
"validation_errors": [
{}
],
"version": 0,
"lineageId": "string"
}
]
}{
"error": "Unauthorized"
}Move a number to another profile PATCH
Move a provisioned number to a different profile. A number is not a single record. Alongside the number itself there are hidden telephony owner accounts (platform `phone`, plus `sms` when SMS is enabled) and, once WhatsApp is connected, the `whatsapp` account. They all carry a profileId and this endpoint moves them together. Use this instead of `PATCH /v1/accounts/{accountId}`: that one moves the social account only and leaves the number itself pinned to its original profile, which splits the number across two profiles. Connecting a Zernio-provisioned number from any profile but its own is rejected with a `409` (`WHATSAPP_NUMBER_PINNED_TO_PROFILE`). This endpoint is how you re-home the number first, so it can then be connected from the new profile. `id` is the number record id from `GET /v1/phone-numbers`, not an account id. A profile holds at most one account per platform, so the destination must be free of every platform this number occupies.
Create flow POST
Create a new WhatsApp Flow in DRAFT status. Optionally clone an existing flow. After creating, upload a Flow JSON definition, then publish to make it sendable.