Obtener estado de la clave del endpoint de Flow
El par de claves del endpoint data_exchange de UN número: si existe (configured), su mitad pública (publicKey), cuándo la aceptó Meta (uploadedAt), la URL base que se registra en un Flow (endpointUrl) y (la parte que no tiene ningún otro síntoma) lo que META dice tener (metaStatus).
⛔ metaStatus tiene CUATRO valores y UNKNOWN no es NOT_SET. VALID es Meta con la misma clave que tenemos nosotros; MISMATCH es Meta con una clave DISTINTA, lo que rompe en silencio todos los Flows data_exchange del número y no genera ningún error de nuestro lado; NOT_SET es Meta respondiendo que no tiene ninguna clave; UNKNOWN es que no logramos consultarle. Confundir los dos últimos hace que un operador rote la clave por un 500 transitorio de la Graph, y rotar reemplaza la clave que tiene Meta.
uploadedAt: null significa que aquí se generó un par pero Meta nunca lo aceptó. No es lo mismo que no tener ninguna clave, y es el estado que un POST repetido RETOMA en lugar de reemplazar.
La mitad PRIVADA nunca está en este payload. endpointUrl es una credencial (incluye el token de ruta del endpoint del número), por eso el permiso es flows:manage y, a propósito, no flows:read. Agrega el id del Flow como segmento final para obtener el endpoint_uri de un Flow.
⚠️ El {id} de la ruta se VERIFICA contra el propio número de la credencial, nunca se usa para buscar uno. Un id de ruta que no coincide responde 404 FLOW_NUMBER_NOT_FOUND, nunca 403, y con el mismo cuerpo ya sea que el id pertenezca a otro tenant o a otro de tus propios números, así que un intento equivocado no revela nada.
Requiere una key limitada a un número. Una key de alcance tenant debe indicar el número con el encabezado x-whatsapp-number-id, o recibe 403 TENANT_SCOPE_NOT_ALLOWED.
curl --request GET \
--url https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key', 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/numbers/{id}/flow-endpoint-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/numbers/{id}/flow-endpoint-key"
req, _ := http.NewRequest("GET", 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.get("https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"configured": true,
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----\n",
"uploadedAt": "2026-09-02T10:00:00.000Z",
"endpointUrl": "https://pilotstatus.com.br/api/flows/endpoint/AbC123...",
"metaStatus": "VALID"
}{
"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": "Número não encontrado para esta chave. Esta rota atua sobre o número ao qual a chave está vinculada — use a chave do número em questão, ou o header x-whatsapp-number-id se a chave for de conta.",
"errorEN": "Number not found for this key. This route acts on the number the key is bound to — use that number's key, or the x-whatsapp-number-id header if the key is an account-wide one.",
"code": "FLOW_NUMBER_NOT_FOUND"
}{
"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": "Too many requests"
}{
"error": "Erro interno do servidor.",
"errorEN": "Internal server error.",
"code": "INTERNAL_ERROR"
}Parámetros de ruta
Respuesta
El par de claves del endpoint data_exchange del número tal como está aquí y en Meta. La mitad privada nunca está en el payload
¿Esta página le ayudó?
curl --request GET \
--url https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key', 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/numbers/{id}/flow-endpoint-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/numbers/{id}/flow-endpoint-key"
req, _ := http.NewRequest("GET", 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.get("https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/numbers/{id}/flow-endpoint-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"configured": true,
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----\n",
"uploadedAt": "2026-09-02T10:00:00.000Z",
"endpointUrl": "https://pilotstatus.com.br/api/flows/endpoint/AbC123...",
"metaStatus": "VALID"
}{
"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": "Número não encontrado para esta chave. Esta rota atua sobre o número ao qual a chave está vinculada — use a chave do número em questão, ou o header x-whatsapp-number-id se a chave for de conta.",
"errorEN": "Number not found for this key. This route acts on the number the key is bound to — use that number's key, or the x-whatsapp-number-id header if the key is an account-wide one.",
"code": "FLOW_NUMBER_NOT_FOUND"
}{
"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": "Too many requests"
}{
"error": "Erro interno do servidor.",
"errorEN": "Internal server error.",
"code": "INTERNAL_ERROR"
}