---
title: "Direct file upload (under 4MB)"
method: POST
path: "/files/upload"
tags: ["Files"]
---

# Direct file upload (under 4MB)

`POST /files/upload`

## Request

- Base URL: `https://api.beecargo.net`
- URL: `https://api.beecargo.net/files/upload`
- Auth: none declared

Optional publish fields: visibility, direct, retention, expiresAt, ttl, once, maxDownloads, protect, handoffMessage, runId, openShare, shareShortId. Send Idempotency-Key for safe retries. Machine downloads wait for the safety check.

## Headers

- `Idempotency-Key` string

## Response `200`

Upload success

- FileUploadResponse
  - `success` boolean
  - `data` object
    - `id` string
    - `shortCode` string
    - `shareUrl` string, uri
    - `claimToken` string
    - `deletionToken` string

---

[API](https://skmtc.dev/beecargo/apis/beecargo-agent-api.md) · [All operations](https://skmtc.dev/beecargo/apis/beecargo-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/beecargo/apis/beecargo-agent-api/revisions/1f3dfd396f6e?raw)
