{
  "opencollection": "1.0.0",
  "info": {
    "name": "Composio Platform Account Management Tool Router API",
    "version": "3.0.0"
  },
  "items": [
    {
      "info": {
        "name": "Tool Router",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create a new tool router session (Legacy)",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/labs/tool_router/session",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Creates a new session for the tool router lab feature (Legacy). This endpoint initializes a new session with specified toolkits and their authentication configurations. The session provides an isolated environment for testing and managing tool routing logic with scoped MCP server access."
        },
        {
          "info": {
            "name": "Create a new tool router session",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/tool_router/session",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Creates a new session for the tool router feature. This endpoint initializes a new session with specified toolkits and their authentication configurations. The session provides an isolated environment for testing and managing tool routing logic with scoped MCP server access."
        },
        {
          "info": {
            "name": "Execute a tool within a tool router session",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/execute",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "Tool router session ID (required for public API, optional for internal - injected by middleware)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Executes a specific tool within a tool router session. This is the primary execution endpoint for both meta tools and app tools exposed by the session. The toolkit is automatically inferred from the tool slug. For app tools, the tool must belong to an allowed toolkit and must not be disabled in the session configuration. The endpoint validates permissions, resolves connected accounts when needed, and executes the tool with the session context. The top-level account field applies only to direct a"
        },
        {
          "info": {
            "name": "Execute a meta tool within a tool router session",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/execute_meta",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "Tool router session ID (required for public API, optional for internal - injected by middleware)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Executes a Composio meta tool (COMPOSIO_*) within a tool router session. This endpoint is kept for meta-tool compatibility; clients can also use the primary /execute endpoint."
        },
        {
          "info": {
            "name": "Get a tool router session by ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the tool router session"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Retrieves an existing tool router session by its ID. Returns the session configuration, MCP server URL, and available tools."
        },
        {
          "info": {
            "name": "Patch a tool router session config",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the tool router session"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Partially updates the configuration of an existing tool router session. Only the fields provided in the request body will be updated. Uses optimistic concurrency control to prevent lost updates. The previous config is stored in config history."
        },
        {
          "info": {
            "name": "Create a link session for a toolkit in a tool router session",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/link",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the tool router session"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Initiates an authentication link session for a specific toolkit within a tool router session. Returns a link token and redirect URL that users can use to complete the OAuth flow."
        },
        {
          "info": {
            "name": "Execute proxy request within a tool router session",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/proxy_execute",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "Tool router session ID (required for public API, optional for internal - injected by middleware)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Execute any native API call on a toolkit with authentication automatically injected from Composio. This endpoint proxies HTTP requests to third-party APIs using connected account credentials resolved from the session context. Provide the toolkit slug, API endpoint, and HTTP method — Composio handles authentication injection, abstracting away credential management. Supports all HTTP methods, custom headers/query parameters, and binary request/response bodies."
        },
        {
          "info": {
            "name": "Get toolkits for a tool router session",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/toolkits",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the tool router session"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Number of items per page, max allowed is 50"
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "Cursor for pagination. The cursor is a base64 encoded string of the page and limit. The page is the page number and the limit is the number of items per page. The cursor is used to paginate through the items. The cursor is not required for the first page."
              },
              {
                "name": "toolkits",
                "value": "",
                "type": "query",
                "description": "Optional comma-separated list of toolkit slugs to filter by. If provided, only these toolkits will be returned, overriding the session configuration."
              },
              {
                "name": "is_connected",
                "value": "",
                "type": "query",
                "description": "Whether to filter by connected toolkits. If provided, only connected toolkits will be returned."
              },
              {
                "name": "search",
                "value": "",
                "type": "query",
                "description": "Search query to filter toolkits by name, slug, or description"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Retrieves a cursor-paginated list of toolkits available in the tool router session. Includes toolkit metadata, composio-managed auth schemes, and connected accounts if available. Optionally filter by specific toolkit slugs."
        },
        {
          "info": {
            "name": "List tools with schemas for a tool router session",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/tools",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "Tool router session ID"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Returns the tools available in a tool router session with their complete schemas. This includes both meta tools and any preloaded app tools exposed by the session."
        },
        {
          "info": {
            "name": "Search for tools using a query",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/search",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "Tool router session ID (trs_*)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Search for tools matching a given use case query within a tool router session. Returns matching tool slugs, full tool schemas, toolkit connection statuses, and workflow guidance in a predictable format."
        },
        {
          "info": {
            "name": "List files in a session mount",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/mounts/:mount_id/items",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the tool router session"
              },
              {
                "name": "mount_id",
                "value": "",
                "type": "path",
                "description": "ID of the storage mount"
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "Pagination cursor from the previous response next_cursor field"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Maximum number of files to return per page (1-500)"
              },
              {
                "name": "mount_relative_prefix",
                "value": "",
                "type": "query",
                "description": "Relative path prefix within the mount for filtering"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Lists files in a workbench session storage mount with cursor-based pagination. Use the download_url endpoint with the returned mount_relative_path to get a presigned download URL."
        },
        {
          "info": {
            "name": "Create a presigned download URL for a mount file",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/mounts/:mount_id/download_url",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the tool router session"
              },
              {
                "name": "mount_id",
                "value": "",
                "type": "path",
                "description": "ID of the storage mount"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Generates a presigned download URL for a file in a workbench session mount. Accepts a relative path within the mount."
        },
        {
          "info": {
            "name": "Create a presigned upload URL for a mount file",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/mounts/:mount_id/upload_url",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the tool router session"
              },
              {
                "name": "mount_id",
                "value": "",
                "type": "path",
                "description": "ID of the storage mount"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Generates a presigned upload URL for uploading a file to a workbench session mount. The caller should PUT the file content directly to the returned URL."
        },
        {
          "info": {
            "name": "Delete a file from a session mount",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/api/v3/tool_router/session/:session_id/mounts/:mount_id/delete",
            "params": [
              {
                "name": "session_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the tool router session"
              },
              {
                "name": "mount_id",
                "value": "",
                "type": "path",
                "description": "ID of the storage mount"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Deletes a file from a workbench session storage mount. S3 delete is idempotent — deleting a non-existent file succeeds silently."
        },
        {
          "info": {
            "name": "Composio Create a tool router session",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://backend.composio.dev/toolRouter/session",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new session for an AI agent to discover and execute tools."
        }
      ]
    }
  ],
  "bundled": true
}