Get this key's environment
The environment this API key is bound to, including whether it is currently halted.
/api/v2/environmentAuthorizationBearer token (Anlyon API key) · headerrequiredWorkspace API key sent as Authorization: Bearer <key>.
better-auth.session_tokenAPI key · cookierequiredBrowser session used by dashboard-only operations.
X-Request-IdstringOptional caller correlation ID. Unsafe or oversized values are replaced.
A single environment.
successbooleanrequiredtruedataEnvironmentrequiredShow propertiesHide properties
idstring<uuid>requiredkindstringdevelopmentstagingproductionnamestringrequiredslugstringrequiredisDefaultbooleanrequiredThe environment new keys and resources default to.
isProtectedbooleanrequiredProduction protection for destructive and promotion actions.
haltedbooleanrequiredKill switch: while true the agent cannot act and nothing leaves the environment. Action calls, hosted function runs and event publishes from an agent key are refused, and approved calls do not run. Approvals can still be decided, and reads still answer.
haltedAtstring<date-time> | nullrequiredhaltedReasonstring | nullrequiredallowedRedirectUrlsstring[]Where an end user's connect link may send them back to: each an origin plus a path prefix, matched exactly.
defaultRedirectUrlstring | nullThe redirect a connect link uses when none is given, including the links in a 409. One of allowedRedirectUrls.
connectConfirmationstringrequired: an end user's finished OAuth consent waits for your server to confirm it (the account-takeover defence). off only on an unprotected development environment.
requiredoffcreatedAtstring<date-time>requiredupdatedAtstring<date-time>requiredUnauthorized - 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.
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.

