API ReferenceTool Router

Execute proxy request within a tool router session

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

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.

x-api-key<token>

Project API key authentication

In: header

Path Parameters

session_idstring

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

Format: toolRouterSessionId

Request Body

application/json

toolkit_slugstringRequired

The slug of the toolkit to use for the request

endpointstringRequired

The API endpoint to call (absolute URL or path relative to base URL of the connected account)

methodenumRequired

The HTTP method to use for the request

Possible values:
GETPOSTPUTDELETEPATCHHEAD
bodynullable object

The request body (for POST, PUT, and PATCH requests)

binary_bodyobject | object

Binary body to send. For binary upload via URL: use {url: "https://...", content_type?: "..."}. For binary upload via base64: use {base64: "...", content_type?: "..."}.

parametersarray of object

Additional HTTP headers or query parameters to include in the request

custom_connection_dataobject

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}/proxy_execute" \  -H "Content-Type: application/json" \  -d '{    "toolkit_slug": "gmail",    "endpoint": "/api/v1/resources",    "method": "GET"  }'
{
  "data": {
    "id": "123",
    "name": "Resource Name",
    "created_at": "2023-01-01T00:00:00Z"
  },
  "binary_data": {
    "url": "string",
    "content_type": "string",
    "size": 0,
    "expires_at": "string"
  },
  "status": 200,
  "headers": {
    "content-type": "application/json",
    "cache-control": "no-cache"
  }
}
{
  "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"
    ]
  }
}