HTTP API
Everything the web UI does goes through a versioned REST API under /api/v1. You can use the
same API to manage workflows, credentials and executions from scripts and other systems.
OpenAPI description
The API is described by an OpenAPI 3.1 document:
- Served by every instance at
GET /api/v1/openapi.json. - Published with this documentation as
api/openapi.json, generated from the same route table when the book is built. - Every route, its summary and the permission it checks are listed on the endpoint index.
Load it into any OpenAPI viewer or client generator. The document is generated from the server’s route table, so it always matches the version that serves it.
Authentication
| Method | Use |
|---|---|
| API key | Scripts, CI, MCP clients. Send Authorization: Bearer <key>. Create keys under Settings > API keys or with POST /api/v1/api-keys. Keys are hashed at rest, can be scoped and can expire. |
| Session cookie | The web UI. Cookie-authenticated requests that change state must send the CSRF token header. |
Every route requires a permission, checked against the caller’s instance role and project role. See Users, roles and SSO.
export BASE_URL=https://automation.example.com
export API_KEY=... # from Settings > API keys
curl -s "$BASE_URL/api/v1/workflows" -H "authorization: Bearer $API_KEY"
Main resources
| Path | Purpose |
|---|---|
/api/v1/workflows | List, create, update, delete workflows; versions and rollback |
/api/v1/workflows/{id}/activate, /deactivate | Activation |
/api/v1/workflows/{id}/run | Start a manual execution |
/api/v1/workflows/import/n8n | Import n8n-format JSON, returns the diagnostics report |
/api/v1/workflows/{id}/export/n8n | Export in n8n format |
/api/v1/executions | List and inspect executions, per-node run data |
/api/v1/executions/{id}/retry, /cancel | Retry from the failed node, cancel |
/api/v1/executions/{id}/stream | Live events over Server-Sent Events |
/api/v1/credentials | Credentials (secret fields are write-only), test, OAuth2 connect |
/api/v1/connectors | Connector catalog and lookups (/connectors/{id}/lookups/{lookup}) |
/api/v1/node-types | Node descriptors used by the editor |
/api/v1/projects | Projects, members, variables |
/api/v1/users, /api/v1/api-keys | Users and API keys |
/api/v1/audit | Audit log |
Endpoints outside /api/v1
| Path | Purpose |
|---|---|
/webhook/<path> | Production webhooks of active workflows |
/webhook-test/<path> | Test webhooks while the editor is listening |
/webhook-waiting/<token> | Resume URLs of waiting executions |
/form/<path> | Hosted forms (form triggers and Wait-for-form) |
/mcp | MCP server endpoint (Streamable HTTP) for workflows exposed as tools |
/healthz | Liveness and readiness check, no authentication |
/metrics | Prometheus metrics (see Metrics) |
Streaming execution events
GET /api/v1/executions/{id}/stream returns text/event-stream. Events:
| Event | Data |
|---|---|
node_started | Node name, run index |
node_finished | Node name, run index, item counts per output |
node_failed | Node name, run index, redacted error |
execution_finished | Final status |
When a client connects, past events of the execution are replayed first, so a client that connects late still sees the whole run. Reverse proxies must not buffer this endpoint; see the proxy examples in Deployment.
Conventions
- Request and response bodies are JSON. Timestamps are RFC 3339 in UTC.
- List endpoints are paginated with
limitand an opaquecursor; the response includesnext_cursorwhen there are more results. - Errors use a consistent body with a machine-readable
codeand a humanmessage. Secret values never appear in errors. - Breaking changes go to a new version prefix. Additive changes (new fields, new endpoints) can appear in any release; clients should ignore unknown fields.