Skip to main content
Connect, Disconnect, and Toggle require an authenticated session (workspace owner or admin) — they’re designed for the AI Suite web app’s settings UI, not machine-to-machine API key access. List works with either a session or an API key.

List Connectors

GET /api/v1/workspaces/{workspaceId}/mcp-connectors
connectors
object[]
curl https://suite.sundaypyjamas.com/api/v1/workspaces/ws_123/mcp-connectors \
  -H "Authorization: Bearer spj_ai_your_api_key_here"

Connect

POST /api/v1/workspaces/{workspaceId}/mcp-connectors/{connectorId}
Starts an OAuth flow for the connector. Redirect the user to the returned authorizeUrl; after they approve, the provider redirects to AI Suite’s OAuth callback, which completes the connection and redirects the user to returnTo.
returnTo
string
Where to send the user after the OAuth flow completes. Defaults to the workspace’s agent settings page. Unsafe/external paths are ignored.
authorizeUrl
string
Redirect the user’s browser here to start OAuth.
curl -X POST https://suite.sundaypyjamas.com/api/v1/workspaces/ws_123/mcp-connectors/notion \
  -H "Cookie: <session_cookie>" \
  -H "Content-Type: application/json" \
  -d '{ "returnTo": "/workspace/ws_123/agents?tab=connectors" }'
{ "authorizeUrl": "https://api.notion.com/v1/oauth/authorize?client_id=...&code_challenge=...&state=..." }
Tokens are never returned to the client — they’re exchanged server-side and stored encrypted. On completion, the user lands back on returnTo with ?connected={connectorId} appended so your UI can refresh.

Disconnect

DELETE /api/v1/workspaces/{workspaceId}/mcp-connectors/{connectorId}
Revokes the stored OAuth tokens and marks the connector disconnected. Idempotent.
{ "disconnected": true }

Enable / Disable

PATCH /api/v1/workspaces/{workspaceId}/mcp-connectors/{connectorId}
Toggles whether a connected connector is available to agents, without revoking its tokens — useful for temporarily pausing access.
enabled
boolean
required
curl -X PATCH https://suite.sundaypyjamas.com/api/v1/workspaces/ws_123/mcp-connectors/notion \
  -H "Cookie: <session_cookie>" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": false }'
{ "enabled": false }

Errors

StatusErrorCause
400enabled boolean is requiredToggle: missing/invalid enabled
401 / 403Only workspace owners and admins can manage skillsConnect/Disconnect/Toggle by a non-admin
404Connector not foundUnknown connectorId
500Failed to start OAuth / Failed to disconnect connector / Failed to update connectorServer error