Flow.Documentation
Architect

API gateway patterns

9 steps± 6 minVideoVerified 22 Oct 2026
  1. Step 1 · Open your development environment
  2. Step 2 · Connect the existing system
  3. Step 3 · Create a security policy with three sign-in methods
  4. Step 4 · Set up the signature
  5. Step 5 · Create the API and attach the policy
  6. Step 6 · A proxy endpoint for the stock system
  7. Step 7 · Without signing in: refused
  8. Step 8 · With a signature: in
  9. Step 9 · The public description

The gateway is the one front door for every API your organisation offers — including systems you do not build yourself. You put an existing stock system behind a proxy endpoint, choose per API how consumers sign in (API key, OAuth 2.0, webhook signature), see a signed call get in and an unsigned one fail, and make the API's description public.

Watch the whole guide as a video9 steps in one film
Step 1 / 9

Open your development environment

You design APIs in Development; they travel with a version to Acceptance and Production. Connections do not: you set them up per environment, with that environment's keys.

  1. Click Development
Open your development environment · Click Development
  1. Click Open ↗
Open your development environment · Click Open ↗
Step 2 / 9

Connect the existing system

Under Connections you choose General HTTP API: base URL, key and what Flow may do with it. The key stays encrypted on the server and can never be read back. Read only means: Flow only does GET here.

  1. Click Connections
Connect the existing system · Click Connections
  1. Click **General HTTP API Your own API Any REST API with a base URL and a key. Use it in **
Connect the existing system · Click **General HTTP API Your own API Any REST API with a base URL and a key. Use it in **
  1. In Name, type Stock system
  2. In Base URL, type http://127.0.0.1:55972
  3. In Secret, type ••••••••
Connect the existing system · In Name, type Stock system; In Base URL, type http://127.0.0.1:55972; In Secret, type ••••••••
  1. Click Save
Connect the existing system · Click Save
Connect the existing system · The connection, with ‘Key stored’ and ‘Read only’.
Step 3 / 9

Create a security policy with three sign-in methods

Under Security you create a policy. One method suffices for a consumer: a partner with an API key, an application with OAuth 2.0 (client credentials) or a webhook that signs its message with a shared secret (HMAC, like GitHub and Stripe). Public is off: every call should be traceable.

  1. Click Security
Create a security policy with three sign-in methods · Click Security
  1. Click New security policy
Create a security policy with three sign-in methods · Click New security policy
  1. In Name, type Partners and webhooks
Create a security policy with three sign-in methods · In Name, type Partners and webhooks
  1. Click OAuth 2.0 Client credentials; JWT tokens from this gateway
Create a security policy with three sign-in methods · Click OAuth 2.0 Client credentials; JWT tokens from this gateway
  1. Click Webhook signature HMAC over the body (GitHub, Stripe, Shopify style)
Create a security policy with three sign-in methods · Click Webhook signature HMAC over the body (GitHub, Stripe, Shopify style)
Step 4 / 9

Set up the signature

Say in which header the sender puts its signature, with which prefix, and the shared secret. Flow recalculates the HMAC over the received body itself; if it does not match, the call does not get in.

  1. In Signature header, type X-Signature
  2. In Prefix, type sha256=
  3. In Secret, type ••••••••
Set up the signature · In Signature header, type X-Signature; In Prefix, type sha256=; In Secret, type ••••••••
  1. Click Save policy
Set up the signature · Click Save policy
Set up the signature · In plain language: a consumer gets in with API key or OAuth 2.0 or Webhook signature.
Step 5 / 9

Create the API and attach the policy

The policy hangs on the API, not on every endpoint: all endpoints inherit it and may only tighten it (fewer methods, more permissions, a lower limit). Also switch on Public documentation: then anyone can read the OpenAPI description, but nobody can call the API without signing in.

  1. Click Explorer
Create the API and attach the policy · Click Explorer
  1. Click Add to General
Create the API and attach the policy · Click Add to General
  1. Click New API
Create the API and attach the policy · Click New API
  1. In Name, type Stock
  2. In Base path, type /warehouse
  3. In Security policy, choose Partners and webhooks
Create the API and attach the policy · In Name, type Stock; In Base path, type /warehouse; In Security policy, choose Partners and webhooks
  1. Click Description public
Create the API and attach the policy · Click Description public
  1. Click Save API
Create the API and attach the policy · Click Save API
Step 6 / 9

A proxy endpoint for the stock system

Not every endpoint needs a workflow. Forward to connection passes the request on to the existing system, with the key from the connection. The consumer sees your address and your security, never the key or the address of the system behind it.

  1. Click + Endpoint
A proxy endpoint for the stock system · Click + Endpoint
  1. In Name, type Items
  2. In Method, choose GET
  3. In Path, type /items
A proxy endpoint for the stock system · In Name, type Items; In Method, choose GET; In Path, type /items
  1. Click Forward to connection
A proxy endpoint for the stock system · Click Forward to connection
  1. In Connection, choose Stock system
  2. In Upstream path, type /items
A proxy endpoint for the stock system · In Connection, choose Stock system; In Upstream path, type /items
  1. Click Save endpoint
A proxy endpoint for the stock system · Click Save endpoint
A proxy endpoint for the stock system · The endpoint inherits the API's policy: the same three methods.
Step 7 / 9

Without signing in: refused

On the right under Try it you call the endpoint like a consumer. Without a key, token or signature the gateway answers 401; the stock system notices nothing.

  1. In Authentication, choose None
Without signing in: refused · In Authentication, choose None
  1. Click ▶ Send
Without signing in: refused · Click ▶ Send
Without signing in: refused · Response 401.
Step 8 / 9

With a signature: in

A partner system calls the same endpoint and signs its message. Under Runs → Live traffic you see both calls: the 401 and the 200, with how the consumer signed in. IP addresses are stored truncated.

  1. Click Runs
With a signature: in · Click Runs
  1. Click Live traffic
With a signature: in · Click Live traffic
With a signature: in · The signed call: 200, signed in with hmac.
Step 9 / 9

The public description

Because Public documentation is on, the OpenAPI link on the API opens for anyone, without a key: partners' developers build against it without you creating an account for them.

  1. Click Explorer
The public description · Click Explorer
  1. Click Stock v1 /warehouse
The public description · Click Stock v1 /warehouse
  1. Click OpenAPI of this API ↗
The public description · Click OpenAPI of this API ↗
The public description · The OpenAPI description, with the endpoint's path.

This guide was carried out step by step on 22 Oct 2026 by an automated test on Flow (version 3e563176).