Preview a governed invocation
Normalize the input, resolve the exact target, read the provider (never write), and return a typed, execution-bound preview: environment and target, the exact change (field summaries and text diffs), expected impact against current impact limits, material preconditions with the time they were observed, expiry, and the adapter’s guarantees and limitations. Pass its id as previewId when invoking; any material difference is refused. For a declared action the preview is the normalized request itself, with every secret still a {{secret:NAME}} reference. Anlyon does not read an API it has no adapter for before the write, and the preview lists what a declared action does not guarantee.
/api/v2/actions/{ref}/previewsAuthorizationBearer token (Anlyon API key) · headerrequiredWorkspace API key sent as Authorization: Bearer <key>.
better-auth.session_tokenAPI key · cookierequiredBrowser session used by dashboard-only operations.
refstringrequiredAction name or public action identifier.
X-Request-IdstringOptional caller correlation ID. Unsafe or oversized values are replaced.
Anlyon-End-UserstringThe end user this call acts for: your own id for them, 1 to 128 characters of letters, digits and . _ : @ -. Accepted only with an API key, which stays on your server; a session or an OAuth token that sends it is refused. A key created with endUserRequired must send it on every action call (400 END_USER_REQUIRED). On an /end-users/{endUserId} route it must name the same end user as the path.
application/jsoninputobjectttlSecondsintegerrunIdstringResolve the action version this run's agent pins.
Preview returned.
successbooleanrequiredtruedataActionPreviewrequiredShow propertiesHide properties
idstringrequiredactionobjectrequiredShow propertiesHide properties
idstringrequirednamestringrequiredversionIdstringrequiredadapterobjectrequiredShow propertiesHide properties
typestringrequiredversionstringrequiredenvironmentobjectrequiredShow propertiesHide properties
idstringrequirednamestringrequiredkindstringrequiredtargetobjectrequiredrequestobjectrequiredThe exact normalized request that will be dispatched.
impactImpactQuantity[]requiredShow propertiesHide properties
ImpactQuantitydimensionstringrequiredmoney, resource_mutations, or a workspace-declared unit such as emails.
currencystringPresent for money.
amountintegerrequiredInteger minor units for money. A count for every other dimension.
boundstringrequiredexactupper_boundblocksPreviewBlock[]requiredShow propertiesHide properties
PreviewBlocktypestringrequiredfieldstext_diffimpactlimitationstitlestringrequiredfieldsobject[]Show propertiesHide properties
objectlabelstringrequiredvaluestringrequiredpathstringbeforestringafterstringtruncatedbooleanquantitiesImpactQuantity[]itemsobject[]Show propertiesHide properties
objectkindstringrequiredguaranteefreshnessunsupportedirreversibletextstringrequiredpreconditionsobjectrequiredMaterial preconditions; part of the binding.
capabilitiesobjectrequiredThe adapter's declared guarantees.
allowancesobject[]requiredApplicable impact limits at preview time. Dispatch rechecks.
evidenceObservedAtstring<date-time>requiredexpiresAtstring<date-time>requiredexpiredbooleanrequiredrequestDigeststringrequiredbindingDigeststringrequiredSHA-256 over the canonical request, target, versions, preconditions, scope and expiry. What an approval agrees to.
supersedesstring | nullrequiredeffectIdstring | nullrequiredThe effect executing this preview, once one is admitted.
endUserIdstring | nullrequiredThe end user whose account read the provider. An invoke with this preview must name the same end user, and only a call for that end user (or one naming none) can read it.
createdAtstring<date-time>requiredBad Request - Invalid input data
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Unauthorized - Invalid or missing API key
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Authenticated credential lacks the required scope or workspace access.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Not Found - Resource does not exist
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
A conflict with current state, or, for a call made for an end user, END_USER_NOT_CONNECTED (they have not connected the integration) or END_USER_RECONNECT_REQUIRED (the provider refused their grant, or it could not be refreshed). Nothing was sent. Those two carry integration, displayName, endUserId and, when the environment has a default redirect URL and the integration signs in with OAuth, a fresh connectUrl with its expiresAt. A tool adopted from an MCP server that signs people in answers the same, with the server's mcp-<id> key as integration and its name as displayName.
successbooleanrequiredrequestIdstringrequirederrorobjectrequiredShow propertiesHide properties
codestringrequiredEND_USER_NOT_CONNECTED, END_USER_RECONNECT_REQUIRED, or another conflict code.
messagestringrequireddetailsobjectintegrationstringThe integration the end user needs to connect, or mcp-<id> for a tool adopted from an MCP server that signs people in. Present on the two end-user codes.
displayNamestringThe name to show the end user: the integration's, or the MCP server's. Present on the two end-user codes.
endUserIdstringPresent on the two end-user codes.
connectUrlstring<uri>A fresh connect link on the environment's default redirect URL. Absent without a default redirect URL
expiresAtstring<date-time>When connectUrl expires.
fixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.
Too Many Requests - Rate limit exceeded. A workspace's API requests are limited per minute and per UTC clock hour by plan; Retry-After says when to try again, and an hourly refusal names the limit and when the count resets. Successful responses carry the same limits in X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (the minute) and X-RateLimit-Limit-Hour, X-RateLimit-Remaining-Hour, X-RateLimit-Reset-Hour (the hour).
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectfixErrorFixHow to get past this error, for a person or an agent. Present on refusals with a known next step, such as a missing scope or role, a plan or billing limit, a halted environment, or a missing secret, connected account, OAuth app or end-user header. Absent when there is no fix to give. Kept in production responses, unlike details.
Show propertiesHide properties
summarystringrequiredOne sentence that says what to do.
commandstringAn exact anlyon CLI command that fixes it. Absent when no command does.
urlstring<uri>An absolute console link where a person fixes it.
docsstring<uri>A docs page that explains it.

