API Trigger Connection

Expose any flow as an authenticated HTTP endpoint. An external service calls your URL with an API key, the flow runs, and the response is shaped by the flow itself.

Setup

  1. In Fainflow: Connections → + New Connection → API Trigger
  2. On save you get:
    • a personal endpoint on a random subdomain — https://<subdomain>.api.fainflow.com
    • your first API key, shown once (copy it now — it can't be retrieved again)
    • a ready-to-try api-trigger-test route with a read-only example flow

New Connection

Authentication

Every request must carry an active key in the Authorization header:

Authorization: Bearer fkey_xxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxx

The key is validated at the edge. Each key belongs to one connection and only works on that connection's subdomain. Keep several keys active during rotation: create a new one, switch your client over, then delete the old.

Routes

A connection can expose several routes — each route is a path that maps to exactly one flow:

https://<subdomain>.api.fainflow.com/<route>

Create routes in the connection details, then bind a flow to a route from the flow editor's API Trigger event (route dropdown). Branch on the request inside the flow with If / Else if.

Event

API Trigger — fires when a request hits a bound route.

Event Outputs

OutputTypeDescription
bodyjsonRequest body
headersjsonHTTP headers
queryjsonQuery parameters
methodstringHTTP method (GET, POST, etc.)
pathstringRequest path

Responding

Add a Respond action to return an HTTP response to the caller. It sets the status, body and headers, then stops the flow — anything after it does not run. The caller's request blocks until Respond is reached, up to 25 seconds; after that it gets a 504 with a history_uuid to look up the run.

Example

Handle Webhook

Receive webhook, parse body, send notification

Event

API Trigger

body
headers
method

Object

Get

object
body
path
event
output

Telegram Bot

Send Message

chatId
{{vault.ADMIN_CHAT}}
text
output

Error responses

CodeWhen
401Missing / invalid / revoked API key, or wrong subdomain for the key
404No route matches the path on this connection
429Rate limit exceeded (Retry-After header included)
504The flow didn't reach a Respond action within 25s

Rate limits

Requests are limited per key and per flow (100 / minute by default). Over the limit returns 429 with a Retry-After header.

Key revocation

Deleting an API key revokes it instantly — the next request signed with it returns 401. If the revocation channel is briefly unavailable, the key stops working within ~60 seconds at the latest.