Skip to main content
POST
create-connection

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
type
enum<string>
Available options:
connector,
mcp,
pipedream
name
string
meta
object
authOptionKey
string
key
string | null
Required string length: 1 - 100
integrationId
string
integrationUuid
string
integrationKey
string
connectorId
string
connectorUuid
string
connectorKey
string
connectorVersion
string
externalAppId
string
externalAppUuid
string
credentials
any
connectorParameters
any
input
any
intent
string

[Experimental] Intent-based instruction for an agent to configure this element.

connector
object

Connector to build or edit inline. Creates and links a new connector when the connection has no connectorId; updates the linked connector when it does. Same shape as the connector write API.

externalApp
object

External app to create or edit inline. Creates and links a new app when the connection has no externalAppId; updates the linked app when it does. Same shape as the external-app write API.

appUrl
string

URL or domain of the app to connect to (e.g. "https://slack.com" or "slack.com"). Resolved to an external app server-side before creating a connection.

Required string length: 1 - 2000

Response

200 - application/json

Create (or reconnect) a connection to an external app. Identify the target by a connector/integration/app identifier, or by appUrl (a URL/domain like "https://slack.com") — appUrl reuses an existing connection for that app under the tenant if one exists, otherwise creates one. When you have them, pass input / connectorParameters / credentials to set auth up front. When you have the app’s API docs, build its connector yourself by passing the connector (and externalApp) by value here — that creates the connection and connector together with your docs preserved. Use intent only as a last resort for an app you have NO docs for: it spawns a separate connector build that never sees docs you already hold. Returns the connection with its state and, while the user still needs to act, a clientAction. For a user-facing connect button, offer connect instead.

id
string
required

Internal database ID of the element. Assigned by the API; unique per element.

name
string
required
userId
string
required
tenantId
string
ownerName
string | null
type
enum<string>
Available options:
connector,
mcp,
pipedream
key
string
isTest
boolean
connected
boolean
hasDocs
boolean
docsCount
number
docsSummary
string
state
enum<string>
Available options:
BUILDING,
CLIENT_ACTION_REQUIRED,
CONFIGURATION_ERROR,
SETUP_FAILED,
READY,
DISCONNECTING
errors
object[]
requestError
object
integrationId
string
connectorId
string
externalAppId
string
connectorVersion
string
authOptionKey
string
createdAt
string
updatedAt
string
lastActiveAt
string
nextCredentialsRefreshAt
string
nextRetryTimestamp
string
retryAttempts
number
canTest
boolean
canRefreshCredentials
boolean
archivedAt
string
isDeactivated
boolean
meta
object
buildingAgentSessionId
string

Session ID for building the element via intent-based endpoints (create/update with intent). Present when state is BUILDING.

clientAction
object

Action the client must perform to advance this connection. Present if and only if state is CLIENT_ACTION_REQUIRED.

logoUri
string

Resolved app logo for this element (integration -> connector -> external app -> favicon).

input
any