Reconnect a connected account
Make a connected account work again, the way it was connected. The secret keeps its name, its hosts and its placement, so nothing that references {{secret:NAME}} changes. For an API-key integration, send the new key as apiKey: Anlyon checks it with the provider the way it checked the first one, replaces the stored value, and answers status: completed with the secret. A key the provider refuses changes nothing (CONNECTION_KEY_REJECTED). For a sign-in integration, send an empty body: Anlyon starts a consent session for the account’s existing connection and answers status: pending with the session. Open its connectUrl or hand its consent values to the console’s window, then call POST /api/v2/connections/sessions/{sessionId}/complete as for a first connect; completing marks the account working again. Sending a key for a sign-in account, or none for a key account, is 400. Counts toward the same limit of 10 per minute per workspace as connect sessions. A sign-in account that neither the environment’s own OAuth app nor Anlyon’s app on this deployment can sign in to answers 400 OWN_OAUTH_APP_REQUIRED.
/api/v2/connections/{secretName}/reconnectAuthorizationBearer token (Anlyon API key) · headerrequiredWorkspace API key sent as Authorization: Bearer <key>.
better-auth.session_tokenAPI key · cookierequiredBrowser session used by dashboard-only operations.
secretNamestringrequiredThe connected account, by its secret name.
X-Request-IdstringOptional caller correlation ID. Unsafe or oversized values are replaced.
application/jsonapiKeystringFor an API-key integration: the new key alone, with no spaces or line breaks. Checked with the provider, stored encrypted, and never returned. Omit for a sign-in integration.
fieldsConnectionFieldValuesFor an integration whose auth.fields is set: every field again. The account field must name the account already connected; another account is a new connection.
The new key was accepted and stored (completed)
successbooleanrequiredtruedataConnectionReconnectrequiredHow the reconnect went. completed: a new key was accepted and stored; secret is the account as it now stands. pending: a consent session was started for a signed-in account; finish it with POST /api/v2/connections/sessions/{sessionId}/complete.
Show propertiesHide properties
statusstringrequiredcompletedpendingsecretSecret | nullrequiredThe reconnected account once completed; null while pending.
Show propertiesHide properties
idstringrequirednamestringrequireddescriptionstring | nullrequiredallowedHostsstring[] | nullrequiredHosts this secret may be sent to. Null only on a secret stored before hosts were required, which may be sent to any public host until its next write names them.
allowedPlacementsstring[] | nullrequiredWhere in the request this secret may appear. Null means anywhere.
kindstringrequiredstatic holds a value you stored. connection is a connected account: its value is an access token fetched at dispatch, its hosts come from the integration, and it may only appear in a header. external (Enterprise) is read at dispatch from one of the environment's secret stores and is not stored by Anlyon. PUT cannot change a secret's kind.
staticconnectionexternalconnectionobject | nullrequiredFor a signed-in account, which integration it is and whether it still works. status mirrors health.status, which is the one record of it for both kinds of connected account. Null for a static secret, including one connected with an API key.
Show propertiesHide properties
integrationIdstringrequiredstatusstringrequiredThe same value as health.status. Reconnect the account to use it again.
activeneeds_reauthhealthobject | nullrequiredWhether the connected account still works, whichever way it was connected. active, or needs_reauth with a reason once the provider refused the credential or the connector service could not refresh it. A dispatch that uses a needs_reauth account fails before anything is sent. Reconnect it with POST /api/v2/connections/{secretName}/reconnect. For an external secret, whether its store could last produce it: active, or unreachable with a reason. Null for a secret you stored directly, which Anlyon cannot check.
Show propertiesHide properties
statusstringrequiredactiveneeds_reauthunreachablecheckedAtstring<date-time> | nullrequiredWhen Anlyon last asked the provider whether the credential works. Null when it never has.
reasonstring | nullrequiredSet while status is needs_reauth or unreachable. key_rejected: the provider refused the stored key. access_revoked: the provider no longer honours the signed-in account's grant. refresh_failed: the connector service could not refresh its token. store_unreachable: the secret store did not answer. store_denied: the store refused Anlyon's credential for this path. reference_not_found: the store has no secret at that path, version or key.
key_rejectedaccess_revokedrefresh_failedstore_unreachablestore_deniedreference_not_foundnullintegrationIdstring | nullrequiredThe integration this secret was connected for, by signing in or with an API key. Null for a secret you stored directly. A secret connected with an API key is static with this set.
externalobject | nullrequiredFor an external secret, the store and where in it. Never a value. Null otherwise.
Show propertiesHide properties
storestringrequiredstoreTypestringrequiredaws_secrets_managerhashicorp_vaultpathstringrequiredkeystring | nullrequiredversionstring | nullrequiredlastUsedAtstring<date-time> | nullrequiredcreatedAtstring<date-time>requiredupdatedAtstring<date-time>requirednullsessionConnectSession | nullrequiredThe consent session to finish, for a signed-in account; null once completed.
Show propertiesHide properties
sessionIdstringrequiredsessionTokenstringrequiredThe consent token in connectUrl. Whoever holds it can sign in for this session until it expires, so treat it like the link.
expiresAtstring<date-time>requiredconnectUrlstring<uri>requiredOpen in a browser to sign in at the provider. Then poll complete.
integrationConnectionIntegrationrequiredAn integration an account can be connected for.
Show propertiesHide properties
ownOAuthAppRequiredbooleanPresent on a sign-in integration whose OAuth app this deployment does not have: it is connected through the environment's own app (PUT /api/v2/environments/{environmentId}/oauth-apps/{integration}), and until that is set a connect session or link answers 400 OWN_OAUTH_APP_REQUIRED. Absent otherwise.
trueidstringrequiredStable id used in sessions and pack manifests.
namestringrequiredauthobjectrequiredHow an account is connected. oauth: start a connect session and sign in at the provider. api_key: create a key in the provider's own settings, following instructions, and send it to POST /api/v2/connections/keys. An integration that signs in and also takes a key (GitHub, Notion) is oauth with apiKey set where signing in works here, and api_key where it does not.
Show propertiesHide properties
kindstringrequiredoauthapi_keyapiKeyobjectFor oauth: the key that may be sent to POST /api/v2/connections/keys instead of signing in. Absent for an integration that only signs in.
Show propertiesHide properties
instructionsstringrequiredWhere in the provider's settings the key is created, and with which permissions.
instructionsUrlstring<uri>requiredThe provider's own page for creating the key.
fieldsobject[]As fields below, for a key made of several values.
Show propertiesHide properties
objectnamestringrequiredlabelstringrequiredsecretbooleanrequiredkindstringrequiredaccountcredentialhintstringinstructionsstringFor api_key: where in the provider's settings the key is created, and with which permissions.
instructionsUrlstring<uri>For api_key: the provider's own page for creating the key.
fieldsobject[]For api_key, when the key is several values (an email and an API token) or the host is the account's own (a subdomain): what to ask for, in order. Send them as fields instead of apiKey. Every value is stored encrypted and never returned.
Show propertiesHide properties
objectnamestringrequiredlabelstringrequiredsecretbooleanrequiredMask it in a form.
kindstringrequiredaccount names the account's own host (see hostTemplate); credential is part of the key.
accountcredentialhintstringhostsstring[] | nullrequiredThe API hosts the token may be sent to. Null when they come from the connected account itself (see hostsFromAccount).
hostsFromAccountbooleanrequiredTrue when the API host is the account's own (a Salesforce instance, a Zendesk subdomain) and is fixed at connect time.
hostTemplatestringFor an API-key integration whose host is the account's own: the one host shape it may be. The account field fills it; anything outside it is refused.
scopesstring[]requiredThe scopes requested at the provider's consent page. Empty for an api_key integration, whose access is whatever the key was given.
operationsPackstring | nullrequiredThe pack whose actions are this integration's operations: what an agent may be allowed to do once the account is connected.
workflowPacksstring[]requiredWorkflow packs that use this integration together with others.
nullBad 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.
The provider did not accept the new key (CONNECTION_KEY_REJECTED). Nothing changed.
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.
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.
The account is signed in and connected accounts are not configured on this deployment (CONNECTIONS_UNAVAILABLE).
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.
The new key could not be checked (CONNECTION_KEY_CHECK_FAILED), or the connected-account service did not answer (CONNECTION_PROVIDER_ERROR). Nothing changed.
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.

