Skip to content

API Endpoints ​

Core routes at a glance ​

A quick list of the routes a new integration usually needs. The sections below add the details.

Health and metadata:

  • GET /health
  • GET /api/definitions
  • GET /api/integrations

Workflows:

  • GET /api/workflows?projectId=&folderId=&tag=&search=
  • GET /api/workflows/:id/variables, PUT /api/workflows/:id/variables
  • POST /api/workflows/:id/move
  • POST /api/workflows/:id/enqueue

Projects, folders, tags and pins:

  • GET|POST /api/projects, PUT|DELETE /api/projects/:id
  • GET /api/folders?projectId=, POST /api/folders, PUT|DELETE /api/folders/:id
  • GET /api/workflows/:id/pins
  • PUT|DELETE /api/workflows/:id/pins/:nodeId

Execution history, debug helpers and approvals:

  • GET /api/executions?page=&pageSize=&status=&workflowId=&triggerType=
  • POST /api/code-node/test
  • POST /api/expressions/preview
  • GET /api/approvals, POST /api/approvals/:id/approve, POST /api/approvals/:id/reject

Trigger and webhook entry points:

  • POST /api/webhooks/execute, POST /api/webhooks/execute/stream
  • POST /api/webhooks/slack/:workflowId, POST /api/webhooks/github/:workflowId
  • POST /api/triggers/manual/:workflowId
  • GET|POST /api/forms/:path
  • POST /api/chat/:workflowId
  • GET /api/mcp-server/:path/manifest, POST /api/mcp-server/:path/invoke
  • ANY /webhook/:path (the configured production webhook URL)
  • ANY /webhook-test/:path (the configured test webhook URL; runs the draft for a signed-in editor or an API key)

Queue:

  • GET /api/queue/depth
  • GET /api/queue/dlq

Secrets and connection tests:

  • POST /api/secrets, GET /api/secrets?projectId=
  • POST /api/connectors/test
  • POST /api/providers/test
  • POST /api/mcp/discover-tools

Pagination ​

List endpoints answer the whole list by default, exactly as before. Add page and/or pageSize to get one page in the envelope GET /api/executions uses:

json
{ "items": [], "total": 0, "page": 1, "pageSize": 20 }
  • page starts at 1 (default 1); pageSize defaults to 20 and is capped at 100 (a larger value answers with 100). A value that is not a positive integer is a 400.
  • The route's other filters apply before the page is cut, so total counts what the filters match and what you may see. Fields a route returns beside its list (for example adapters on GET /api/mcp/servers) stay in the answer.
  • Order is the route's usual order with an id tiebreak, so pages do not overlap or skip rows while the data is unchanged.
  • Paged: GET /api/workflows, /api/users, /api/projects, /api/folders, /api/tags, /api/secrets, /api/variables, /api/templates, /api/budgets, /api/notifications, /api/knowledge-bases, /api/log-streams, /api/auth/api-keys, /api/custom-roles, /api/eval/datasets, /api/mcp/servers, /api/mcp/policies, /api/mcp/toolsets, /api/mcp/clients. Workflows and users are paged in the database; the others are configuration lists paged after their access check.
  • Routes that already had their own paging keep it: GET /api/executions (page/pageSize), GET /api/audit (page/pageSize, up to 500), GET /api/guard/events and GET /api/replay/recordings (limit/offset), and the limit-capped feeds (GET /api/approvals, /api/eval/runs, /api/replay/runs, /api/mcp/gateway/approvals, /api/budget-alerts).

Auth ​

  • POST /api/auth/register
  • POST /api/auth/login
  • POST /api/auth/logout
  • GET /api/auth/me
  • GET /api/auth/oidc/metadata (public; { "enabled": false } when OIDC is off; see OIDC single sign-on)
  • GET /api/auth/oidc/login (browser navigation; redirects to the IdP)
  • GET /api/auth/oidc/callback?code=&state= (IdP redirect target; redirects to the web app)
  • POST /api/auth/login/mfa ({ challenge?, code }; after an SSO login that needs the TOTP step the challenge comes from the HttpOnly l2m_sso_mfa cookie; see MFA on SSO)
  • POST /api/auth/saml/callback (IdP HTTP-POST binding form post → redirect to the web app; JSON → JSON; see SAML single sign-on)
  • POST /api/auth/ldap/login ({ email, password } → { user, expiresAt, provisioned } with the session cookie, or { mfaChallenge, expiresInSeconds } for a user with an authenticator; 400 without email or password, 503 while LDAP is off or not configured, 401 "Invalid credentials" for any other failure (unknown user, wrong password, unreachable directory), the reason only in the audit entry and the server log; see LDAP sign-in)
  • POST /api/auth/invite/lookup (public; { token } → { email, role, expiresAt }; 404 for a used, expired or unknown link; see User invites)
  • POST /api/auth/invite/accept (public; { token, password } with a password of 8 characters or more → { ok, email }; the invite is used up and the page signs in with the password next; 404 as above; audited as user.invite.accept)
  • POST /api/auth/api-keys/:id/rotate (builder, your own key; { graceHours?: 0-168 }, default 24 → { key, record, previous }, the new key once; the old key works until previous.expiresAt; 409 already_rotated / inactive; step-up; audited as api_key.rotate; see Rotating keys)
  • POST /api/service-accounts/:id/keys/:keyId/rotate (admin; the same body and answer, for a service account's key; a service account's own key is refused on its own account, and a key made with a key ends no later than it)

Users and tags ​

  • GET /api/users (admin; { users }, each { id, email, role, createdAt }, plus pending: true and inviteExpiresAt for an invited user who has not accepted yet)
  • POST /api/users/invite (admin; { email, role?: "admin" | "builder" | "operator" | "viewer" (default viewer), expiresInHours?: 1-720 (default 168) } → 201 { user, invite: { id, expiresAt }, emailed, inviteUrl? }; 200 when the email belonged to a pending user, whose role is set and whose old link stops working; 409 when an active account has the email; inviteUrl only when the link was not emailed; audited as user.invite)
  • PUT /api/users/:id (admin; { role }), DELETE /api/users/:id (admin; deleting a pending user revokes its invite)
  • GET /api/tags, POST /api/tags (builder), DELETE /api/tags/:tag (admin; removes the tag from every workflow)
  • PUT /api/tags/:tag (builder; { name } up to 100 characters → { ok, tag, previous, renamedInWorkflows }; renames the tag on every workflow that has it; 404 for a tag no workflow has, 409 when another tag already has the name (compared without case), 403 when the tag is on a workflow you cannot edit, before anything changes; audited as tag.rename). A rename and a tag delete rewrite only the tags of the workflows in one transaction, so a graph saved at the same moment is never overwritten. A tag is metadata, so neither takes a version snapshot (the workflow history lists graph changes only); both reload triggers and schedules like any save)

Workflows ​

  • GET /api/workflows
  • GET /api/workflows/:id
  • POST /api/workflows
  • PUT /api/workflows/:id (both, and POST /api/workflows/import, save a draft: 400 only for a broken graph or a trigger, authentication, approval, content-rule or attachment setting; unfinished node settings save and POST /api/workflows/:id/validate lists them. The 400's error and validation.issues list only what blocks the save)
  • DELETE /api/workflows/:id (while the workflow's release gate is on and enforced, only an admin: others get 403, audited as release.workflow_delete.refused)
  • POST /api/workflows/:id/duplicate
  • POST /api/workflows/import ({ json } or { workflow }, plus mode and dryRun). mode: "new" (the default) makes a new workflow: the file's id is kept when no workflow has it, otherwise the import gets a new id, " (imported)" after its name and its own trigger paths, and the stored workflow is not touched. mode: "replace" overwrites the stored workflow with the file's id (404 when there is none you can read, 403 when you cannot write it); what it replaced is kept in the history first (before replace by import). dryRun: true stores nothing and returns { dryRun, mode, workflow, existing, canReplace, diff }: the workflow the import would save, the stored workflow with that id when you can read it ({ id, name, updatedAt, projectId }, else null), whether you may replace it, and what a replace changes (nodes.added, nodes.removed, nodes.changed with the fields, nodes.moved, edges.added, edges.removed, edges.changed, fields, identical). Audited as workflow.import with mode and sourceId
  • GET /api/workflows/:id/access (any role that can read it) → { workflowId, role, canRead, canEdit, canRun, canShare, ownRunsOnly } (canShare: may share it with people or other projects): what the editor lets you do with it (ownRunsOnly: a share with you is all you have, so you see only your own runs of it)
  • GET /api/workflows/shared-with-me → { workflows: [{ id, name, projectId, updatedAt, accessLevel, effectiveAccess, shareOnly }] }: the workflows shared with you, in any project (shareOnly: the share is your only way to it, so you may read or run it but not change, delete, publish or share it)
  • GET /api/workflows/:id/user-shares, POST /api/workflows/:id/user-shares ({ email } or { userId }, accessLevel: "read" | "execute"), DELETE /api/workflows/:id/user-shares/:userId: share a workflow with a person; see Sharing a workflow with people. GET /api/workflows/:id/shares also lists them as userShares to whoever manages its shares
  • GET /api/workflows/:id/share-link (admin, builder) returns { shareUrl, data }; POST /api/workflows/import-shared with { data } (or POST the shareUrl as it is) imports the copy. Opening a share link (a GET) imports nothing: it answers 405 with a hint
  • POST /api/workflows/import/external — convert an export from another builder; see Importing from another builder
  • GET /api/workflows/:id/export
  • POST /api/workflows/:id/validate
  • POST /api/workflows/:id/execute (operator and up with workflow:execute; the editor's options, such as record: true, which records the run's MCP calls into a cassette (the result carries mcpCassette), are a builder's: see Running workflows by role)
  • GET /api/projects/:id/shared-workflows (workflow:read in the project) → { workflows: [{ id, name, ownerProjectId, updatedAt, accessLevel, effectiveAccess }] }: the workflows other projects share to it
  • POST /api/workflows/:id/execute/stream — SSE: node_start, node_complete, llm_delta, node_progress (MCP progress: nodeId, toolName, serverId, registryServerId, progress, total, percent, message, at), result
  • On the production channel (an API key), /execute, /execute/stream and POST /api/webhooks/execute(/stream) answer 409 when production refuses the workflow; when the version production would run has unfinished settings the body is { error, code: "workflow_unfinished" }. A run that fails because a sub-workflow it calls is refused that way carries errorCode: "workflow_unfinished" on the run and the node (and code in a webhook's answer).

Execution history ​

  • GET /api/executions (runs of the workflows you can read; of a workflow shared only with you, your own runs; recorded runs carry mcpCassette: { id, callCount, truncated }; runs saved as golden runs carry goldenRuns: { count, latestId })
  • GET /api/executions/:id (a failed run whose error workflow ran adds errorWorkflowRun, and an error workflow's run (trigger error) adds errorWorkflowSource: { executionId, workflowId, workflowName, status }, each only when you may open that run)
  • POST /api/executions/:id/replay (builder; { mode?: "strict" | "lenient", cassetteId? }; 404 without a cassette; see MCP testing)

Definitions and integrations ​

  • GET /api/definitions
  • POST /api/connectors/test
  • POST /api/mcp/discover-tools (optional projectId; each tool carries classification and an access mark for the caller's role)
  • GET /api/catalog?projectId= (builders with read access to the project): the palette's Your integrations entries, { entries: [{ key, kind, label, description, sourceName, sourceId, itemId, nodeType, nodeConfig }], sources }. MCP entries come from each registered server's last probe, with tool policy applied; API entries from the project's stored OpenAPI specs. See Your integrations.
  • GET|POST /api/catalog/openapi-specs (projectId; POST { url | specText, name?, baseUrl? }, builders with write access to the project; a URL goes through the outbound checks, at most 2 MB, 15 s), GET|PATCH|DELETE /api/catalog/openapi-specs/:id (PATCH { name?, baseUrl? }), POST /api/catalog/openapi-specs/:id/refresh (optional { specText } for an uploaded spec; answers added and removed operation ids). A spec in a project you cannot read answers 404.

MCP server registry ​

See MCP server registry.

  • GET /api/mcp/servers
  • POST /api/mcp/servers
  • GET /api/mcp/servers/:id
  • PUT /api/mcp/servers/:id
  • DELETE /api/mcp/servers/:id
  • POST /api/mcp/servers/:id/probe
  • GET /api/mcp/servers/:id/tools?projectId= (each tool carries classification, manualReadOnly and an access mark for the caller's role)
  • PUT /api/mcp/servers/:id/tools/:toolName/classification (admin; { readOnly: true | false | null })
  • GET /api/mcp/servers/:id/snapshots/:snapshotId
  • POST /api/mcp/servers/:id/accept-change
  • GET /api/mcp/servers/:id/telemetry?window=24h|7d|30d
  • GET /api/mcp/servers/:id/oauth (builder; OAuth connection status, never tokens)
  • POST /api/mcp/servers/:id/oauth/connect (admin; { scope? } → { authorizationUrl, expiresAt, redirectUri })
  • POST /api/mcp/servers/:id/oauth/refresh (admin)
  • DELETE /api/mcp/servers/:id/oauth (admin)
  • DELETE /api/mcp/servers/:id/oauth/issuer-binding (admin, audited; forget the authorization server a pre-registered client id is bound to)
  • GET /api/mcp/oauth/callback?code=&state=&iss= (authorization server redirect target, for the service connection and for users' own connections; checks the RFC 9207 issuer; see OAuth for remote servers)
  • GET /api/mcp/oauth/client-metadata.json (public; L2M's client metadata document, only with MCP_OAUTH_CLIENT_METADATA_ENABLED=true; see Client metadata document)
  • GET /api/mcp/servers/:id/runtime (builder; breaker state, in-flight and queued calls, refused-call counts; the last failure for admins only)
  • POST /api/mcp/servers/:id/breaker/reset (admin)
  • GET /api/mcp/servers/:id/connections (admin; users connected to a delegated server, never tokens)
  • DELETE /api/mcp/servers/:id/connections/:userId (admin; revoke one user's connection)
  • GET /api/mcp/connections (operator; your connections to delegated servers in projects where you may run workflows)
  • POST /api/mcp/connections/:serverId/connect (operator; { scope? } → { authorizationUrl, expiresAt, redirectUri })
  • DELETE /api/mcp/connections/:serverId (operator; disconnect your own account)
  • Server create and update accept sandbox, limits, credentialMode and delegatedFallback; see Sandboxed stdio servers, Rate limits, concurrency and the circuit breaker and Delegated credentials. Gateway calls refused by a limit or an open breaker return JSON-RPC error -31029 with data.retryAfterMs.
  • GET /api/mcp/telemetry?window=24h|7d|30d (servers configured inline on nodes)
  • GET /api/mcp/servers/:id/resources?projectId=&refresh= (builder; resources and templates with access marks)
  • POST /api/mcp/servers/:id/resources/read (builder; { uri, projectId? }; 413 over MCP_RESOURCE_MAX_BYTES)
  • GET /api/mcp/servers/:id/prompts?projectId=&refresh= (builder)
  • POST /api/mcp/servers/:id/prompts/get (builder; { name, arguments?, projectId? })
  • GET /api/mcp/elicitations?status=&executionId= (viewer; users without workflow:execute in a run's project see only their own runs)
  • GET /api/mcp/elicitations/:id (viewer)
  • POST /api/mcp/elicitations/:id/answer (viewer; { action: "accept" | "decline" | "cancel", content? }; 409 once settled)
  • Run stream event mcp_elicitation ({ phase: "created" | "settled", elicitation }) on POST /api/workflows/:id/execute/stream

MCP tool policy ​

See MCP tool policy.

  • GET /api/mcp/policies (builder)
  • POST /api/mcp/policies (admin; optional kind of tool | resource | prompt | sampling, see Rule kinds; optional annotationHint, see Annotation conditions; effect may be require_approval; optional conditions, mode, workflowIds, clientIds, toolsetIds (gateway server-tool calls through those toolsets only), see Conditions)
  • PUT /api/mcp/policies/:id (admin)
  • DELETE /api/mcp/policies/:id (admin)
  • POST /api/mcp/policies/evaluate (builder; { projectId, role, serverId, toolName, kind?, noWriteTools?, arguments?, labels?, workflowId?, clientId? })
  • GET /api/mcp/gateway/approvals?status= (admin; gateway calls held for approval, each with the session labels that drove the hold, or null)
  • POST /api/mcp/gateway/approvals/:id/approve and /reject (admin; optional { reason })

MCP gateway ​

See MCP gateway.

MCP endpoint (client token, Authorization: Bearer l2m_mcp_...):

  • POST /mcp/:toolset (Streamable HTTP, JSON-RPC 2.0: initialize, ping, tools/list, tools/call, notifications; JSON or SSE responses)
  • DELETE /mcp/:toolset (ends the session named by Mcp-Session-Id)
  • GET /mcp/:toolset (405)

Toolsets:

  • GET /api/mcp/toolsets (builder)
  • POST /api/mcp/toolsets (admin; { name, slug?, description?, projectId?, enabled?, trackSessionLabels?, rateLimit?, members? }; rateLimit is the default for each client: { requestsPerMinute?, burst?, maxConcurrent? }, null for none)
  • GET /api/mcp/toolsets/candidates (builder; workflows with an Expose as MCP Tool trigger)
  • GET /api/mcp/toolsets/:id (builder)
  • PUT /api/mcp/toolsets/:id (admin; members replaces the member list)
  • DELETE /api/mcp/toolsets/:id (admin)
  • GET /api/mcp/toolsets/:id/preview?role= (builder; tools visible to a role and tools hidden by policy)
  • POST /api/mcp/toolsets/:id/members (admin; { kind: "workflow", workflowId } or { kind: "server", serverId, toolGlob? })
  • DELETE /api/mcp/toolsets/:id/members/:memberId (admin)

Clients:

  • GET /api/mcp/clients (builder; status, effective role, open sessions, 7-day calls and errors)
  • POST /api/mcp/clients (admin; { name, toolsetIds, role, expiresAt? }; toolsetIds may be empty for a client that only calls /v1; the response carries the token once)
  • PATCH /api/mcp/clients/:id (admin; { name?, rateLimit? }, nothing else; rateLimit: null removes the client's limit)
  • POST /api/mcp/clients/:id/revoke (admin)
  • POST /api/mcp/clients/:id/rotate (admin; { graceHours?: 0-168 }, default 24 → { client, token }, the new token once; the old token works until client.previousExpiresAt; 409 inactive, rotation_pending (an old token is still in its window: rotate with graceHours: 0), rotation_conflict; step-up; audited as mcp_client.rotated)
  • GET /api/mcp/clients/:id/budgets (builder; every budget that applies to the client, its own, its toolsets' projects' and the global ones, each labelled by scope, with what it counted this period and whether it refuses the client's calls now)
  • GET /api/mcp/clients/:id/usage?window=24h|7d|30d (builder)
  • GET /api/mcp/clients/:id/sessions (builder): the client's open sessions on the answering instance, with the labels each collected on a toolset that tracks outside content per session and its protocolVersion; and callers, the client's stateless MCP 2026-07-28 callers (toolset, userId, protocolVersion and clientInfo when the answering instance served it recently, lastSeenAt, expiresAt, tracked, labels, raisedAt, guard), from every instance. callersUnavailable: true when the stored labels could not be read and only the answering instance's callers are listed

Legacy workflow tool routes (configured on the mcp_server_trigger node):

  • GET /api/mcp-server/:path/manifest
  • POST /api/mcp-server/:path/invoke

/v1 AI gateway ​

See /v1 AI gateway. OpenAI-compatible endpoints (client token, Authorization: Bearer l2m_mcp_...; errors in the OpenAI shape):

  • GET /v1/models, GET /v1/models/:model (the models of the route sets granted to the client)
  • POST /v1/chat/completions (JSON, or SSE with stream: true; stream_options.include_usage adds a usage chunk)
  • POST /v1/embeddings (input as a string or an array of strings; encoding_format float or base64)

Admin API (builders read, admins change; every change is audited):

  • GET /api/ai-gateway/route-sets (builder; each set with its routes and granted clients, and the provider ids a route may name)
  • POST /api/ai-gateway/route-sets (admin; { name, description?, projectId?, enabled?, rateLimit? })
  • GET /api/ai-gateway/route-sets/:id (builder)
  • PUT /api/ai-gateway/route-sets/:id (admin; a new projectId must be able to use every route's secret)
  • DELETE /api/ai-gateway/route-sets/:id (admin; removes its routes, grants and rule set binding)
  • POST /api/ai-gateway/route-sets/:id/routes (admin; { alias, kind?, providerId, model, baseUrl?, secretRef?, extra?, defaults?, enabled? }; 409 when the alias is taken)
  • PUT /api/ai-gateway/routes/:id, DELETE /api/ai-gateway/routes/:id (admin)
  • GET /api/ai-gateway/route-sets/:id/guard (builder), PUT /api/ai-gateway/route-sets/:id/guard (admin; { mode: "inherit" } or { mode: "override", profileId })
  • GET /api/ai-gateway/clients/:clientId/grants (builder), PUT /api/ai-gateway/clients/:clientId/grants (admin; { routeSetIds } replaces the client's grants)
  • GET /api/ai-gateway/usage?window=24h|7d|30d&clientId=&routeSetId= (admin; totals, per model name and per client)
  • GET /api/ai-gateway/requests?window=&clientId=&routeSetId=&limit= (admin; recent request rows, metadata only)

MCP onboarding ​

See MCP onboarding and catalog.

  • POST /api/mcp/servers/import (admin; builders with dryRun: true; { content, fileName?, dryRun?, projectId?, probe?, entries?: { [key]: { decision?, name?, values? } } })
  • GET /api/mcp/presets (viewer; built-in and approved catalog presets plus the catalog status)
  • GET /api/mcp/catalog (builder; catalog status, validation errors and entries)
  • POST /api/mcp/catalog/reload (admin)
  • POST /api/mcp/servers/:id/playground/call (builder; { toolName, args, projectId?, confirmWrite? })

MCP testing ​

See Testing MCP workflows.

  • GET /api/mcp/cassettes?workflowId=&projectId=&evalRunId=&limit=&offset= (builder; { items, total }, newest first)
  • GET /api/mcp/cassettes/:id (builder; { cassette } with every recorded call, scrubbed of secrets)
  • GET /api/mcp/cassettes/:id/export (builder; the l2m.mcp-cassette file)
  • DELETE /api/mcp/cassettes/:id (admin; audit event mcp_cassette.deleted)
  • POST /api/executions/:id/replay (builder; { mode?, cassetteId? } → run result with executionId and mcpReplay: { cassetteId, mode, matched, reused, live, unmatched[] }; a strict replay with unmatched calls has status error)
  • POST /api/replay/estimate (builder) takes a replay job request and answers what it would run and cost ({ cases, runsPerCase, modelCallsEstimate, estimatedCostUsd, costUnknown, warnings }) without running it; replay jobs take workflow files, overrides, model calls from the tape, baseline reruns and repeats. See Candidates and comparison
  • POST /api/eval/runs answers 202 { run, runId } and runs in the background (?wait=true keeps the old blocking 200 for one release); golden sets, replay jobs and scorers are in Golden sets and replay jobs
  • POST /api/eval/runs gains record: true (one cassette per fixture) and replay: { evalRunId? | cassetteId?, mode? } (400 when combined with record, 404 for a cassette or eval run whose workflow you cannot read); GET /api/eval/runs adds mcpCassettes
  • GET /api/mcp/servers/:id/snapshot/export (builder; the accepted snapshot as an l2m.mcp-snapshot file with resources and prompts; 409 before the first snapshot)
  • POST /api/mcp/check (builder, API keys; { serverIds?, toolsetId?, workflowIds?, failOnUnreachable?, failOnPolicyBlocked? } → { ok, checkedAt, servers[], blockedTools[], failures[] }; probes without storing anything; 404 for unknown servers or toolsets)
  • MCP adapter snapshot_mock (connection { sourceServerId | snapshot, cassetteId?, fixedText? }) for registry servers that serve a snapshot offline

Content rules ​

See Content rules in workflows. Validation errors are 400 { error, issues: [{ path, message }] }.

Rule sets:

  • GET /api/guard/profiles (viewer; { profiles, autoApply, builtInId })
  • POST /api/guard/profiles (builder; { id?, document, note? }; 409 when the id exists)
  • POST /api/guard/profiles/import (builder; { document } or { text }; a known id adds a version)
  • GET /api/guard/profiles/:id (viewer; summary, latest version and bindings)
  • PUT /api/guard/profiles/:id (builder; { document, note? }; no new version when the hash is unchanged; 409 for the built-in rule set)
  • DELETE /api/guard/profiles/:id (builder; 409 for the built-in rule set or while bound)
  • GET /api/guard/profiles/:id/versions (viewer)
  • GET /api/guard/profiles/:id/versions/:version (viewer)
  • GET /api/guard/profiles/:id/diff?from=&to= (viewer; { from, to, changes: [{ path, kind, before?, after? }] })
  • GET /api/guard/profiles/:id/export?version= (viewer; the rule set JSON with x-guard-profile-version and x-guard-profile-hash headers)
  • GET /api/guard/detectors (viewer; registered detectors with tier, channels and categories)

Bindings:

  • GET /api/guard/bindings/projects/:projectId (viewer; { binding, effective })
  • PUT /api/guard/bindings/projects/:projectId (builder; { mode: "inherit" | "override" | "enforced", profileId? }; setting or changing an enforced binding is admin only, 403 otherwise)
  • GET /api/guard/bindings/workflows/:workflowId (workflow read access; { binding, project, effective })
  • PUT /api/guard/bindings/workflows/:workflowId (workflow write access; { mode: "inherit" | "override", profileId? }; enforced is 400)
  • GET /api/guard/bindings/toolsets/:toolsetId (builder; { binding, effective }, the rule sets a gateway call to the toolset gets)
  • PUT /api/guard/bindings/toolsets/:toolsetId (admin; { mode: "inherit" | "override", profileId? }; enforced is 400; the destination rules set cannot be bound)
  • GET /api/guard/bindings/clients/:clientId (builder; { binding, toolsets: [{ toolsetId, effective }] })
  • PUT /api/guard/bindings/clients/:clientId (admin; as for toolsets; 409 for a revoked client)
  • GET /api/guard/effective?workflowId= or ?projectId= (viewer; the applied rule sets and the binding chain)

Events (masked evidence only):

  • GET /api/executions/:id/guard-events (viewer)
  • GET /api/guard/events?projectId=&workflowId=&profileId=&channel=&action=&days=&since=&findings=true&placement=&limit=&offset= (viewer; { events, total }, newest first; placement=gateway for gateway calls only, run for everything else (response and request events included), response for responses to external callers, request for refused or rewritten webhook payloads)
  • GET /api/guard/stats?projectId=&workflowId=&profileId=&placement=&days= (viewer; counts by verdict, action, category, channel and detector, shadow would-block, budget overruns and per-day counts; 14 days by default)

Verdicts from eval runs and replay jobs are left out of /api/guard/events and /api/guard/stats unless includeEval=true; a run's own /api/executions/:id/guard-events lists them. Their events carry runSource: "eval", also after an approval resume.

Red-team benchmarks of content rules (see Content rules benchmark):

  • POST /api/guard/profiles/:id/benchmark (builder; {} for the latest saved version, { version } or { document } for an unsaved draft, plus optional suites, splits, categories; { report, comparison, baseline, stored, draft, partial }; a full run of a saved version is stored, a draft's or a run narrowed by splits or categories is not; 429 with Retry-After when a builder stores a second run of the same version within 10 minutes (admins exempt); a draft follows the rule set editor's rule (403); 409 while another benchmark runs on the instance; audited as guard.benchmark.run)
  • GET /api/guard/profiles/:id/benchmarks?limit= (viewer; { benchmarks }, newest first, rates per split)
  • GET /api/guard/benchmarks/:id (viewer; { benchmark, report })

Rule set writes and binding changes are audited as guard.profile.created, guard.profile.updated, guard.profile.deleted, guard.profile.imported and guard.binding.updated.

Audit log ​

See Audit log. All admin-only.

  • GET /api/audit?category=&eventType=&outcome=&actorUserId=&resourceType=&resourceId=&projectId=&from=&to=&page=&pageSize= ({ items, total, page, pageSize }, newest first; pageSize 50 by default, at most 500)
  • GET /api/audit/export (the same filters; a CSV file; audited as audit.export)
  • GET /api/audit-log/verify-chain ({ ok, rowsChecked, firstBrokenAt?, anchor?, unverifiable? }; anchor names the first entry left after retention and its checkpoint)
  • GET /api/audit-export/destinations; POST /api/audit-export/destinations ({ name, kind: "http" | "file", config, intervalSeconds?, enabled? }), PUT /api/audit-export/destinations/:id, DELETE /api/audit-export/destinations/:id (changes need step-up and are audited)
  • POST /api/audit-export/destinations/:id/run (sends the next batch now; 409 while another instance exports it), GET /api/audit-export/destinations/:id/runs?limit=
  • GET /api/log-streams; POST /api/log-streams ({ name, type: "syslog" | "webhook" | "sentry", config, categories?, minLevel?, enabled? }), PUT /api/log-streams/:id, DELETE /api/log-streams/:id (changes need step-up and are audited); POST /api/log-streams/:id/test; GET /api/log-streams/:id/events (the last 100 deliveries)

Audit bundles ​

See Audit bundles and signed run manifests.

  • GET /api/executions/:id/manifest (read access to the run's workflow; { executionId, manifest, digest, keyId, algorithm, signedAt, signature }; generated once and cached; 409 while the run is in progress)
  • GET /api/executions/:id/bundle (read access to the run's workflow; streamed zip with x-l2m-manifest-digest and x-l2m-signing-key-id headers; 409 while in progress, 413 over AUDIT_BUNDLE_MAX_BYTES; audited as execution.audit_bundle.export)
  • GET /api/audit/signing-keys (admin; { activeKeyId, canRotate, keys: [{ keyId, algorithm, publicKey, publicKeyPem, source, status, createdAt, retiredAt }] })
  • POST /api/audit/signing-keys/rotate (admin; 201 { key, keys }; 409 when the key comes from AUDIT_SIGNING_KEY_BASE64; audited as audit.signing_key.rotated)

Data retention ​

See Data retention.

  • GET /api/admin/retention (admin; read-only; { intervalMs, maxRowsPerTick, bounds: { minDays, maxDays }, backlogCap, classes: [{ class, label, what, setting, days, cutoff, backlog, backlogCapped }], lastRun, nextRunAt, runs: [{ id, startedAt, finishedAt, instanceId, reason, outcome, counts, capped, error }], projectOverrides: [{ projectId, projectName, classes }] }; days: 0 means kept forever, and backlog counts the rows due now up to backlogCap, projects' own cutoffs included)
  • GET /api/projects/:id/retention (project members; { projectId, bounds: { minDays, maxDays }, classes: [{ class, label, what, deploymentDays, deploymentSetting, days, effectiveDays, clamped, updatedBy, updatedAt }], exemptions, canEdit }; days: null inherits the deployment's value)
  • PUT /api/projects/:id/retention (admins and the project's admins; step-up when it is on; body { classes: { runs?, tool_calls?, rule_events?, agent_memory? } } with a number of days, or null to inherit again; 400 retention_out_of_bounds outside RETENTION_MIN_DAYS to RETENTION_MAX_DAYS; 403 retention_admin_required when someone other than an admin sets tool_calls or rule_events shorter than the deployment's value, audited as project.retention.update_denied; answers the updated view)

See Legal holds.

  • GET /api/legal-holds?status= (admin or legal_hold:manage; { holds })
  • POST /api/legal-holds (admin or legal_hold:manage, subject scope admin only; step-up legal_hold.change; { name, reason, matterRef?, endsAt?, scopeType: "project"|"workflow"|"runs"|"subject", scopeId?, executionIds?, subject?: { value, dataClass?, country? } }; 201 { hold }; audited as legal_hold.placed)
  • GET /api/legal-holds/status?workflowId=|projectId=|executionId= (anyone who can read it; { held, holds })
  • GET /api/legal-holds/:id, GET /api/legal-holds/:id/items?offset=&limit= (admin or legal_hold:manage)
  • POST /api/legal-holds/:id/release (admin or legal_hold:manage, signed-in only: API keys get 403; step-up; { reason }; 409 when already released; audited as legal_hold.released)
  • A delete, a gate case removal or a workflow move refused by a hold answers 409 { error, code: "legal_hold", holds: [{ id, name }] }; a data-subject delete skips held rows with reason held.

Data-subject requests ​

See Data-subject requests. The value is never echoed, logged or audited.

  • POST /api/data-protection/requests (admin or data_subject:manage; { type: "export" | "delete", subjectKind?: "end_user" | "staff", value, scan?, revealTokens? }; 201 with the request; revealTokens is for exports only and needs step-up when it is on)
  • GET /api/data-protection/requests (admin or data_subject:manage; { requests }, newest first), GET /api/data-protection/requests/:id (admin or data_subject:manage; { id, type, subjectKind, status, scan, revealTokens, counts, foundByReference, truncated, progress, dueAt, overdue, createdBy, createdAt, updatedAt, error, export, deletion, staffPreview }; status is searching, ready, running, deferred_by_hold, done, expired or failed)
  • GET /api/data-protection/requests/:id/export (admin or data_subject:manage; step-up when on; the zip, once; 409 once downloaded or expired, and for a deletion)
  • POST /api/data-protection/requests/:id/confirm (admin or data_subject:manage; step-up when on; {}; confirms a deletion whose preview is ready, which then runs in the background; a staff erasure of an existing account is admin-only (403 otherwise) and also needs the user.delete step-up, which refuses a service-account key; 409 for an export, a request not ready, your own account or the last admin)
  • POST /api/data-protection/subject-refs/preview (builder with write access to the workflow; { workflowId, subjectRefs } → { runs, refs: [{ expression, resolved, sample }] }, samples masked)

Golden runs and replay ​

See Golden runs and replay.

  • POST /api/replay/recordings (builder; { executionId, name, notes? }; 201 { recording }; 409 while the run is in progress, for a replay, for a run already saved (code: "duplicate") or over REPLAY_RECORDINGS_MAX_PER_WORKFLOW, REPLAY_RECORDINGS_MAX_BYTES_PER_WORKFLOW or REPLAY_RECORDINGS_MAX_TOTAL_BYTES; 413 over REPLAY_RECORDING_MAX_BYTES; audited as replay.recording.created)
  • GET /api/replay/recordings?workflowId=&limit=&offset= (viewer; { items, total })
  • GET /api/replay/recordings/:id (viewer; { recording } with input, recorded node results and run facts)
  • DELETE /api/replay/recordings/:id (builder; 403 to a builder for a golden run an admitted case of a gate that is on and enforced replays; audited as replay.recording.deleted)
  • POST /api/replay/recordings/:id/replay (builder; { draft?, version?, mcpMode?, ignorePaths? (up to 32, 128 characters, eight ** each), numberTolerance? }; a version runs under the workflow's current project; { recordingId, executionId, candidate, status, diff, verdict, reasons, facts }; audited as replay.run)
  • Production capture (Phase 15.6): GET/PUT /api/workflows/:id/replay-capture, GET /api/workflows/:id/replay-captures, POST /api/replay/captures/:id/promote, POST /api/replay/captures/promote, DELETE /api/replay/captures/:id, POST /api/replay/captures/discard, and the admin data-subject lookup POST /api/replay/recordings/find-subject ({ value, dataClass?, country? }, search only; each match is exact or a national_only possible match) and POST /api/replay/recordings/find-subject/delete (deletes the ids a search returned; a possible match only with confirmPossible: true). The inbox's trigger=api_key lists runs an API key started. See Production capture. Captured runs (status: "candidate") are left out of GET /api/replay/recordings; replaying one or adding it to a golden set answers 409.

Releases ​

See Release gate and publish. Every route answers 404 for a workflow the user cannot read and 403 when they may not act on it.

  • GET /api/workflows/:id/release-gate (viewer; { gate })
  • PUT /api/workflows/:id/release-gate (workflow:write; only admins enforce a gate, lift enforcement or loosen an enforced one; 400 for a golden set of another workflow; audited as release.gate.updated)
  • POST /api/workflows/:id/publish (workflow:publish; { version, workflowHash?, replayRunId?, override?: { reason } (admins), requestApproval?: { reason } }; 200 { release }, 202 { verdict: "needs_approval", approvalRequestId }, 409 { verdict: "blocked", reasons, replayRunId?, canRequestApproval }; 409 for a hash mismatch; audited as release.published, release.overridden or release.blocked)
  • GET /api/workflows/:id/releases (viewer; { releases, publishedVersion }; for someone who sees only their own runs each release's gateReasons and replayRunId are empty and detailsHidden: true)
  • POST /api/workflows/:id/rollback (workflow:publish, and, while the gate is on and enforced, only an admin (others get 403, audited as release.rollback.refused); { version, reason }; only to a version published before; 409 when it is already live; audited as release.rolled_back)
  • POST /api/workflows/:id/unpublish (workflow:publish, and an admin while the gate is on and enforced (403 otherwise, audited as release.unpublish.refused); { reason?, expectedVersion? }; production runs the draft until a version is published again; never blocked by the release gate, and with a gate on notice says production runs the ungated draft; answers { release, productionRuns: "draft", gateEnabled, gateEnforced, notice } where release is the unpublished history entry; 409 when nothing is published or, given expectedVersion, when another version is live (nothing changes); audited as release.unpublished)
  • GET /api/workflows/:id/release-state, GET /api/workflows/:id/publish-preview?version= (viewer; for someone who sees only their own runs the preview has the verdict only: reasons: [], stats: null, replayRunId: null, detailsHidden: true)
  • GET /api/workflows/:id/release-gate/cases (viewer; an enforced gate's cases: admitted or pending admission, required; enforced: false and no cases otherwise; enabled says whether the gate is switched on, since admission and required cases apply only then)
  • POST /api/workflows/:id/release-gate/cases/admit, POST /api/workflows/:id/release-gate/cases/reject (admins; { fixtureIds, reason? }; 409 on an unenforced gate, or when rejecting an admitted case; audited as release.gate.cases_admitted / release.gate.cases_rejected)
  • PUT /api/workflows/:id/release-gate/cases/:fixtureId/required (admins; { required }; golden-run cases only; marking a pending case admits it; audited as release.gate.case_required)
  • POST /api/workflows/:id/release-gate/cases/requests (workflow:write; { action: "admit" | "remove", fixtureIds, reason }; 202 { request }; admit only pending cases, remove only admitted ones (409 otherwise); audited as release.gate.case_request.requested)
  • PUT /api/workflows/:id/release-gate takes admitAddedSetCases: true (admins; 403 otherwise) to admit the cases of the golden sets the save adds to an enforced gate; without it they wait for admission
  • DELETE /api/eval/fixtures/:id and DELETE /api/eval/datasets/:id answer 403 to a builder for an admitted case, or a golden set, of a gate that is on and enforced (a gate switched off restricts neither); an admin's delete of admitted cases (and of a golden run they replay, or the workflow) is audited as release.gate.cases_removed
  • GET /api/replay/runs/:id carries releaseGate: { enforced, admittedFixtureIds, pendingFixtureIds, requiredFixtureIds, requiredCaseNames, errorsCountAsFailures, verdict, reasons } when the workflow's enforced gate uses one of the job's golden sets (verdict: how the gate judges the job's case results now)

Approvals ​

See Approval gates. Release requests (Phase 15.4) appear in the same list with kind: "release" and an id starting rar_; deciding one publishes the version ({ request, release }). Requests to admit cases to an enforced release gate, or remove admitted ones, appear with kind: "admit_cases" or "remove_cases" and an id starting gcr_; deciding one answers { request }, against the gate's current approvers, and 409 when the request went stale (the gate's approvers, self-approval or enforcement changed after it was made). Approving a release request judges the version again and answers 409 with details.reasons when the gate now blocks it for a new kind of reason or a worse measure of one it had. A filter by executionId lists neither.

  • GET /api/approvals?status=pending|decided|all&workflowId=&executionId=&limit= (viewer; { items } limited to workflows the user can read, filtered before the limit; 404 when workflowId or executionId names a workflow or run the user cannot read, or one that does not exist; each item has requestId, id (the execution id), kind, status, message, approvers, editableFields with proposed values, path, expiresAt, the decision fields and canDecide / cannotDecideReason)
  • POST /api/approvals/:id/approve (:id is the execution id; { reason?, edits?, requestId? }; needs execute access to the workflow's project (and to every workflow along a sub-workflow path) and a matching approver; 200 with the run result, 202 { queued: true } with the execution queue, 400 for invalid edits (details: [{ key, message }]), 403 for self-approval, a non-approver or no project access, 404 when nothing is pending or the run is not visible (checked first), 409 when already decided, expired, or requestId is not the current request, 503 when the resume could not start (the request is pending again; decide again); audited as approval.decided)
  • POST /api/approvals/:id/reject ({ reason?, requestId? }; the reason is required for Approval Gates that require one and for write-tool approvals; same responses)
  • POST /api/approvals/eligibility (builder; { workflowId, projectId?, approverRoles?, approverUsers?, allowSelfApproval? } → { othersCanApprove, requesterCanApprove }; 404 for a workflow (or, unsaved, a project) the user cannot read, 403 without edit access: whether anyone but the signed-in user, and whether the signed-in user, could approve a run they start with these settings; the editor warns from it)
  • PUT /api/workflows/:id/pins/:nodeId answers 400 for an Approval Gate; /api/workflows/:id/execute and /api/executions/:id/retry refuse a startNodeId or single-node run below an Approval Gate, and ignore pinned or seeded output for a gate.

Secrets ​

  • POST /api/secrets ({ id, name, provider, projectId, source, warnings }; warnings is non-blocking and never contains the value: it flags a value that equals a word run manifests keep, such as a status)
  • GET /api/secrets

Webhooks ​

  • POST /api/webhooks/execute and POST /api/webhooks/execute/stream (operator and up with workflow:execute; an operator's run uses no pinned data; { workflow_id?, webhook_path?, session_id?, system_prompt?, user_prompt?, variables?, customData?, payload? }). payload is the request body the run's webhook receives (what {{webhook.<field>}} reads), with the prompt fields on top of it, as a call to /webhook/:path gets them; without it the body holds the prompt fields only.
  • ANY /webhook/:path (production: answers 409 with code: "workflow_unfinished", and starts no run, while the version production would run has unfinished node settings, on an open webhook (Auth Mode None) only to a signed-in editor, and on a protected one once its token or signature checks out, anyone else getting the plain 404; a missing path or wrong method answers a plain 404 that lists nothing unless the caller is signed in, or sends an API key, and may run a workflow there)
  • POST /api/webhooks/{slack,github,stripe,telegram,discord}/:workflowId (anything the provider did not sign, an unknown id and a trigger without its secret all answer a plain 404; once signed: 404 trigger_off when off, 409 when deactivated or unfinished)
  • ANY /webhook-test/:path (runs the draft: a signed-in session or an API key, in Authorization: Bearer or X-API-Key, of someone with edit access; anyone else gets a plain 404; an operator with run access only gets 403; an off webhook answers 404 with code: "trigger_off")

Content rules on responses (content_filter) ​

When a rule set has a response channel, what /webhook/:path, /webhook-test/:path, POST /api/chat/:id and POST /api/mcp-server/:path/invoke return is checked first (see Responses to external callers). Without one, nothing changes.

CaseWebhooksChatMCP invoke
Response withheld (block, review, approval, or a check that could not run)422 { error: "The response was withheld by content rules.", code: "content_filter", executionId }the same 422, plus session_id200 { ok: false, executionId, code: "content_filter", error, result: { isError: true, content: [{ type: "text", text }] } }
Run paused for approvaloutput is { waitingForApproval: true, executionId }the same outputresult is the same object
Run failed400 with error: "The workflow run failed." and executionId200 with ok: true, status: "error" and the run's output, no error text500 { error: "The workflow run failed.", executionId }

An idempotent retry of a withheld webhook call answers the same 422.

With a trigger_input channel, a webhook payload the rules refuse answers 400 { error: "The request was refused by content rules.", code: "content_filter" } before anything runs. /api/chat and MCP invoke are not checked this way.

POST /api/webhooks/execute (operator and up) is not checked.

Helper ​

  • GET /helper-chat

Error response conventions ​

  • 401: authentication/session errors
  • 403: authorization/signature/replay errors
  • 404: resource not found
  • 409: idempotency conflicts
  • 422: content rules withheld a response (code: "content_filter")

This website (not the L2M product) counts page views with GoatCounter, without cookies.