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 /healthGET /api/definitionsGET /api/integrations
Workflows:
GET /api/workflows?projectId=&folderId=&tag=&search=GET /api/workflows/:id/variables,PUT /api/workflows/:id/variablesPOST /api/workflows/:id/movePOST /api/workflows/:id/enqueue
Projects, folders, tags and pins:
GET|POST /api/projects,PUT|DELETE /api/projects/:idGET /api/folders?projectId=,POST /api/folders,PUT|DELETE /api/folders/:idGET /api/workflows/:id/pinsPUT|DELETE /api/workflows/:id/pins/:nodeId
Execution history, debug helpers and approvals:
GET /api/executions?page=&pageSize=&status=&workflowId=&triggerType=POST /api/code-node/testPOST /api/expressions/previewGET /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/streamPOST /api/webhooks/slack/:workflowId,POST /api/webhooks/github/:workflowIdPOST /api/triggers/manual/:workflowIdGET|POST /api/forms/:pathPOST /api/chat/:workflowIdGET /api/mcp-server/:path/manifest,POST /api/mcp-server/:path/invokeANY /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/depthGET /api/queue/dlq
Secrets and connection tests:
POST /api/secrets,GET /api/secrets?projectId=POST /api/connectors/testPOST /api/providers/testPOST /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:
{ "items": [], "total": 0, "page": 1, "pageSize": 20 }pagestarts at 1 (default 1);pageSizedefaults to 20 and is capped at 100 (a larger value answers with 100). A value that is not a positive integer is a400.- The route's other filters apply before the page is cut, so
totalcounts what the filters match and what you may see. Fields a route returns beside its list (for exampleadaptersonGET /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/eventsandGET /api/replay/recordings(limit/offset), and thelimit-capped feeds (GET /api/approvals,/api/eval/runs,/api/replay/runs,/api/mcp/gateway/approvals,/api/budget-alerts).
Auth
POST /api/auth/registerPOST /api/auth/loginPOST /api/auth/logoutGET /api/auth/meGET /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 HttpOnlyl2m_sso_mfacookie; 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;400without email or password,503while 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 };404for 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;404as above; audited asuser.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 untilprevious.expiresAt;409 already_rotated/inactive; step-up; audited asapi_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 }, pluspending: trueandinviteExpiresAtfor 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? };200when the email belonged to a pending user, whose role is set and whose old link stops working;409when an active account has the email;inviteUrlonly when the link was not emailed; audited asuser.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;404for a tag no workflow has,409when another tag already has the name (compared without case),403when the tag is on a workflow you cannot edit, before anything changes; audited astag.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/workflowsGET /api/workflows/:idPOST /api/workflowsPUT /api/workflows/:id(both, andPOST /api/workflows/import, save a draft:400only for a broken graph or a trigger, authentication, approval, content-rule or attachment setting; unfinished node settings save andPOST /api/workflows/:id/validatelists them. The400'serrorandvalidation.issueslist only what blocks the save)DELETE /api/workflows/:id(while the workflow's release gate is on and enforced, only an admin: others get403, audited asrelease.workflow_delete.refused)POST /api/workflows/:id/duplicatePOST /api/workflows/import({ json }or{ workflow }, plusmodeanddryRun).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 (404when there is none you can read,403when you cannot write it); what it replaced is kept in the history first (before replace by import).dryRun: truestores 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.changedwith the fields,nodes.moved,edges.added,edges.removed,edges.changed,fields,identical). Audited asworkflow.importwithmodeandsourceIdGET /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/sharesalso lists them asuserSharesto whoever manages its sharesGET /api/workflows/:id/share-link(admin, builder) returns{ shareUrl, data };POST /api/workflows/import-sharedwith{ data }(or POST theshareUrlas it is) imports the copy. Opening a share link (a GET) imports nothing: it answers 405 with a hintPOST /api/workflows/import/external— convert an export from another builder; see Importing from another builderGET /api/workflows/:id/exportPOST /api/workflows/:id/validatePOST /api/workflows/:id/execute(operator and up withworkflow:execute; the editor's options, such asrecord: true, which records the run's MCP calls into a cassette (the result carriesmcpCassette), are a builder's: see Running workflows by role)GET /api/projects/:id/shared-workflows(workflow:readin the project) →{ workflows: [{ id, name, ownerProjectId, updatedAt, accessLevel, effectiveAccess }] }: the workflows other projects share to itPOST /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/streamandPOST /api/webhooks/execute(/stream)answer409when 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 carrieserrorCode: "workflow_unfinished"on the run and the node (andcodein 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 carrymcpCassette: { id, callCount, truncated }; runs saved as golden runs carrygoldenRuns: { count, latestId })GET /api/executions/:id(a failed run whose error workflow ran addserrorWorkflowRun, and an error workflow's run (triggererror) addserrorWorkflowSource:{ 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/definitionsPOST /api/connectors/testPOST /api/mcp/discover-tools(optionalprojectId; each tool carriesclassificationand anaccessmark 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; answersaddedandremovedoperation ids). A spec in a project you cannot read answers 404.
MCP server registry
See MCP server registry.
GET /api/mcp/serversPOST /api/mcp/serversGET /api/mcp/servers/:idPUT /api/mcp/servers/:idDELETE /api/mcp/servers/:idPOST /api/mcp/servers/:id/probeGET /api/mcp/servers/:id/tools?projectId=(each tool carriesclassification,manualReadOnlyand anaccessmark for the caller's role)PUT /api/mcp/servers/:id/tools/:toolName/classification(admin;{ readOnly: true | false | null })GET /api/mcp/servers/:id/snapshots/:snapshotIdPOST /api/mcp/servers/:id/accept-changeGET /api/mcp/servers/:id/telemetry?window=24h|7d|30dGET /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 withMCP_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,credentialModeanddelegatedFallback; 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-31029withdata.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 withaccessmarks)POST /api/mcp/servers/:id/resources/read(builder;{ uri, projectId? }; 413 overMCP_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 withoutworkflow:executein 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 }) onPOST /api/workflows/:id/execute/stream
MCP tool policy
See MCP tool policy.
GET /api/mcp/policies(builder)POST /api/mcp/policies(admin; optionalkindoftool|resource|prompt|sampling, see Rule kinds; optionalannotationHint, see Annotation conditions;effectmay berequire_approval; optionalconditions,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 sessionlabelsthat drove the hold, or null)POST /api/mcp/gateway/approvals/:id/approveand/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 byMcp-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? };rateLimitis 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;membersreplaces 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? };toolsetIdsmay 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: nullremoves 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 untilclient.previousExpiresAt;409 inactive,rotation_pending(an old token is still in its window: rotate withgraceHours: 0),rotation_conflict; step-up; audited asmcp_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 itsprotocolVersion; andcallers, the client's stateless MCP2026-07-28callers (toolset,userId,protocolVersionandclientInfowhen the answering instance served it recently,lastSeenAt,expiresAt,tracked,labels,raisedAt,guard), from every instance.callersUnavailable: truewhen 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/manifestPOST /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 withstream: true;stream_options.include_usageadds a usage chunk)POST /v1/embeddings(inputas a string or an array of strings;encoding_formatfloatorbase64)
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 newprojectIdmust 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? };409when 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 withdryRun: 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
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; thel2m.mcp-cassettefile)DELETE /api/mcp/cassettes/:id(admin; audit eventmcp_cassette.deleted)POST /api/executions/:id/replay(builder;{ mode?, cassetteId? }→ run result withexecutionIdandmcpReplay: { cassetteId, mode, matched, reused, live, unmatched[] }; a strict replay with unmatched calls has statuserror)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 comparisonPOST /api/eval/runsanswers202 { run, runId }and runs in the background (?wait=truekeeps the old blocking200for one release); golden sets, replay jobs and scorers are in Golden sets and replay jobsPOST /api/eval/runsgainsrecord: true(one cassette per fixture) andreplay: { evalRunId? | cassetteId?, mode? }(400 when combined withrecord, 404 for a cassette or eval run whose workflow you cannot read);GET /api/eval/runsaddsmcpCassettesGET /api/mcp/servers/:id/snapshot/export(builder; the accepted snapshot as anl2m.mcp-snapshotfile 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 withx-guard-profile-versionandx-guard-profile-hashheaders)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? };enforcedis 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? };enforcedis 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=gatewayfor gateway calls only,runfor everything else (response and request events included),responsefor responses to external callers,requestfor 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 optionalsuites,splits,categories;{ report, comparison, baseline, stored, draft, partial }; a full run of a saved version is stored, a draft's or a run narrowed bysplitsorcategoriesis not; 429 withRetry-Afterwhen 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 asguard.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;pageSize50 by default, at most 500)GET /api/audit/export(the same filters; a CSV file; audited asaudit.export)GET /api/audit-log/verify-chain({ ok, rowsChecked, firstBrokenAt?, anchor?, unverifiable? };anchornames 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;409while 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 withx-l2m-manifest-digestandx-l2m-signing-key-idheaders; 409 while in progress, 413 overAUDIT_BUNDLE_MAX_BYTES; audited asexecution.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 fromAUDIT_SIGNING_KEY_BASE64; audited asaudit.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: 0means kept forever, andbacklogcounts the rows due now up tobacklogCap, 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: nullinherits 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, ornullto inherit again;400 retention_out_of_boundsoutsideRETENTION_MIN_DAYStoRETENTION_MAX_DAYS;403 retention_admin_requiredwhen someone other than an admin setstool_callsorrule_eventsshorter than the deployment's value, audited asproject.retention.update_denied; answers the updated view)
Legal holds
See Legal holds.
GET /api/legal-holds?status=(admin orlegal_hold:manage;{ holds })POST /api/legal-holds(admin orlegal_hold:manage,subjectscope admin only; step-uplegal_hold.change;{ name, reason, matterRef?, endsAt?, scopeType: "project"|"workflow"|"runs"|"subject", scopeId?, executionIds?, subject?: { value, dataClass?, country? } };201 { hold }; audited aslegal_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 orlegal_hold:manage)POST /api/legal-holds/:id/release(admin orlegal_hold:manage, signed-in only: API keys get 403; step-up;{ reason }; 409 when already released; audited aslegal_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 reasonheld.
Data-subject requests
See Data-subject requests. The value is never echoed, logged or audited.
POST /api/data-protection/requests(admin ordata_subject:manage;{ type: "export" | "delete", subjectKind?: "end_user" | "staff", value, scan?, revealTokens? }; 201 with the request;revealTokensis for exports only and needs step-up when it is on)GET /api/data-protection/requests(admin ordata_subject:manage;{ requests }, newest first),GET /api/data-protection/requests/:id(admin ordata_subject:manage;{ id, type, subjectKind, status, scan, revealTokens, counts, foundByReference, truncated, progress, dueAt, overdue, createdBy, createdAt, updatedAt, error, export, deletion, staffPreview };statusissearching,ready,running,deferred_by_hold,done,expiredorfailed)GET /api/data-protection/requests/:id/export(admin ordata_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 ordata_subject:manage; step-up when on;{}; confirms a deletion whose preview isready, which then runs in the background; a staff erasure of an existing account is admin-only (403 otherwise) and also needs theuser.deletestep-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
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 overREPLAY_RECORDINGS_MAX_PER_WORKFLOW,REPLAY_RECORDINGS_MAX_BYTES_PER_WORKFLOWorREPLAY_RECORDINGS_MAX_TOTAL_BYTES; 413 overREPLAY_RECORDING_MAX_BYTES; audited asreplay.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;403to a builder for a golden run an admitted case of a gate that is on and enforced replays; audited asreplay.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 asreplay.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 lookupPOST /api/replay/recordings/find-subject({ value, dataClass?, country? }, search only; each match isexactor anational_onlypossible match) andPOST /api/replay/recordings/find-subject/delete(deletes the ids a search returned; a possible match only withconfirmPossible: true). The inbox'strigger=api_keylists runs an API key started. See Production capture. Captured runs (status: "candidate") are left out ofGET /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;400for a golden set of another workflow; audited asrelease.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 };409for a hash mismatch; audited asrelease.published,release.overriddenorrelease.blocked)GET /api/workflows/:id/releases(viewer;{ releases, publishedVersion }; for someone who sees only their own runs each release'sgateReasonsandreplayRunIdare empty anddetailsHidden: true)POST /api/workflows/:id/rollback(workflow:publish, and, while the gate is on and enforced, only an admin (others get403, audited asrelease.rollback.refused);{ version, reason }; only to a version published before;409when it is already live; audited asrelease.rolled_back)POST /api/workflows/:id/unpublish(workflow:publish, and an admin while the gate is on and enforced (403otherwise, audited asrelease.unpublish.refused);{ reason?, expectedVersion? }; production runs the draft until a version is published again; never blocked by the release gate, and with a gate onnoticesays production runs the ungated draft; answers{ release, productionRuns: "draft", gateEnabled, gateEnforced, notice }wherereleaseis theunpublishedhistory entry;409when nothing is published or, givenexpectedVersion, when another version is live (nothing changes); audited asrelease.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: falseand no cases otherwise;enabledsays 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? };409on an unenforced gate, or when rejecting an admitted case; audited asrelease.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 asrelease.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 (409otherwise); audited asrelease.gate.case_request.requested)PUT /api/workflows/:id/release-gatetakesadmitAddedSetCases: true(admins;403otherwise) to admit the cases of the golden sets the save adds to an enforced gate; without it they wait for admissionDELETE /api/eval/fixtures/:idandDELETE /api/eval/datasets/:idanswer403to 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 asrelease.gate.cases_removedGET /api/replay/runs/:idcarriesreleaseGate: { 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;404whenworkflowIdorexecutionIdnames a workflow or run the user cannot read, or one that does not exist; each item hasrequestId,id(the execution id),kind,status,message, approvers,editableFieldswith proposed values,path,expiresAt, the decision fields andcanDecide/cannotDecideReason)POST /api/approvals/:id/approve(:idis 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;200with the run result,202 { queued: true }with the execution queue,400for invalid edits (details: [{ key, message }]),403for self-approval, a non-approver or no project access,404when nothing is pending or the run is not visible (checked first),409when already decided, expired, orrequestIdis not the current request,503when the resume could not start (the request is pending again; decide again); audited asapproval.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 };404for a workflow (or, unsaved, a project) the user cannot read,403without 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/:nodeIdanswers400for an Approval Gate;/api/workflows/:id/executeand/api/executions/:id/retryrefuse astartNodeIdor 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 };warningsis 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/executeandPOST /api/webhooks/execute/stream(operator and up withworkflow:execute; an operator's run uses no pinned data;{ workflow_id?, webhook_path?, session_id?, system_prompt?, user_prompt?, variables?, customData?, payload? }).payloadis 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/:pathgets them; without it the body holds the prompt fields only.ANY /webhook/:path(production: answers409withcode: "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 plain404; a missing path or wrong method answers a plain404that 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 plain404; once signed:404trigger_offwhen off,409when deactivated or unfinished)ANY /webhook-test/:path(runs the draft: a signed-in session or an API key, inAuthorization: BearerorX-API-Key, of someone with edit access; anyone else gets a plain404; an operator with run access only gets403; an off webhook answers404withcode: "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.
| Case | Webhooks | Chat | MCP 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_id | 200 { ok: false, executionId, code: "content_filter", error, result: { isError: true, content: [{ type: "text", text }] } } |
| Run paused for approval | output is { waitingForApproval: true, executionId } | the same output | result is the same object |
| Run failed | 400 with error: "The workflow run failed." and executionId | 200 with ok: true, status: "error" and the run's output, no error text | 500 { 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 errors403: authorization/signature/replay errors404: resource not found409: idempotency conflicts422: content rules withheld a response (code: "content_filter")