API ReferenceTools

Execute proxy request

Markdown
POST
/api/v3/tools/execute/proxy

Proxy an HTTP request to a third-party API using connected account credentials. This endpoint allows making authenticated API calls to external services while abstracting away authentication details.

Authorization

ApiKeyAuth
x-api-key<token>

API key authentication

In: header

Request Body

application/json

connected_account_id?string

The ID of the connected account to use for authentication (if not provided, will use the default account for the project)

FormatconnectedAccountId
endpoint*string

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

method*string

The HTTP method to use for the request

Value in"GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD"
body?|null

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

binary_body?|

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

parameters?

Additional HTTP headers or query parameters to include in the request

custom_connection_data?Deprecated

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://backend.composio.dev/api/v3/tools/execute/proxy" \  -H "Content-Type: application/json" \  -d '{    "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",
    "host": "api.example.com"
  }
}
{
  "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"
    ]
  }
}
{
  "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"
    ]
  }
}