API ReferenceTool Router

Create a presigned upload URL for a mount file

Markdown
POST
/api/v3/tool_router/session/{session_id}/mounts/{mount_id}/upload_url

Generates a presigned upload URL for uploading a file to a workbench session mount. The caller should PUT the file content directly to the returned URL.

x-api-key<token>

Project API key authentication

In: header

Path Parameters

session_idstringRequired

The unique identifier of the tool router session

Format: toolRouterSessionId
mount_idstringRequired

ID of the storage mount

Request Body

application/json

mount_relative_pathstringRequired

Supports subdirectories (e.g. "data/output.csv", "images/charts/chart.png")

mimetypestring

MIME type of the file being uploaded

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://backend.composio.dev/api/v3/tool_router/session/trs_123456789/mounts/files/upload_url" \  -H "Content-Type: application/json" \  -d '{    "mount_relative_path": "report.pdf"  }'
{
  "upload_url": "string",
  "mount_relative_path": "string",
  "sandbox_mount_prefix": "string",
  "expires_at": "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"
    ]
  }
}