create()
Create a connection by passing existing credentials.| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace external ID |
integrationType | IntegrationType | Yes | Provider: gmail, gdrive, github, notion, linear, slack, posthog |
accessToken | string | No | OAuth access token |
refreshToken | string | No | OAuth refresh token |
apiKey | string | No | API key (for key-based integrations) |
scope | string | No | OAuth scope string |
extra | Record<string, string> | No | Provider-specific extra fields |
Promise<Connection>
| Field | Type | Description |
|---|---|---|
external_id | string | Unique connection identifier |
workspace_id | string | Workspace this connection belongs to |
integration_type | string | Provider type |
scope | string | undefined | OAuth scope granted |
expires_at | string | undefined | When credentials expire |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
list()
List all connections in a workspace.| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace external ID |
Promise<Connection[]>
del()
Delete a connection.| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace external ID |
connectionId | string | Yes | Connection external ID |
Promise<void>