Get Flow endpoint key state
The data_exchange endpoint keypair of ONE number: whether one exists (configured), its public half (publicKey), when Meta accepted it (uploadedAt), the base URL to register on a Flow (endpointUrl), and — the part that has no other symptom — what META says it holds (metaStatus).
⛔ metaStatus has FOUR values and UNKNOWN is not NOT_SET. VALID is Meta holding the key we hold; MISMATCH is Meta holding a DIFFERENT one, which silently breaks every data_exchange Flow on the number and raises no error on our side; NOT_SET is Meta answering that it holds no key; UNKNOWN is us failing to ask. Collapsing the last two makes an operator rotate over a transient Graph 500 — and rotating replaces the key Meta holds.
uploadedAt: null means a pair was generated here but Meta never accepted it. That is not the same as no key at all, and it is the state a repeat POST RESUMES rather than replaces.
The PRIVATE half is never in this payload. endpointUrl is a credential — it embeds the number’s endpoint path token — which is why the permission is flows:manage and deliberately not flows:read. Append the Flow id as a final segment to get the endpoint_uri of one Flow.
⚠️ The {id} in the path is CHECKED against the credential’s own number, never used to look one up. A path id that does not match answers 404 FLOW_NUMBER_NOT_FOUND — never 403, and the same body whether the id belongs to another tenant or to another of your own numbers, so a wrong guess learns nothing.
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 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"
}Authorizations
Your ps_ API key
Path Parameters
The id of the number the key is bound to — the id (or instance id) GET /v1/numbers returns. It is CHECKED against the credential's own number, never used to look one up.
Response
The number's data_exchange endpoint keypair as it stands here and at Meta. The private half is never in the payload
Was this page helpful?
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"
}