---
title: "Upload files to a bucket"
method: POST
path: "/agent/storage/buckets/{name}/upload"
tags: ["Storage"]
---

# Upload files to a bucket

`POST /agent/storage/buckets/{name}/upload`

## Request

- Base URL: `https://edge.network`
- URL: `https://edge.network/agent/storage/buckets/{name}/upload`
- Auth: HTTP bearer

Upload base64-encoded files to an existing bucket. Set changed_only to skip files whose MD5 matches an existing object.

## Path parameters

- `name` string, required

## Headers

- `X-Dry-Run` 'true' | 'false'
- `Idempotency-Key` string

## Request body

- object
  - `files` UploadFile[], required
    - `path` string, required: File path/key, e.g. "index.html" or "assets/style.css".
    - `content` string, required: Base64-encoded file content.
    - `content_type` string: MIME type. Auto-detected from the extension if omitted.
  - `changed_only` boolean

## Response `200`

Success.

- TellUserEnvelope: Standard success envelope. Endpoint-specific fields ride alongside tell_user.
  - `tell_user` string, required: Human-readable summary of what happened, for the agent to relay to its operator.

## Other responses

- `400`: Validation error — the response body explains what to fix.
- `401`: Missing or invalid agent access code. The body includes self-signup pointers.
- `429`: Rate limited. Honour Retry-After and the RateLimit-* headers before retrying.

---

[API](https://skmtc.dev/edge/apis/edge-network-agent-api.md) · [All operations](https://skmtc.dev/edge/apis/edge-network-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/edge/apis/edge-network-agent-api/revisions/49b5f2adf020?raw)
