Detalhar flow
curl --request GET \
--url https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "1122334455667788",
"name": "agendamento_consulta",
"categories": [
"APPOINTMENT_BOOKING"
],
"status": "PUBLISHED",
"endpoint_uri": null,
"validation_errors": [],
"flow_json": "{\"version\": \"7.0\", \"routing_model\": {\"WELCOME\": [\"DONE\"], \"DONE\": []}, \"screens\": [{\"id\": \"WELCOME\", \"title\": \"Agendamento\", \"layout\": {\"type\": \"SingleColumnLayout\", \"children\": [{\"type\": \"TextHeading\", \"text\": \"Escolha um horario\"}, {\"type\": \"Form\", \"name\": \"form\", \"children\": [{\"type\": \"TextInput\", \"name\": \"nome\", \"label\": \"Seu nome\", \"input-type\": \"text\", \"required\": true}, {\"type\": \"DatePicker\", \"name\": \"data\", \"label\": \"Data\"}, {\"type\": \"Footer\", \"label\": \"Continuar\", \"on-click-action\": {\"name\": \"navigate\", \"next\": {\"type\": \"screen\", \"name\": \"DONE\"}, \"payload\": {}}}]}]}}, {\"id\": \"DONE\", \"title\": \"Pronto\", \"terminal\": true, \"success\": true, \"layout\": {\"type\": \"SingleColumnLayout\", \"children\": [{\"type\": \"TextBody\", \"text\": \"Agendamento confirmado.\"}, {\"type\": \"Footer\", \"label\": \"Fechar\", \"on-click-action\": {\"name\": \"complete\", \"payload\": {}}}]}}]}"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Flows (WhatsApp)
Detalhar flow
Busque um flow e suas pendências de validação
GET
/
whatsapp
/
businesses
/
{wabaId}
/
flows
/
{flowId}
Detalhar flow
curl --request GET \
--url https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "1122334455667788",
"name": "agendamento_consulta",
"categories": [
"APPOINTMENT_BOOKING"
],
"status": "PUBLISHED",
"endpoint_uri": null,
"validation_errors": [],
"flow_json": "{\"version\": \"7.0\", \"routing_model\": {\"WELCOME\": [\"DONE\"], \"DONE\": []}, \"screens\": [{\"id\": \"WELCOME\", \"title\": \"Agendamento\", \"layout\": {\"type\": \"SingleColumnLayout\", \"children\": [{\"type\": \"TextHeading\", \"text\": \"Escolha um horario\"}, {\"type\": \"Form\", \"name\": \"form\", \"children\": [{\"type\": \"TextInput\", \"name\": \"nome\", \"label\": \"Seu nome\", \"input-type\": \"text\", \"required\": true}, {\"type\": \"DatePicker\", \"name\": \"data\", \"label\": \"Data\"}, {\"type\": \"Footer\", \"label\": \"Continuar\", \"on-click-action\": {\"name\": \"navigate\", \"next\": {\"type\": \"screen\", \"name\": \"DONE\"}, \"payload\": {}}}]}]}}, {\"id\": \"DONE\", \"title\": \"Pronto\", \"terminal\": true, \"success\": true, \"layout\": {\"type\": \"SingleColumnLayout\", \"children\": [{\"type\": \"TextBody\", \"text\": \"Agendamento confirmado.\"}, {\"type\": \"Footer\", \"label\": \"Fechar\", \"on-click-action\": {\"name\": \"complete\", \"payload\": {}}}]}}]}"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Conceituação
Retorna um flow específico, incluindo oflow_json completo e o array validation_errors com o que a Meta apontou.
Com sync=true, o estado é buscado direto na Meta antes de responder — mais lento, mas atualizado.
O
flowId é obtido no retorno de Criar flow ou Listar flows.Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parâmetros de caminho
ID do WABA (obtido via Listar WABAs)
Exemplo:
"428083093730937"
ID do flow (obtido via Listar flows)
Exemplo:
"1122334455667788"
Parâmetros de consulta
Quando true, busca o estado do flow direto na Meta antes de responder
Exemplo:
true
Resposta
Operação realizada com sucesso
ID do flow
Nome do flow
Categorias do flow (a Meta usa na revisão)
Opções disponíveis:
SIGN_UP, SIGN_IN, APPOINTMENT_BOOKING, LEAD_GENERATION, CONTACT_US, CUSTOMER_SUPPORT, SURVEY, OTHER Status de publicação
Opções disponíveis:
DRAFT, PUBLISHED, DEPRECATED, BLOCKED, THROTTLED URL do seu endpoint, obrigatória apenas para flows com data_exchange
Definição das telas em JSON, enviada como string
Pendências de validação devolvidas pela Meta
Show child attributes
Show child attributes