---
title: "Move File"
method: POST
path: "/companies/{company_id}/files/move"
tags: ["files"]
---

# Move File

`POST /companies/{company_id}/files/move`

## Request

- Base URL: `https://api.nanocorp.so` (the document declares no server; this is the origin it was published from)
- URL: `https://api.nanocorp.so/companies/{company_id}/files/move`
- Auth: HTTP bearer

Give a file a new path (spec 2026-10-05 §3.3): 409 when ``to`` is taken.

A row update only: the blob's key is not its path, so no byte moves. The
file keeps its id, so a chat attachment that points at it still resolves.

## Path parameters

- `company_id` string, uuid, required

## Request body

- MoveFileRequest: ``POST /companies/{id}/files/move``: ``{"from": "<path>", "to": "<path>"}``. ``from`` is a Python keyword, so the fields carry it as an alias.
  - `from` string, required: The file's current path, exactly as listed.
  - `to` string, required: The new path. Refused (409) when a file is already there.

## Response `200`

Successful Response

- CompanyFileResponse
  - `id` string, required
  - `path` string, required
  - `size_bytes` integer, required
  - `content_type` string, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-09** `073e0dbdf8ff`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nanocorp/apis/nanocorp-api/changes/companies/:company_id/files/move/post.md)

---

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