---
title: "Upload a personal file chunk"
method: PUT
path: "/api/me/files/{fileId}/chunks/{index}"
deprecated: true
---

# Upload a personal file chunk

`PUT /api/me/files/{fileId}/chunks/{index}`

## Request

- Base URL: `https://www.toma.com`
- URL: `https://www.toma.com/api/me/files/{fileId}/chunks/{index}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

> **Deprecated.**

Upload canonical base64 bytes to your personal file, index starting at zero. Each decoded chunk must be 262144 bytes except the final chunk. Retrying an index with identical bytes is safe. Only the authenticated owner can upload.

## Path parameters

- `fileId` string, required
- `index` integer, required

## Request body

- object
  - `data` string, required

## Response `200`

File operation result.

- PersonalFile
  - `id` string, required
  - `path` string, required
  - `caution` string, nullable, required: A warning to show the user before they download or open this kind of file (archives, scripts, older Office files, web pages); null when there is none.
  - `size` integer, required
  - `received` integer, required
  - `status` 'uploading' | 'ready' | 'deleting', required
  - `createdAt` string, date-time, required
  - `canWrite` boolean, required

## Other responses

- `400`: Invalid file input.
- `401`: Sign in first.
- `403`: File access denied.
- `404`: No accessible personal file.
- `409`: File state, path, or quota conflict.
- `413`: Request exceeds the body limit.
- `503`: Storage unavailable; retry later.

---

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