https://n8n.example.com; the plugin adds /api/v1). Things to know before you write:
- Where the API exists. Every self-hosted n8n (Community edition included) has the public API. n8n Cloud has it on paid plans only, not during the free trial.
- Licensed features. On a Community instance, projects, variables, source control, environment promotions, custom roles, role mapping, changing a user’s global role, LDAP, SAML, OIDC, log streaming, security policy, node and credential type policies and evaluation runs answer 403
Your license does not allow for feat:...: they need a Business or Enterprise licence. Folders need the free registered Community licence. Each operation’s description names the feature it needs. - Versions. The operations follow n8n 2.50. An instance on 2.49 or older answers 404 to the newer routes (AI agent versions and runs, AI preferences,
workflows.run, promotion reviews and settings): each one says “Added in n8n 2.50”. - Key scopes. A key created with limited scopes answers 403 on routes outside them.
- Paging. List routes take
limit(up to 250) andcursor, and return{ data, nextCursor }; passnextCursorback ascursoruntil it is null. - What runs.
workflows.run,executions.retry,agents.runandevaluations.startRunrun automation that may call other services;workflows.activate/publishturn triggers on;communityPackages.installinstalls code on the server. They aredestructive, like every delete.
- 202 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the n8n API key before the first call: More: API Key
pnpm corsair setup --plugin=n8n --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List active workflowsWhat’s next
API reference
Every
n8n.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.