Update flow
curl --request PUT \
--url https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "agendamento_consulta_v2"
}
'import requests
url = "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}"
payload = { "name": "agendamento_consulta_v2" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'agendamento_consulta_v2'})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'agendamento_consulta_v2'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}"
payload := strings.NewReader("{\n \"name\": \"agendamento_consulta_v2\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"agendamento_consulta_v2\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"agendamento_consulta_v2\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1122334455667788",
"name": "agendamento_consulta",
"categories": [
"APPOINTMENT_BOOKING"
],
"status": "PUBLISHED",
"endpoint_uri": null,
"validation_errors": []
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Flows (WhatsApp)
Update flow
Change the name, the categories or the flow_json
PUT
/
whatsapp
/
businesses
/
{wabaId}
/
flows
/
{flowId}
Update flow
curl --request PUT \
--url https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "agendamento_consulta_v2"
}
'import requests
url = "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}"
payload = { "name": "agendamento_consulta_v2" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'agendamento_consulta_v2'})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'agendamento_consulta_v2'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}"
payload := strings.NewReader("{\n \"name\": \"agendamento_consulta_v2\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"agendamento_consulta_v2\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"agendamento_consulta_v2\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1122334455667788",
"name": "agendamento_consulta",
"categories": [
"APPOINTMENT_BOOKING"
],
"status": "PUBLISHED",
"endpoint_uri": null,
"validation_errors": []
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Concepts
Updates an existing flow. Every field is optional — only the ones you send change.A
PUBLISHED flow does not accept flow_json changes. To change the screens of an already published flow, create a new one and deprecate the old one with Deprecate flow.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
WABA ID (obtained via List WABAs)
Example:
"428083093730937"
Flow ID (obtained via List flows)
Example:
"1122334455667788"
Body
application/json
Flow name
Flow categories (Meta uses them during review)
Available options:
SIGN_UP, SIGN_IN, APPOINTMENT_BOOKING, LEAD_GENERATION, CONTACT_US, CUSTOMER_SUPPORT, SURVEY, OTHER Screen definition in JSON, sent as a string
Your endpoint URL, required only for flows using data_exchange
Response
Flow updated
Flow ID
Flow name
Flow categories (Meta uses them during review)
Available options:
SIGN_UP, SIGN_IN, APPOINTMENT_BOOKING, LEAD_GENERATION, CONTACT_US, CUSTOMER_SUPPORT, SURVEY, OTHER Publication status
Available options:
DRAFT, PUBLISHED, DEPRECATED, BLOCKED, THROTTLED Your endpoint URL, required only for flows using data_exchange
Screen definition in JSON, sent as a string
Validation issues returned by Meta
Show child attributes
Show child attributes