Register Flow endpoint at Meta
Registers OUR proxy as this Flow’s endpoint_uri at Meta — the deliberate act the PUT on this same resource refuses to perform. Without it data_exchange is unreachable: Meta refuses to publish a Flow whose routing model needs an endpoint, with “Publishing without specifying ‘endpoint_uri’ is forbidden”.
⛔ It is a different verb and not a side effect of the PUT because the two acts have different subjects. Saving a destination is the tenant describing THEIR webhook; this is us telling META to route the Flow through us. Fusing them would mean a tenant who runs their own Flow endpoint loses every exchange the next time they fix a typo in a URL.
⚠️ The body is OPTIONAL — unlike PUT, this verb has no required field, so no body, an empty string and {} are all accepted. A truncated body is still refused (400 FLOW_BODY_INVALID), and confirmOverwrite is the only field accepted.
⛔ confirmOverwrite is not a formality. The current endpoint_uri is read LIVE from the Graph — not from metaEndpointUri, which an hourly sync writes and which is therefore silent about a URI registered in the last hour. If the Flow already points somewhere else, registering takes every exchange away from whoever answers today, so the default is 409 FLOW_ENDPOINT_URI_WOULD_OVERWRITE — whose body carries a FOURTH top-level field, currentEndpointUri, naming the endpoint that would be displaced. Ours is never echoed: it embeds the number’s endpoint path token. A non-boolean is refused and never coerced (400 FLOW_ENDPOINT_CONFIRM_INVALID), because "false" read as truthy would take over a live endpoint on a request whose author believed they had declined.
Idempotent: a Flow already pointing at us answers 200 without a Graph write, and metaEndpointUri is refreshed either way. A number with no endpoint keypair is refused with 422 FLOW_ENDPOINT_NUMBER_HAS_NO_KEY — registering anyway tells Meta to encrypt for a keypair that does not exist, and every exchange of the published Flow would 421. Permission flows:manage.
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/{id}/endpoint \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"confirmOverwrite": true
}
'import requests
url = "https://pilotstatus.com.br/v1/flows/{id}/endpoint"
payload = { "confirmOverwrite": True }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirmOverwrite: true})
};
fetch('https://pilotstatus.com.br/v1/flows/{id}/endpoint', 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/{id}/endpoint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'confirmOverwrite' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/flows/{id}/endpoint"
payload := strings.NewReader("{\n \"confirmOverwrite\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://pilotstatus.com.br/v1/flows/{id}/endpoint")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"confirmOverwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/flows/{id}/endpoint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirmOverwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"flowId": "cmf1a2b3c4d5e6f7g8h9i0j1",
"url": "https://hooks.acme.com/flows/data-exchange",
"hasSecret": true,
"endpointUri": "https://pilotstatus.com.br/api/flows/endpoint/AbC123.../1122334455",
"metaEndpointUri": "https://pilotstatus.com.br/api/flows/endpoint/AbC123.../1122334455",
"drift": false,
"numberHasKey": true,
"numberKeyUploadedAt": "2026-09-01T18:04:00.000Z",
"warnings": []
}{
"error": "confirmOverwrite deve ser um booleano (true ou false).",
"errorEN": "confirmOverwrite must be a boolean (true or false).",
"code": "FLOW_ENDPOINT_CONFIRM_INVALID"
}{
"error": "Unauthorized"
}{
"error": "Tenant-scoped keys cannot call number endpoints",
"code": "TENANT_SCOPE_NOT_ALLOWED"
}{
"error": "Flow não encontrado para o número desta chave.",
"errorEN": "Flow not found for this key's number.",
"code": "FLOW_NOT_FOUND"
}{
"error": "A Meta já aponta este Flow para outro endpoint. Registrar o nosso passaria TODAS as trocas deste Flow para a Pilot Status. Reenvie com confirmOverwrite para assumir.",
"errorEN": "Meta already points this Flow at another endpoint. Registering ours would take EVERY exchange of this Flow over to Pilot Status. Re-send with confirmOverwrite to take it over.",
"code": "FLOW_ENDPOINT_URI_WOULD_OVERWRITE",
"currentEndpointUri": "https://flows.acme.com/data-exchange"
}{
"error": "Este número ainda não tem chave de endpoint de Flow, por isso não existe URL para registrar na Meta. Gere a chave do número primeiro.",
"errorEN": "This number has no Flow endpoint key yet, so there is no URL to register at Meta. Generate the number's key first.",
"code": "FLOW_ENDPOINT_NUMBER_HAS_NO_KEY"
}{
"error": "Too many requests"
}{
"error": "Erro interno do servidor.",
"errorEN": "Internal server error.",
"code": "INTERNAL_ERROR"
}Authorizations
Your ps_ API key
Path Parameters
The local id of the Flow — the id field GET /v1/flows returns, never metaFlowId.
Body
Consent to displace an endpoint_uri that is not ours. Must be a real boolean — the string "false" is refused, never coerced. Unnecessary when Meta holds no endpoint_uri, or already holds ours.
true
Response
Meta now points this Flow at our proxy. metaEndpointUri is refreshed from what was just written, not from the hourly mirror. No secret: registering mints nothing
Was this page helpful?
curl --request POST \
--url https://pilotstatus.com.br/v1/flows/{id}/endpoint \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"confirmOverwrite": true
}
'import requests
url = "https://pilotstatus.com.br/v1/flows/{id}/endpoint"
payload = { "confirmOverwrite": True }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirmOverwrite: true})
};
fetch('https://pilotstatus.com.br/v1/flows/{id}/endpoint', 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/{id}/endpoint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'confirmOverwrite' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/flows/{id}/endpoint"
payload := strings.NewReader("{\n \"confirmOverwrite\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://pilotstatus.com.br/v1/flows/{id}/endpoint")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"confirmOverwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/flows/{id}/endpoint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirmOverwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"flowId": "cmf1a2b3c4d5e6f7g8h9i0j1",
"url": "https://hooks.acme.com/flows/data-exchange",
"hasSecret": true,
"endpointUri": "https://pilotstatus.com.br/api/flows/endpoint/AbC123.../1122334455",
"metaEndpointUri": "https://pilotstatus.com.br/api/flows/endpoint/AbC123.../1122334455",
"drift": false,
"numberHasKey": true,
"numberKeyUploadedAt": "2026-09-01T18:04:00.000Z",
"warnings": []
}{
"error": "confirmOverwrite deve ser um booleano (true ou false).",
"errorEN": "confirmOverwrite must be a boolean (true or false).",
"code": "FLOW_ENDPOINT_CONFIRM_INVALID"
}{
"error": "Unauthorized"
}{
"error": "Tenant-scoped keys cannot call number endpoints",
"code": "TENANT_SCOPE_NOT_ALLOWED"
}{
"error": "Flow não encontrado para o número desta chave.",
"errorEN": "Flow not found for this key's number.",
"code": "FLOW_NOT_FOUND"
}{
"error": "A Meta já aponta este Flow para outro endpoint. Registrar o nosso passaria TODAS as trocas deste Flow para a Pilot Status. Reenvie com confirmOverwrite para assumir.",
"errorEN": "Meta already points this Flow at another endpoint. Registering ours would take EVERY exchange of this Flow over to Pilot Status. Re-send with confirmOverwrite to take it over.",
"code": "FLOW_ENDPOINT_URI_WOULD_OVERWRITE",
"currentEndpointUri": "https://flows.acme.com/data-exchange"
}{
"error": "Este número ainda não tem chave de endpoint de Flow, por isso não existe URL para registrar na Meta. Gere a chave do número primeiro.",
"errorEN": "This number has no Flow endpoint key yet, so there is no URL to register at Meta. Generate the number's key first.",
"code": "FLOW_ENDPOINT_NUMBER_HAS_NO_KEY"
}{
"error": "Too many requests"
}{
"error": "Erro interno do servidor.",
"errorEN": "Internal server error.",
"code": "INTERNAL_ERROR"
}