Workspace Integrations

Configure integrations within workspaces, including connection strategies and action subsets.

Workspace Integrations

Workspace integrations define how an integration is configured within a workspace. Each workspace integration specifies which integration to use, how connections are resolved (the connection strategy), which actions are available, and an optional alias for disambiguation.

Built-in workspace integrations such as storage, kv-store, http, data-transformer, code, and advanced-code use the same API. Most do not require connectionId; configure their aliases, enabled actions, persistence, or execution policy here. See Built-In Workspace Integrations for the catalog.

List Workspace Integrations

GET/api/v1/workspaces/{workspaceId}/integrations

List all integrations configured for a workspace.

Path Parameters

FieldTypeDescription
workspaceIdstring (uuid)Workspace ID

Response

json
{
  "integrations": [
    {
      "id": "7df5c03e-4df5-4b5f-95a7-5277d8f972db",
      "workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "orgId": "550e8400-e29b-41d4-a716-446655440000",
      "integrationName": "slack",
      "alias": "slack",
      "displayName": "Team Slack",
      "connectionStrategy": "fixed",
      "connectionId": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
      "enabledActions": null,
      "settings": {},
      "sortOrder": 0,
      "connectionStatus": "ACTIVE",
      "connectionDisplayName": "Slack Bot",
      "connectionExternalId": "slack_bot",
      "createdAt": "2025-01-15T10:30:00.000Z",
      "updatedAt": "2025-01-15T10:30:00.000Z"
    }
  ],
  "total": 1
}

Example

bash
curl https://api.weavz.io/api/v1/workspaces/a1b2c3d4-e5f6-7890-abcd-ef1234567890/integrations \
  -H "Authorization: Bearer wvz_your_api_key"

Create Workspace Integration

POST/api/v1/workspaces/{workspaceId}/integrations

Add an integration to a workspace with a connection strategy.

Path Parameters

FieldTypeDescription
workspaceIdstring (uuid)Workspace ID

Request Body

FieldTypeRequiredDescription
integrationNamestringYesCatalog integration name (e.g., slack, github)
aliasstringNoAlias for this integration instance (defaults to integrationName). Useful when the same integration is configured multiple times with different connections.
connectionStrategystringNoOne of: fixed, per_user, per_user_with_fallback. Defaults to fixed
connectionIdstring (uuid)NoConnection ID. Required for fixed and per_user_with_fallback strategies.
displayNamestringNoFriendly label shown in the dashboard and connect surfaces
enabledActionsstring[]NoRestrict to specific actions. null or omitted means all actions are available.
settingsobjectNoOwner-controlled integration settings. For advanced-code, use settings.advancedCode to configure execution policy.
sortOrdernumberNoOptional ordering hint for dashboard and generated surfaces

Response (201)

json
{
  "integration": {
    "id": "7df5c03e-4df5-4b5f-95a7-5277d8f972db",
    "workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "orgId": "550e8400-e29b-41d4-a716-446655440000",
    "integrationName": "slack",
    "alias": "slack",
    "displayName": "Team Slack",
    "connectionStrategy": "fixed",
    "connectionId": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
    "enabledActions": null,
    "settings": {},
    "sortOrder": 0,
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z"
  }
}

Example

bash
curl -X POST https://api.weavz.io/api/v1/workspaces/a1b2c3d4-e5f6-7890-abcd-ef1234567890/integrations \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "alias": "team_slack",
    "displayName": "Team Slack",
    "connectionStrategy": "fixed",
    "connectionId": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
    "enabledActions": ["send_channel_message", "list_channels"]
  }'

Advanced Code settings

advanced-code workspace integrations support settings.advancedCode. These settings control execution environment lifecycle, timeout, and persistent storage access for every API, SDK, Playground, and MCP call that targets the workspace integration. They are not action input, so callers cannot override them at runtime.

json
{
  "integrationName": "advanced-code",
  "alias": "advanced_code",
  "settings": {
    "advancedCode": {
      "timeoutSeconds": 45,
      "sandboxPersistence": "persistent",
      "storageMountScope": "workspace"
    }
  }
}
FieldTypeDescription
timeoutSecondsnumberExecution timeout, from 1 to 60 seconds. Defaults to 30.
sandboxPersistencestringephemeral creates a fresh execution environment for each run. persistent reuses the execution environment between runs.
storageMountScopestringOne of none, end_user, workspace, or external.
storageExternalIdstringExternal namespace key required when storageMountScope is external.

Stateful tool settings

Storage, KV Store, Agent Memory, Agent Scratchpad, and Sequential Thinking workspace integrations support settings.persistence. These settings control where tool state is stored for every API, SDK, Playground, and MCP call that targets the workspace integration. They are not action input, so callers cannot override them at runtime.

json
{
  "integrationName": "kv-store",
  "alias": "workspace_kv",
  "settings": {
    "persistence": {
      "scope": "workspace"
    }
  }
}
FieldTypeDescription
scopestringOne of end_user, workspace, or external. Defaults to end_user.
externalIdstringExternal namespace key required when scope is external.

Errors

StatusCodeDescription
400VALIDATION_ERRORMissing required fields or invalid strategy
409DUPLICATEIntegration with this alias already exists in the workspace
409MCP_BEARER_BLOCKS_PER_USERThe workspace has a static bearer MCP server and the integration would require strict per-user credentials. Switch static bearer off first, or use per_user_with_fallback.

Update Workspace Integration

PATCH/api/v1/workspaces/{workspaceId}/integrations/{id}

Update a workspace integration's alias, connection strategy, connection, action subset, display name, or ordering.

Path Parameters

FieldTypeDescription
workspaceIdstring (uuid)Workspace ID
idstring (uuid)Workspace integration ID

Request Body

FieldTypeRequiredDescription
aliasstringNoUpdated workspace integration alias
connectionStrategystringNoNew connection strategy
connectionIdstring (uuid)NoNew connection ID
displayNamestring | nullNoUpdated friendly label, or null to clear
enabledActionsstring[] | nullNoUpdated action list, or null for all
settingsobject | nullNoUpdated owner-controlled integration settings, or null to reset to defaults for supported integrations.
sortOrdernumberNoUpdated ordering hint

Response

json
{
  "integration": {
    "id": "7df5c03e-4df5-4b5f-95a7-5277d8f972db",
    "workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "orgId": "550e8400-e29b-41d4-a716-446655440000",
    "integrationName": "slack",
    "alias": "team_slack",
    "displayName": "Team Slack",
    "connectionStrategy": "per_user_with_fallback",
    "connectionId": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
    "enabledActions": ["send_channel_message", "list_channels"],
    "sortOrder": 0,
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-16T14:00:00.000Z"
  }
}

Example

bash
curl -X PATCH https://api.weavz.io/api/v1/workspaces/a1b2c3d4-e5f6-7890-abcd-ef1234567890/integrations/7df5c03e-4df5-4b5f-95a7-5277d8f972db \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "connectionStrategy": "per_user_with_fallback",
    "enabledActions": ["send_channel_message", "list_channels"]
  }'

Errors

StatusCodeDescription
400NO_UPDATESNo fields provided to update
404NOT_FOUNDWorkspace integration not found
409MCP_BEARER_BLOCKS_PER_USERThe update would require strict per-user credentials while a static bearer MCP server exists for the workspace

Delete Workspace Integration

DELETE/api/v1/workspaces/{workspaceId}/integrations/{id}

Remove an integration from a workspace.

Path Parameters

FieldTypeDescription
workspaceIdstring (uuid)Workspace ID
idstring (uuid)Workspace integration ID

Response

json
{
  "deleted": true,
  "id": "7df5c03e-4df5-4b5f-95a7-5277d8f972db"
}

Example

bash
curl -X DELETE https://api.weavz.io/api/v1/workspaces/a1b2c3d4-e5f6-7890-abcd-ef1234567890/integrations/7df5c03e-4df5-4b5f-95a7-5277d8f972db \
  -H "Authorization: Bearer wvz_your_api_key"

Errors

StatusCodeDescription
404NOT_FOUNDWorkspace integration not found

Auto-Sync with MCP Servers

When you add, update, or remove workspace integrations, any MCP servers linked to the workspace automatically reflect the changes. MCP server tools are kept in sync with the workspace's integration configuration -- there is no manual sync step required.

Connection Strategies

Connection strategies control how Weavz resolves which connection to use when executing actions for a workspace integration.

fixed

A single connection is always used for this integration in this workspace. Every action execution uses the specified connection regardless of who initiated it.

Best for: Shared service accounts, organization-wide API keys, per-customer connections in multi-tenant setups.

Requires: connectionId

bash
curl -X POST https://api.weavz.io/api/v1/workspaces/{workspaceId}/integrations \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "openai",
    "connectionStrategy": "fixed",
    "connectionId": "conn_org_openai"
  }'

per_user

Each user must provide their own connection. If the user has not connected their account, the action fails with a CONNECTION_REQUIRED error.

Best for: Personal integrations where each end-user needs their own OAuth2 authorization (e.g., personal Gmail, calendar access).

bash
curl -X POST https://api.weavz.io/api/v1/workspaces/{workspaceId}/integrations \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "gmail",
    "connectionStrategy": "per_user"
  }'

per_user_with_fallback

Users can provide their own connection, but if they have not connected, a default connection is used as a fallback.

Best for: Optional personalization. For example, users can connect their own Slack account, but if they have not, the team's shared Slack bot connection is used.

Requires: connectionId (the fallback connection)

bash
curl -X POST https://api.weavz.io/api/v1/workspaces/{workspaceId}/integrations \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "connectionStrategy": "per_user_with_fallback",
    "connectionId": "conn_slack_default"
  }'

Integration Aliases

When configuring the same integration multiple times in a workspace, use alias to disambiguate the configured instances. When executing actions, creating partials, resolving dynamic properties, or managing MCP tools, target the configured instance with workspaceIntegrationId when available, or pass the alias as integrationAlias.

bash
# Bot workspace
curl -X POST https://api.weavz.io/api/v1/workspaces/{workspaceId}/integrations \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "alias": "slack_bot",
    "connectionStrategy": "fixed",
    "connectionId": "conn_slack_bot"
  }'
 
# User workspace
curl -X POST https://api.weavz.io/api/v1/workspaces/{workspaceId}/integrations \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "alias": "slack_user",
    "connectionStrategy": "per_user"
  }'

When executing actions, specify workspaceIntegrationId or integrationAlias to target the correct workspace integration instance:

bash
curl -X POST https://api.weavz.io/api/v1/actions/execute \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "actionName": "send_channel_message",
    "integrationAlias": "slack_bot",
    "workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "input": {
      "channel": "#alerts",
      "text": "Automated alert!"
    }
  }'

See Integration Aliases for alias naming rules and MCP server behavior.