Patch a tool router session config (v3.1)v3.1
Partially updates an existing tool router session. Inline fields update only the supplied settings. Alternatively, experimental.session_config_id applies the latest active saved config from this project, replacing toolkit, tool, and tag access while preserving other settings. Later saved-config edits do not sync automatically. Uses optimistic concurrency control and retains the previous policy in config history.
Authorization
ApiKeyAuth Project API key authentication
In: header
Path Parameters
The unique identifier of the tool router session
toolRouterSessionIdRequest Body
application/json
Toolkit configuration - specify either enable toolkits (allowlist) or disable toolkits (denylist). Mutually exclusive. Experimentally, it can also list toolkits whose tools need approval, with or without a filter.
The auth configs to use for the session. This will override the default behavior and use the given auth config when specific toolkits are being executed
The connected accounts to use for the session, as an array of nano-IDs per toolkit. This overrides the default behaviour and pins specific connected accounts when toolkits are executed. Each account must exist (not deleted or disabled) and belong to the same user_id as the session. Multi-account sessions can pin multiple; non-multi-account sessions are capped at length 1.
Controls instant usage, subject to project permission and session toolkit and tool restrictions. False disables instant usage. Omission on create or an empty object enables it with charges hidden. On PATCH, omitted fields are preserved; an object re-enables a disabled setting.
Tool-level configuration per toolkit. Allows you to enable, disable, or filter by tags for specific tools within each toolkit, and experimentally to list tools that need approval. Every tool slug must be a valid Composio tool slug for that toolkit — invalid or typo'd slugs fail session creation with a clear error listing which ones didn't match.
Session-wide tags for filtering tools. Array format is treated as an enabled list. Object format supports enable (a tool must have at least one) and disable (a tool must have none), and experimentally the tags whose tools need approval. If a toolkit sets tools.<toolkit>.tags, its tools use that object instead of this one.
Preload configuration. Use an explicit list for frequently used tool slugs, or "all" to dynamically expose every app tool allowed by positive toolkits/tools/tags filters.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v3.1/tool_router/session/trs_1a2b3c4d5e6f" \ -H "Content-Type: application/json" \ -d '{}'{ "session_id": "trs_1a2b3c4d5e6f", "mcp": { "type": "http", "url": "https://app.composio.dev/tool_router/v3/trs_1a2b3c4d5e6f/mcp" }, "tool_router_tools": [ "string" ], "config": { "user_id": "string", "toolkits": { "enabled": [ "string" ], "require_approval": [ "string" ] }, "auth_configs": { "property1": "string", "property2": "string" }, "instant": false, "manage_connections": { "enabled": true, "callback_url": "http://example.com", "enable_wait_for_connections": false, "enable_connection_removal": true }, "tools": { "property1": { "enabled": [ "string" ], "require_approval": [ "string" ] }, "property2": { "enabled": [ "string" ], "require_approval": [ "string" ] } }, "tags": { "enabled": [ "readOnlyHint" ], "disabled": [ "readOnlyHint" ], "require_approval": [ "readOnlyHint" ] }, "workbench": { "enable": true, "proxy_execution_enabled": true }, "multi_account": { "enable": true, "max_accounts_per_toolkit": 0, "require_explicit_selection": true }, "proxy_execute": { "enable": true }, "preload": { "tools": [ "string" ] }, "connected_accounts": { "property1": [ "string" ], "property2": [ "string" ] }, "search": { "enable": true }, "execute": { "enable_multi_execute": true } }, "config_version": 0, "experimental": { "assistive_prompt": "string", "custom_toolkits": [ { "slug": "string", "name": "string", "description": "string", "tools": [ { "slug": "string", "name": "string", "description": "string", "input_schema": { "property1": null, "property2": null }, "output_schema": { "property1": null, "property2": null }, "original_slug": "string", "preload": true } ], "preload": true } ], "custom_tools": [ { "slug": "string", "name": "string", "description": "string", "input_schema": { "property1": null, "property2": null }, "output_schema": { "property1": null, "property2": null }, "extends_toolkit": "string", "original_slug": "string", "preload": true } ], "no_elicitation_support_fallback": "deny", "source_session_config": { "id": "string" } }, "warnings": [ { "code": "PRELOAD_TOOLS_HIGH_CONTEXT_USAGE", "message": "Session preloads 25 tools; each preloaded tool adds to the agent context window. Consider keeping the list at or under ~20 tools." } ]}