Anlyon API
Anlyon is the production execution runtime for AI agents. An agent invokes a named action; Anlyon resolves the action and its version, checks the caller’s scopes, evaluates policy, requests human approval when required, resolves credentials at dispatch, makes the production call itself, and records the outcome.
These guarantees cover actions routed through the hosted executor. A tool the caller’s own code invokes directly, with a credential that process holds, is not routed through Anlyon and is not governed by it.
Authentication
Developer API endpoints use a workspace API key as a bearer token:
Authorization: Bearer anlyon_your_api_key
API-key budget admission
Budgets reserve supported logical operations in Postgres with integer sub-cent cost accounting. They cover action invocations and event publishes; external provider bills and session callers are outside these caps. UTC calendar months own the reservations. Approval-pending actions reserve one invocation admission even before dispatch. These conservative admission estimates are distinct from invoice metering.
429 BUDGET_EXCEEDED refuses the whole admission. 503 BUDGET_RECONCILIATION_REQUIRED pauses keys whose legacy usage is unknown. A cached Idempotency-Key success replays normally. If that cache is lost or expires but a durable budget reservation exists, 409 BUDGET_EFFECT_ALREADY_RESERVED prevents executing the effect again. Investigate the original outcome before choosing a new key; a new key can duplicate work. Errors after admission keep their reservations until an operator proves no work occurred. Disabling or deleting a budget does not erase recorded usage.
Delivery signature environment attribution
Configured message and event-subscription signers emit legacy v1 plus signed
env/v2 attribution. v2 is HMAC-SHA256 over the exact UTF-8 string
anlyon-delivery-v2.${timestamp}.${environmentId}.${rawBody}. Receivers must
configure the expected environment independently; v1 alone provides no
environment boundary. Signing keys remain workspace-wide unless a subscription
uses its own secret. X-Anlyon-Environment-Id is reserved and informational,
not authority. Legacy queued work without recorded scope has no v2 claim.
See /verification for coverage, raw-body verification and staged migration.
Rate Limiting
Rate limits are per workspace, by plan, in one-minute windows and UTC clock hours:
- No plan and Early Beta Access: 300 requests/minute, 10,000 requests/hour
- Starter and Pro: 1,000 requests/minute, 30,000 requests/hour
- Team: 1,000 requests/minute, 45,000 requests/hour
- Enterprise: Custom
Error Handling
All errors follow a consistent format:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
}
}
Common error codes:
AUTHENTICATION_ERROR- Invalid or missing API keyRATE_LIMIT_EXCEEDED- Too many requests: the workspace’s per-minute or per-hour API request limit (429, withRetry-After)QUOTA_EXCEEDED- Usage quota exceededVALIDATION_ERROR- Invalid request dataNOT_FOUND- Resource not foundFEATURE_NOT_AVAILABLE- Feature not available on your planPAYMENT_REQUIRED- The workspace has no plan, so actions are not run (402)PLAN_FEATURE_REQUIRED- Creating or changing this needs the Team plan (403)PAID_PLANS_UNAVAILABLE- Paid plans cannot be bought right now (403)FUNCTION_RUN_CONCURRENCY_LIMIT- The plan’s hosted function runs at once are all going (429)FUNCTION_RUN_RATE_LIMITED- The plan’s hosted function run starts a minute are used (429)
https://api.anlyon.comhttp://localhost:4000Actions
Define and invoke secret-backed hosted tools
- GETList actions
/api/v2/actions - POSTCreate an action
/api/v2/actions - GETList upstream MCP servers
/api/v2/mcp-upstreams - POSTRegister an upstream MCP server
/api/v2/mcp-upstreams - POSTInspect an MCP server before registering it
/api/v2/mcp-upstreams/inspect - GETGet an upstream MCP server
/api/v2/mcp-upstreams/{id} - POSTList an upstream's tools again
/api/v2/mcp-upstreams/{id}/refresh - POSTAdopt tools as governed actions
/api/v2/mcp-upstreams/{id}/adopt - POSTArchive an upstream MCP server
/api/v2/mcp-upstreams/{id}/archive - POSTCreate a connect link for an end user to an MCP server
/api/v2/mcp-upstreams/{id}/connect-links - POSTImport actions from OpenAPI
/api/v2/actions/import - GETList action invocations
/api/v2/actions/invocations - GETGet an action invocation
/api/v2/actions/invocations/{id} - GETGet an action
/api/v2/actions/{ref} - PATCHUpdate an action
/api/v2/actions/{ref} - DELETEDelete an action
/api/v2/actions/{ref} - POSTInvoke an action
/api/v2/actions/{ref}/invoke - GETList one action's immutable versions
/api/v2/actions/{ref}/versions - GETList governed effects
/api/v2/actions/effects - GETGet an effect with its evidence
/api/v2/actions/effects/{id} - POSTReconcile an effect now
/api/v2/actions/effects/{id}/reconcile - POSTAdd an investigation note
/api/v2/actions/effects/{id}/notes - POSTRecord a manual resolution
/api/v2/actions/effects/{id}/resolve - POSTReplay a lost write under the same identity
/api/v2/actions/effects/{id}/replay - GETGet a preview
/api/v2/actions/previews/{id} - POSTRefresh a preview's evidence
/api/v2/actions/previews/{id}/refresh - POSTPreview a governed invocation
/api/v2/actions/{ref}/previews - POSTResolve an unknown invocation
/api/v2/actions/invocations/{id}/resolve - GETList one action's invocations
/api/v2/actions/{ref}/invocations
Approvals
Create and decide human-in-the-loop safety gates
- POSTRequest an approval
/api/v2/approvals - GETList approvals
/api/v2/approvals - GETGet or wait for an approval
/api/v2/approvals/{id} - POSTApprove a request
/api/v2/approvals/{id}/approve - POSTDeny a request
/api/v2/approvals/{id}/deny
Approval Policies
Configure the environment-scoped rules that decide whether a request needs approval, is auto-approved, or is auto-denied. Operator credentials only.
- POSTEvaluate current policies without executing
/api/v2/approval-policies/evaluate - GETList approval policies
/api/v2/approval-policies - POSTCreate an approval policy
/api/v2/approval-policies - POSTPlan a policy file
/api/v2/approval-policies/files/plan - POSTApply a policy file
/api/v2/approval-policies/files/apply - POSTTest a policy file against fixture requests
/api/v2/approval-policies/files/test - GETRead immutable policy history
/api/v2/approval-policies/{policyId}/versions - GETRead one policy version
/api/v2/approval-policies/{policyId}/versions/{version} - GETGet an approval policy
/api/v2/approval-policies/{policyId} - PATCHUpdate an approval policy
/api/v2/approval-policies/{policyId} - DELETEDelete an approval policy
/api/v2/approval-policies/{policyId}
Impact Limits
Shared business-impact limits (money, resource mutations) that governed effects reserve before dispatch. Separate from Budgets, which cap Anlyon usage.
- GETList impact limits
/api/v2/impact-limits - POSTCreate an impact limit
/api/v2/impact-limits - GETGet an impact limit
/api/v2/impact-limits/{id} - PATCHUpdate an impact limit
/api/v2/impact-limits/{id} - DELETEArchive an impact limit
/api/v2/impact-limits/{id}
Sign-offs
Changes an agent asked for that loosen a guardrail, waiting for a workspace admin. An agent may never loosen its own guardrails.
- GETList sign-off requests
/api/v2/sign-offs - GETGet a sign-off request
/api/v2/sign-offs/{signOffId} - POSTCancel a sign-off request
/api/v2/sign-offs/{signOffId}/cancel
End users
Act for your users. Each of your end users connects their own accounts; every action your agent takes in them is limited, approved and receipted per end user. Your server names the end user in the Anlyon-End-User header; the model never does.
- DELETEErase an end user
/api/v2/end-users/{endUserId} - GETList an end user's connections
/api/v2/end-users/{endUserId}/connections - POSTCreate a connect link
/api/v2/end-users/{endUserId}/connect-links - POSTConfirm a connection
/api/v2/end-users/{endUserId}/connections/confirm - PUTStore an end user's API key
/api/v2/end-users/{endUserId}/connections/{integration} - DELETEDisconnect an end user's account
/api/v2/end-users/{endUserId}/connections/{integration} - GETList an end user's approvals
/api/v2/end-users/{endUserId}/approvals - POSTDecide an end user's approval
/api/v2/end-users/{endUserId}/approvals/{approvalId}/decide - POSTCreate an end-user session
/api/v2/end-users/{endUserId}/sessions
Connected accounts
Connect an account at a provider through its own consent page. The result is a secret whose access token is fetched at dispatch and never returned.
- GETList connected accounts
/api/v2/connections - GETList connectable integrations
/api/v2/connections/integrations - GETFind the best way to act in an app
/api/v2/connections/integrations/find - POSTConnect an integration with an API key
/api/v2/connections/keys - POSTStart a connect session
/api/v2/connections/sessions - POSTComplete a connect session
/api/v2/connections/sessions/{sessionId}/complete - POSTCheck a connected account
/api/v2/connections/{secretName}/check - POSTReconnect a connected account
/api/v2/connections/{secretName}/reconnect
Secrets
Store write-only credentials used by hosted actions
- GETList secret metadata
/api/v2/secrets - GETGet secret metadata
/api/v2/secrets/{name} - PUTCreate or rotate a secret
/api/v2/secrets/{name} - DELETEDelete a secret
/api/v2/secrets/{name}
Secret stores
Enterprise. Your own AWS Secrets Manager or HashiCorp Vault, per environment. A secret of kind external points into one and is read at dispatch, never stored by Anlyon. Managing stores needs secret-stores:read or secret-stores:write, privileged scopes no key receives by default; secrets that point into a store use secrets:* like any other.
- POSTCheck an external secret
/api/v2/secrets/{name}/check - GETList secret stores
/api/v2/secret-stores - POSTAdd a secret store
/api/v2/secret-stores - GETGet a secret store
/api/v2/secret-stores/{name} - PATCHChange a secret store
/api/v2/secret-stores/{name} - DELETEDelete a secret store
/api/v2/secret-stores/{name} - POSTCheck a secret store
/api/v2/secret-stores/{name}/check
Functions
Your own code, run with no network and no secrets. Its one way to change anything is to call your actions, and each call is limited, approved and receipted like any action call.
- POSTCreate a function
/api/v2/functions - GETList functions
/api/v2/functions - DELETEDelete a function
/api/v2/functions/{name} - GETList a function's versions
/api/v2/functions/{name}/versions - POSTPublish a function version
/api/v2/functions/{name}/versions - GETGet a function version
/api/v2/functions/{name}/versions/{version} - GETList a function's runs
/api/v2/functions/{name}/runs - POSTRun a function
/api/v2/functions/{name}/runs - GETGet a function run
/api/v2/function-runs/{id}
Environments
Read an environment, halt it and resume it
- GETGet this key's environment
/api/v2/environment - POSTHalt this key's environment
/api/v2/environment/halt - POSTResume this key's environment
/api/v2/environment/resume
Runs
Record what an agent did as a run with spans, and export it
- POSTStart a run
/api/v2/runs - GETList runs
/api/v2/runs - POSTImport an OTLP/JSON trace
/api/v2/runs/import - GETGet a run with its span tree
/api/v2/runs/{runId} - PATCHEnd or update a run
/api/v2/runs/{runId} - GETExport a run as OTLP/JSON
/api/v2/runs/{runId}/export - POSTAttach feedback to a run
/api/v2/runs/{runId}/feedback - GETList feedback for a run
/api/v2/runs/{runId}/feedback - POSTIngest spans
/api/v2/runs/{runId}/spans
Events
Publish typed events and deliver them to filtered webhook subscriptions
- GETList event topics
/api/v2/events/topics - POSTCreate an event topic
/api/v2/events/topics - GETGet an event topic
/api/v2/events/topics/{ref} - PATCHUpdate an event topic
/api/v2/events/topics/{ref} - DELETEDelete an event topic
/api/v2/events/topics/{ref} - GETList topic subscriptions
/api/v2/events/topics/{ref}/subscriptions - POSTCreate a webhook subscription
/api/v2/events/topics/{ref}/subscriptions - PATCHUpdate a webhook subscription
/api/v2/events/subscriptions/{subscriptionId} - DELETEDelete a webhook subscription
/api/v2/events/subscriptions/{subscriptionId} - POSTRotate a subscription signing secret
/api/v2/events/subscriptions/{subscriptionId}/rotate-secret - POSTPublish an event
/api/v2/events - GETList published events
/api/v2/events - GETGet an event and its deliveries
/api/v2/events/{eventId}
Stream
Subscribe to the realtime event stream
Audit
Audit streaming and the evidence export (Enterprise). Stored audit records in one versioned shape, streamed to a signed webhook, an S3-compatible bucket, Datadog or Splunk, with per-workspace retention.
- GETList audit records
/api/v2/audit/events - GETExport audit records as evidence
/api/v2/audit/export - GETGet the audit event JSON Schema
/api/v2/audit/schema
Budgets
Control per-API-key usage and estimated spend
- GETList API-key budgets
/api/v2/budgets - GETGet an API-key budget
/api/v2/budgets/{apiKeyId} - PUTCreate or replace an API-key budget
/api/v2/budgets/{apiKeyId} - DELETEDelete an API-key budget
/api/v2/budgets/{apiKeyId}
Analytics
View analytics and usage statistics
- GETGet cross-product analytics overview
/api/v2/analytics/overview - GETGet agent analytics
/api/v2/analytics/agents - GETGet trust and control analytics
/api/v2/analytics/trust-control - GETGet current usage
/api/v2/analytics/usage/current - GETGet usage history
/api/v2/analytics/usage/history - GETGet workspace onboarding progress
/api/v2/analytics/onboarding
Billing
Manage billing, plans, and usage
- GETGet current plan details
/api/v2/billing/plan - GETGet current billing period usage
/api/v2/billing/usage/current - GETGet current quota utilization
/api/v2/billing/quota - GETRead workspace overage alert target
/api/v2/billing/budget - GETList available plans
/api/v2/billing/plans - GETGet daily billing usage history
/api/v2/billing/usage/history - GETEstimate current-month cost
/api/v2/billing/cost-estimate - GETList workspace invoices
/api/v2/billing/invoices
Notifications
Manage notifications and preferences
- GETList notifications
/api/v2/notifications - PATCHMark notification as read
/api/v2/notifications/{id}/read - PATCHMark all notifications as read
/api/v2/notifications/read-all - GETGet notification preferences
/api/v2/notifications/preferences - PATCHUpdate notification preferences
/api/v2/notifications/preferences - GETGet unread notification count
/api/v2/notifications/unread-count - DELETEDismiss a notification
/api/v2/notifications/{id} - GETGet your own notification preferences
/api/v2/notifications/preferences/me - PATCHUpdate your own notification preferences
/api/v2/notifications/preferences/me - POSTSend a test notification webhook
/api/v2/notifications/preferences/test-webhook
Integrations
Connect Slack and Discord notification destinations without exposing stored credentials
- GETList workspace integrations
/api/v2/integrations - POSTCreate a Discord webhook integration
/api/v2/integrations/discord - POSTSend a Discord test notification
/api/v2/integrations/discord/{id}/test - GETList Slack channels
/api/v2/integrations/slack/{id}/channels - PATCHSelect a Slack channel
/api/v2/integrations/slack/{id}/channel - POSTSend a Slack test notification
/api/v2/integrations/slack/{id}/test - DELETEDelete an integration
/api/v2/integrations/{id} - PATCHEnable or disable an integration
/api/v2/integrations/{id}/toggle - PATCHUpdate integration event types
/api/v2/integrations/{id}/events
Authentication
Inspect the credential making the request

