---
title: "Send one UTF-8 .js, .mjs or .json source file, up to 256 KiB."
method: POST
path: "/api/v1/uploads/{uploadId}/files"
---

# Send one UTF-8 .js, .mjs or .json source file, up to 256 KiB.

`POST /api/v1/uploads/{uploadId}/files`

## Request

- Base URL: `https://portamora.app`
- URL: `https://portamora.app/api/v1/uploads/{uploadId}/files`
- Auth: one of:
  - API key in cookie `__Host-session`
  - HTTP bearer

Send one UTF-8 .js, .mjs or .json source file, up to 256 KiB. Requires worlds:write. Identical retries are safe; paths are immutable. Server computes hashes. Complete with the exact file path list. Do not mix source files and binary parts.

## Path parameters

- `uploadId` string, required: Case-sensitive upload identifier with 10 safe-alphabet characters after the prefix.

## Headers

- `x-amz-content-sha256` string, required

## Request body

- object
  - `path` string, required
  - `text` string, required

## Response `200`

Accepted.

- object
  - `accepted` boolean, required
  - `partIndex` number
  - `path` string
  - `bytes` number
  - `sha256` string

## Other responses

- `400`: Invalid input or expired sign-in link.
- `401`: Authentication required.
- `403`: Missing scope, browser session, fresh sign-in, or matching Origin.
- `404`: Missing resource or resource owned by someone else.
- `409`: Conflicting handle, idempotency key, or version state.
- `410`: The upload window has expired. Allocate a new upload with a new key.
- `413`: Request body or uploaded file exceeds its limit.
- `429`: Rate limit reached. Retry-After header and details.retryAt give the next allowed attempt.
- `503`: Temporarily unavailable.

---

[API](https://skmtc.dev/portamora/apis/portamora-api.md) · [All operations](https://skmtc.dev/portamora/apis/portamora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/portamora/apis/portamora-api/revisions/11a5108a90cb?raw)
