> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilotstatus.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Flow endpoint config

> The `data_exchange` wiring of ONE Flow: where we forward the decrypted exchange (`url`), whether a signing secret exists (`hasSecret`), OUR proxy URL for this Flow (`endpointUri`), what Meta has registered (`metaEndpointUri`), whether the two DIVERGE (`drift`), and whether the number holds an encryption keypair at all (`numberHasKey`).

⭐ `numberHasKey: false` is the field this route exists for. Without a keypair on the number Meta has nothing to encrypt with, so the call never reaches the proxy, so the destination is never used — and nothing else on either side reports it. `warnings` carries the same facts as stable codes: `FLOW_ENDPOINT_NO_DESTINATION`, `FLOW_ENDPOINT_NUMBER_HAS_NO_KEY`, `FLOW_ENDPOINT_KEY_NOT_AT_META`, `FLOW_ENDPOINT_META_URI_UNKNOWN`, `FLOW_ENDPOINT_META_DRIFT`.

The HMAC secret itself is NEVER returned here — only `hasSecret`. Permission `flows:manage` and deliberately not `flows:read`: `endpointUri` and `metaEndpointUri` embed the number's endpoint path token, and that token is the credential of the proxy.

**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`.



## OpenAPI

````yaml openapi.json GET /v1/flows/{id}/endpoint
openapi: 3.1.0
info:
  title: Pilot Status API
  version: 1.0.0
  license:
    name: Pilot Status Terms of Service
    url: https://pilotstatus.com.br/terms
  description: >-
    Public REST API for Pilot Status. Authenticate with the `x-api-key: ps_...`
    header (or `x-api-key-id`). Base URL: https://pilotstatus.com.br
servers:
  - url: https://pilotstatus.com.br
security:
  - apiKey: []
  - apiKeyId: []
paths:
  /v1/flows/{id}/endpoint:
    get:
      tags:
        - Flows
      summary: Get Flow endpoint config
      description: >-
        The `data_exchange` wiring of ONE Flow: where we forward the decrypted
        exchange (`url`), whether a signing secret exists (`hasSecret`), OUR
        proxy URL for this Flow (`endpointUri`), what Meta has registered
        (`metaEndpointUri`), whether the two DIVERGE (`drift`), and whether the
        number holds an encryption keypair at all (`numberHasKey`).


        ⭐ `numberHasKey: false` is the field this route exists for. Without a
        keypair on the number Meta has nothing to encrypt with, so the call
        never reaches the proxy, so the destination is never used — and nothing
        else on either side reports it. `warnings` carries the same facts as
        stable codes: `FLOW_ENDPOINT_NO_DESTINATION`,
        `FLOW_ENDPOINT_NUMBER_HAS_NO_KEY`, `FLOW_ENDPOINT_KEY_NOT_AT_META`,
        `FLOW_ENDPOINT_META_URI_UNKNOWN`, `FLOW_ENDPOINT_META_DRIFT`.


        The HMAC secret itself is NEVER returned here — only `hasSecret`.
        Permission `flows:manage` and deliberately not `flows:read`:
        `endpointUri` and `metaEndpointUri` embed the number's endpoint path
        token, and that token is the credential of the proxy.


        **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`.
      operationId: get_flows_id_endpoint
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            The **local** id of the Flow — the `id` field `GET /v1/flows`
            returns, never `metaFlowId`.
          schema:
            type: string
          example: cmf1a2b3c4d5e6f7g8h9i0j1
      responses:
        '200':
          description: The current wiring of this Flow's `data_exchange` endpoint
          content:
            application/json:
              example:
                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: []
        '401':
          description: Missing or invalid `x-api-key` / `x-api-key-id` header
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Unauthorized
        '403':
          description: >-
            Tenant-scoped key used on a number-scoped endpoint, or the key's
            role lacks the permission
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Tenant-scoped keys cannot call number endpoints
                code: TENANT_SCOPE_NOT_ALLOWED
        '404':
          description: >-
            No Flow with that id inside the key's own WABA. Never 403: a Flow of
            another tenant is indistinguishable from one that does not exist, on
            purpose — a 403 would confirm someone else's id to whoever guessed
            it
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Portuguese half
                  errorEN:
                    type: string
                    description: English half
                  code:
                    type: string
              example:
                error: Flow não encontrado para o número desta chave.
                errorEN: Flow not found for this key's number.
                code: FLOW_NOT_FOUND
        '422':
          description: >-
            The key's number is not a Meta (Cloud API) number or has no WABA
            behind it (`FLOW_REQUIRES_META_NUMBER`), or it is a Meta number
            outside the WABA that owns this Flow and can therefore never send it
            (`FLOW_NUMBER_WABA_MISMATCH`)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Portuguese half
                  errorEN:
                    type: string
                    description: English half
                  code:
                    type: string
              example:
                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
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Too many requests
        '500':
          description: >-
            Internal error. Never carries the internal message — that belongs in
            the log
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Portuguese half
                  errorEN:
                    type: string
                    description: English half
                  code:
                    type: string
              example:
                error: Erro interno do servidor.
                errorEN: Internal server error.
                code: INTERNAL_ERROR
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your ps_ API key
    apiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: API key id (alternative to x-api-key)

````