API ReferenceTool Router

Execute a tool within a tool router session

Markdown
POST
/api/v3/tool_router/session/{session_id}/execute

Executes a specific tool within a tool router session. The toolkit is automatically inferred from the tool slug. The tool must belong to an allowed toolkit and must not be disabled in the session configuration. This endpoint validates permissions, resolves connected accounts, and executes the tool with the session context.

x-api-key<token>

API key authentication

In: header

Path Parameters

session_id?string

Tool router session ID (required for public API, optional for internal - injected by middleware)

FormattoolRouterSessionId

Request Body

application/json

tool_slug*string

The unique slug identifier of the tool to execute

Length1 <= length
arguments?

The arguments required by the tool

Default{}

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://backend.composio.dev/api/v3/tool_router/session/{session_id}/execute" \  -H "Content-Type: application/json" \  -d '{    "tool_slug": "GITHUB_CREATE_ISSUE"  }'
{
  "data": {
    "message": "Hello, World!",
    "status": "success"
  },
  "error": "string",
  "log_id": "log_abc123xyz"
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}