Deprecate flow
curl --request POST \
--url https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate', 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}/deprecate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/deprecate"
req, _ := http.NewRequest("POST", 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.post("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "1122334455667788",
"name": "agendamento_consulta",
"categories": [
"APPOINTMENT_BOOKING"
],
"status": "DEPRECATED",
"endpoint_uri": null,
"validation_errors": []
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Flows (WhatsApp)
Deprecate flow
Stop accepting new openings of the flow
POST
/
whatsapp
/
businesses
/
{wabaId}
/
flows
/
{flowId}
/
deprecate
Deprecate flow
curl --request POST \
--url https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate', 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}/deprecate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/deprecate"
req, _ := http.NewRequest("POST", 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.post("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omni.z-api.io/whatsapp/businesses/{wabaId}/flows/{flowId}/deprecate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "1122334455667788",
"name": "agendamento_consulta",
"categories": [
"APPOINTMENT_BOOKING"
],
"status": "DEPRECATED",
"endpoint_uri": null,
"validation_errors": []
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Concepts
Marks the flow asDEPRECATED. It stops accepting new openings, but sessions already running go through to the end.
Use it when you publish a new version of the flow and want to retire the old one without cutting off people mid-form.
Deprecating cannot be undone.
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"
Response
Operation completed successfully
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