Tools
Proxy

Execute proxy request

Changed on

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.

post/api/v3/tools/execute/proxy

Request

  • Base URL
    https://backend.composio.dev
  • URL
    https://backend.composio.dev/api/v3/tools/execute/proxy
  • Auth
    API key in header x-api-key

Request body

connected_account_idstring connectedAccountId

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

user_idstring

The user id (entity id) that owns connected_account_id. When the project has 2FA enabled, it is validated against the owner of that connection. Also selects which custom toolkits the request may use.

endpointstring required

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

method'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' required

The HTTP method to use for the request

bodyunknown

Example request

{
  "connected_account_id": "ca_1a2b3c4d5e6f",
  "user_id": "user_4567",
  "endpoint": "/api/v1/resources",
  "method": "GET",
  "body": {
    "name": "New Resource",
    "description": "This is a new resource"
  },
  "parameters": [
    {
      "name": "x-api-key",
      "value": "abc123def456",
      "type": "header"
    },
    {
      "name": "filter",
      "value": "active",
      "type": "query"
    }
  ]
}

Response

Successfully executed proxy request and received response

dataunknown
statusnumber required

The HTTP status code returned from the proxied API

headersobject

The HTTP headers returned from the proxied API

Example response

{
  "data": {
    "id": "123",
    "name": "Resource Name",
    "created_at": "2023-01-01T00:00:00Z"
  },
  "status": 200,
  "headers": {
    "content-type": "application/json",
    "cache-control": "no-cache",
    "host": "api.example.com"
  }
}

Changes

    • info

      added the new optional request property

    • breaking

      removed subschema #1 subschema #2 from the request property oneOf list

    • info

      added subschema #1 subschema #2 to the request property oneOf list