Patch a tool router session config
Changed onPartially 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.
Request
- Base URLhttps://backend.composio.dev
- URLhttps://backend.composio.dev/api/v3/tool_router/session/{session_id}
- AuthAPI key in header x-api-key
Path parameters
The unique identifier of the tool router session
Request body
Example request
{
"toolkits": {
"enable": [
"gmail",
"slack",
"github"
],
"require_approval": [
"github"
]
},
"auth_configs": {
"gmail": "ac_1a2b3c4d5e6f",
"slack": "ac_7g8h9i0j1k2l"
},
"connected_accounts": {
"github": "ca_3m4n5o6p7q8r"
},
"instant": {
"toolkits": {
"enable": [
"gmail",
"slack",
"github"
]
}
},
"manage_connections": {
"enable": true,
"callback_url": "https://your-app.com/auth/callback"
},
"tags": {
"require_approval": [
"destructiveHint"
]
},
"workbench": {
"enable": true,
"enable_proxy_execution": true,
"auto_offload_threshold": 20000,
"sandbox_size": "large"
},
"multi_account": {
"enable": true,
"max_accounts_per_toolkit": 5
},
"proxy_execute": {
"enable": true
},
"preload": {
"tools": [
"GMAIL_FETCH_EMAILS",
"SLACK_SEND_MESSAGE"
]
}
}Response
Session config successfully patched.
Example response
{
"session_id": "trs_1a2b3c4d5e6f",
"mcp": {
"url": "https://app.composio.dev/tool_router/v3/trs_1a2b3c4d5e6f/mcp"
},
"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."
}
]
}Changes
- breaking
the
request property type changed from no type toarray - warning
removed
subschema #2from therequest propertyallOflist - info
the request property
became nullable
- breaking
- breaking
removed
subschema #1subschema #2from the/////request propertyoneOflist - breaking
added
subschema #1subschema #2to the//response propertyoneOflist for the response status - info
added
subschema #1subschema #2to the/////request propertyoneOflist - info
removed
subschema #1subschema #2from the//response propertyoneOflist for the response status
- breaking