Skip to content

Using the Routario API

Most of what you do in Routario, you do in the app or in a flow. But when you need an external system to push data in or pull results out, Routario has a REST API.

The API is Bearer-authenticated and scoped, and it covers three things:

  • Custom Tables — read and write the rows in your data tables.
  • Workflow runs — trigger a flow and inspect the result of a run.
  • Memory ingestion — send documents and notes into Memory so Routario can read and file them.

Every request carries an API token in an Authorization header:

Authorization: Bearer <your-token>

Create a token in Settings, keep it secret (treat it like a password), and give it only the scopes it needs. If a token leaks, revoke it and issue a new one.

You usually don’t need the API — a flow can do most integration work with a Webhook trigger (data in) or a Webhook step (data out). Reach for the REST API when:

  • An external system needs to push rows into a Custom Table on its own schedule.
  • A backend service needs to trigger a flow and read its result synchronously.
  • A pipeline needs to feed documents into Memory for Routario to process.

Starting a flow from outside: Webhook trigger vs. the Run API

Section titled “Starting a flow from outside: Webhook trigger vs. the Run API”

Two different ways to let an outside system start a flow, and they’re easy to mix up. Both end up in the same place — the caller’s data lands in payload — but they’re provisioned differently, authenticate differently, and suit different callers.

Webhook triggerRun API (POST /api/v1/runs)
What it isA trigger node on one specific flow’s canvasAn endpoint that starts any flow, named by id in the request body
When to useOne external sender (Stripe, GitHub, a payment gateway) needs to push data into that one flowA backend or script needs to trigger a flow and read the result back — or the same credential needs to drive several different flows
How to provisionAdd a Webhook trigger to the flow’s canvas; copy the URL from its panel (/flows/webhook/<workflow_id>)Settings → Connections → API keys → Generate key
AuthenticationAn optional shared secret, sent as X-Webhook-SecretA Bearer token, sent as Authorization: Bearer <token>
Is a secret/token required?Yes, effectively — Routario refuses to fire a webhook with no secret configured (fails closed)Yes, always — there’s no anonymous call; the token itself is the credential
ScopesNone — it’s all-or-nothing for that one flowFine-grained, per key: pick run:<workflow-id> or run:* (every workflow), each with independent Read (poll a run) / Write (start a run) — alongside Table and Memory scopes on the same key
Rate limitFixed at 60 requests/minute for that flow’s URLConfigurable per key (default 30 run-starts/minute), plus a cap of 5 runs executing concurrently per key
{{ user.* }} / {{ actor.* }} resolve toThe flow’s owner (whoever created it)The API key’s own identity — a dedicated actor stamped to that key when it’s generated
What you get back{run_id, status}{run_id, status, output, error, started_at, updated_at} — plus GET /api/v1/runs/{id} to poll a WAITING run through to completion
ReachabilityRoutario must be reachable from the caller (automatic in the hosted product; a tunnel like Cloudflare Tunnel or ngrok if self-hosted)Same requirement

Rule of thumb: if it’s one sender and one flow, and you never need to read the outcome back, the Webhook trigger is simpler to set up — no key management, just a URL. Reach for the Run API when one integration needs to drive several flows under one credential, when the caller needs the run’s output synchronously (or by polling), or when you want scopes and expiry independent of any single flow’s own configuration.