Start a connect session
Start the consent flow for one integration whose auth.kind is oauth. An api_key integration is refused here; send its key to POST /api/v2/connections/keys. Open connectUrl in a browser, or hand the consent values to the console’s consent window. The session expires after 15 minutes. At most 10 sessions may be started per minute per workspace. The secret name must not exist yet in this environment.
/api/v2/connections/sessionsAuthorizationBearer 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.
application/jsonintegrationIdstringrequiredsecretNamestringrequiredThe secret the connected account becomes; actions reference it as {{secret:NAME}}.
descriptionstringSession started.
successbooleanrequiredtruedataConnectSessionrequiredShow propertiesHide properties
sessionIdstringrequiredsessionTokenstringrequiredOpaque token for the consent window. Valid for this session only.
expiresAtstring<date-time>requiredconnectUrlstring<uri>requiredOpen in a browser to run the consent flow.
consentobjectrequiredWhat a consent window opened from the console needs.
Show propertiesHide properties
originstring<uri>requiredwebsocketsPathstringrequiredkeystringrequiredOpaque key naming the consent flow for this integration.
integrationConnectionIntegrationrequiredAn integration an account can be connected for.
Show propertiesHide properties
idstringrequiredStable 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.
Show propertiesHide properties
kindstringrequiredoauthapi_keyinstructionsstringFor 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.
hostsstring[] | 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) and is fixed at connect time.
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.
Bad Request - Invalid input data
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectUnauthorized - Invalid or missing API key
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectPayment Required - Usage quota exceeded
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectAuthenticated credential lacks the required scope or workspace access.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectNot Found - Resource does not exist
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectThe request conflicts with current resource state or a concurrent decision.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectToo Many Requests - Rate limit exceeded
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectConnected accounts are not configured on this deployment (CONNECTIONS_UNAVAILABLE).
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectThe connected-account service did not answer (CONNECTION_PROVIDER_ERROR). Nothing was created.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobject
