Sync Flows from Meta
Pulls the Flow catalogue of the key’s WABA from Meta into Pilot Status now, instead of waiting for the hourly sync — useful after creating or editing Flows directly in Meta’s Business Manager. created and updated count local rows, seen the Flows Meta listed. truncated: true means the WABA has more Flows than one sync reads (20 pages of 100); the rest arrive on the next run — it is not an error. Permission flows:manage.
It takes no fields: send no body or {}. A body that is not a JSON object is 400 FLOW_BODY_INVALID; whatsappNumberId / wabaId / metaWabaId are 400 FLOW_NUMBER_FROM_KEY; any other field is 400 FLOW_UNKNOWN_FIELDS.
⚠️ One sync per number at a time. A second request while one is running answers 429 FLOW_SYNC_IN_PROGRESS with Retry-After: 120.
Requires a number-scoped key. A tenant-scoped key must name the number with the x-whatsapp-number-id header, or it gets 403 TENANT_SCOPE_NOT_ALLOWED.
curl --request POST \
--url https://pilotstatus.com.br/v1/flows/meta/sync \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/flows/meta/sync"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/flows/meta/sync', 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://pilotstatus.com.br/v1/flows/meta/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/flows/meta/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/v1/flows/meta/sync")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/flows/meta/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"created": 1,
"updated": 4,
"seen": 5,
"truncated": false
}{
"error": "Corpo inválido: este endpoint não recebe corpo. Envie nenhum corpo, ou um objeto JSON vazio. Um corpo truncado não é tratado como corpo vazio.",
"errorEN": "Invalid body: this endpoint takes no body. Send no body at all, or an empty JSON object. A truncated body is not treated as an empty one.",
"code": "FLOW_BODY_INVALID"
}{
"error": "Unauthorized"
}{
"error": "This endpoint acts on a single WhatsApp number: send the x-whatsapp-number-id header naming the number to act on (its id or instance id from GET /v1/numbers) | Este endpoint atua sobre um único número de WhatsApp: envie o header x-whatsapp-number-id indicando o número desejado (o id dele ou o id da instância, obtidos em GET /v1/numbers)",
"code": "TENANT_SCOPE_NOT_ALLOWED"
}{
"error": "Flows existem apenas em números Meta (API Oficial). O número desta chave não é Meta ou não tem uma WABA associada — use uma chave de um número Meta.",
"errorEN": "Flows only exist on Meta (Cloud API) numbers. This key's number is not a Meta number, or has no WABA behind it — use a key bound to a Meta number.",
"code": "FLOW_REQUIRES_META_NUMBER"
}{
"error": "Já existe uma sincronia de Flows em andamento para o número desta chave. Tente de novo em até 120 segundos (o cabeçalho Retry-After traz o mesmo número). Sincronizar duas vezes o mesmo número em paralelo faz as duas falharem.",
"errorEN": "A Flows sync is already running for this key's number. Try again in up to 120 seconds (the Retry-After header carries the same number). Syncing one number twice in parallel makes both attempts fail.",
"code": "FLOW_SYNC_IN_PROGRESS"
}{
"error": "Erro interno do servidor.",
"errorEN": "Internal server error.",
"code": "INTERNAL_ERROR"
}Was this page helpful?
curl --request POST \
--url https://pilotstatus.com.br/v1/flows/meta/sync \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/flows/meta/sync"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/flows/meta/sync', 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://pilotstatus.com.br/v1/flows/meta/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/flows/meta/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/v1/flows/meta/sync")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/flows/meta/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"created": 1,
"updated": 4,
"seen": 5,
"truncated": false
}{
"error": "Corpo inválido: este endpoint não recebe corpo. Envie nenhum corpo, ou um objeto JSON vazio. Um corpo truncado não é tratado como corpo vazio.",
"errorEN": "Invalid body: this endpoint takes no body. Send no body at all, or an empty JSON object. A truncated body is not treated as an empty one.",
"code": "FLOW_BODY_INVALID"
}{
"error": "Unauthorized"
}{
"error": "This endpoint acts on a single WhatsApp number: send the x-whatsapp-number-id header naming the number to act on (its id or instance id from GET /v1/numbers) | Este endpoint atua sobre um único número de WhatsApp: envie o header x-whatsapp-number-id indicando o número desejado (o id dele ou o id da instância, obtidos em GET /v1/numbers)",
"code": "TENANT_SCOPE_NOT_ALLOWED"
}{
"error": "Flows existem apenas em números Meta (API Oficial). O número desta chave não é Meta ou não tem uma WABA associada — use uma chave de um número Meta.",
"errorEN": "Flows only exist on Meta (Cloud API) numbers. This key's number is not a Meta number, or has no WABA behind it — use a key bound to a Meta number.",
"code": "FLOW_REQUIRES_META_NUMBER"
}{
"error": "Já existe uma sincronia de Flows em andamento para o número desta chave. Tente de novo em até 120 segundos (o cabeçalho Retry-After traz o mesmo número). Sincronizar duas vezes o mesmo número em paralelo faz as duas falharem.",
"errorEN": "A Flows sync is already running for this key's number. Try again in up to 120 seconds (the Retry-After header carries the same number). Syncing one number twice in parallel makes both attempts fail.",
"code": "FLOW_SYNC_IN_PROGRESS"
}{
"error": "Erro interno do servidor.",
"errorEN": "Internal server error.",
"code": "INTERNAL_ERROR"
}