Administer

API, SDK and CLI

Automate Triggerflow itself with API keys, the TypeScript SDK and the command-line tool.

Everything you can do in the editor, you can also automate.

API keys

Create a key in Settings → API keys (Pro plan and above). Each key works for one organization and can be revoked at any time. Send it as Authorization: Bearer <key>.

API reference

The full, interactive reference is at /api/docs on your Triggerflow address. You can try requests from the page.

TypeScript SDK

import { Triggerflow } from '@triggerflow/sdk';

const triggerflow = new Triggerflow({ baseUrl: 'https://your-triggerflow', apiKey: process.env.TRIGGERFLOW_API_KEY! });
const { items } = await triggerflow.workflows.list();
const run = await triggerflow.workflows.runAndWait(items[0].id, { triggerData: { orderId: 42 } });

The SDK covers workflows (list, get, create, update, activate, archive, export, run), executions and variables, and retries safe requests automatically.

Command line

The triggerflow command-line tool lists, imports, exports and runs workflows, follows executions and manages variables:

triggerflow login --url https://your-triggerflow --key <api key>
triggerflow workflows list --active
triggerflow workflows import workflow.json
triggerflow run <workflow id> --data '{"orderId": 42}'
triggerflow executions list --status error
triggerflow vars set SHOP_URL https://shop.example.com

run waits for the result and exits with an error code when the run fails, so it works in scripts and CI.

Webhooks to your systems

To receive Triggerflow's events (audit events, finished runs) in your own service, use log streaming.

Previous: Audit log and monitoring · Next: Self-hosting