---
canonical_url: "https://docs.composio.dev/toolkits/upload_to_url"
markdown_url: "https://docs.composio.dev/toolkits/upload_to_url.md"
product: "platform"
version: null
last_updated: null
---

# Upload to URL

Upload files to public CDN URLs, retrieve or delete uploaded file metadata, and publish HTML pages.

- **Category:** file management & storage
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 5
- **Triggers:** 0
- **Slug:** `UPLOAD_TO_URL`
- **Version:** 00000000_00

## Tools

### Delete File

**Slug:** `UPLOAD_TO_URL_DELETE_FILE`

Permanently delete a previously uploaded file from storage and its public CDN location.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file_id` | string | Yes | The UUID returned in the id field by Upload File. Deletion is permanent. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get File Metadata

**Slug:** `UPLOAD_TO_URL_GET_FILE_METADATA`

Retrieve current metadata and the public CDN URL for a file previously uploaded by the connected account.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file_id` | string | Yes | The UUID returned in the id field by Upload File. This is not the CDN URL or filename. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Supported Formats

**Slug:** `UPLOAD_TO_URL_GET_SUPPORTED_FORMATS`

Return the file extensions Upload to URL accepts or blocks, current plan size limits, and advertised upload security checks. Use this before uploading an unfamiliar file type.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Publish HTML

**Slug:** `UPLOAD_TO_URL_PUBLISH_HTML`

Publish raw HTML at a public URL under a chosen page path. This irreversible public side effect consumes one monthly credit, and the API provides no way to delete the published page.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `html_code` | string | Yes | Complete raw HTML content to publish publicly. |
| `page_path` | string | Yes | Unique, stable public page path. This is the canonical path field; do not use slug. |
| `subdomain` | string | No | Custom subdomain configured for the connected account. Omit to use the default CDN URL. |
| `expiry_days` | string | No | Requested retention as an integer-like day string such as '1', or 'never' only when the connected plan supports it. Omit to use the provider default; the response does not confirm expiration. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload File

**Slug:** `UPLOAD_TO_URL_UPLOAD_FILE`

Upload one file and return its public CDN URL, file ID, expiration, and remaining monthly credits. Each successful call consumes one upload credit.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | Yes | The single file to upload. |
| `source` | string | No | Optional caller or source label stored with the upload. |
| `expiry_days` | string | No | Requested retention as a day count, such as '1', or 'never' when the connected plan supports it. Omit to use the provider default. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
