Connections

A connection is an authenticated link to an external app. Before you can interact with an app (read data, create records), a connection must be established that authorizes access. See Connections API Reference for the full API.

Membrane handles the full authentication lifecycle: OAuth flows, token refresh, API key storage, reconnection on failure, and credential encryption at rest.

Connecting

Create a connection to an external app. You can connect by intent — just describe what you want to connect to and Membrane finds the right app automatically.

Way to UseHow to Connect
CLImembrane connect --intent "CRM"
MCPUse the create-connection tool
APIPOST /connect with { "intent": "CRM" }
SDKmembrane.connect({ intent: 'CRM' })
Embedded UImembrane.ui.connect({ intent: 'CRM' })
ConsoleConnections → Create Connection

Managing Connections

Listing

List all connections for the current tenant.

Way to UseHow to List
CLImembrane connection list
MCPUse the list-connections tool
APIGET /connections
SDKmembrane.connections.find()
ConsoleConnections page

Each connection includes a disconnected flag. If true, the connection needs re-authentication.

Reconnecting

When a connection is disconnected (expired token, revoked access), Membrane attempts to fix it automatically with token refresh and exponential backoff. To reconnect manually:

Way to UseHow to Reconnect
CLImembrane connect --connectionId <id>
APIPOST /connect with { "connectionId": "<id>" }
SDKmembrane.connect({ connectionId: '<id>' })
Embedded UImembrane.ui.connect({ connectionId: '<id>' })
ConsoleConnection → Reconnect

Deleting

Archive a connection to disconnect and remove it.

Way to UseHow to Delete
CLImembrane connection archive <connectionId>
APIDELETE /connections/<connectionId>
SDKmembrane.connection('<connectionId>').archive()
ConsoleConnection → Archive

Lifecycle Events

Subscribe to webhook notifications for connection lifecycle events:

  • connection.created — connection established with credentials
  • connection.deleted — connection archived
  • connection.disconnected — connection lost access
  • connection.reconnected — connection restored