Tools

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.1/tools/execute/proxy

Request

  • Base URL
    https://backend.composio.dev
  • URL
    https://backend.composio.dev/api/v3.1/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) acting on connected_account_id. Required for a SHARED connection, where it is checked against the connection's ACL. When the project has 2FA enabled, it is also validated against the owner of a PRIVATE 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

bodyobject nullable

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

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

dataobject nullable

The response data returned from the proxied API

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

    • breaking

      added the new required request property /

    • breaking

      added the new required request property /

    • breaking

      added the new required request property /

    • breaking

      removed subschema #1 subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 subschema #9 subschema #10 subschema #11 from the request property oneOf list

    • breaking

      the request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • breaking

      the response's property type changed from no type to object for status

    • info

      api operation id postV3_1ToolsExecuteProxy removed and replaced with postToolsExecuteProxy

    • info

      api tag Proxy removed

    • info

      added the new optional request property

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status