---
title: "Move Agent File"
method: POST
path: "/api/agents/{agent_id}/files/move"
tags: ["files"]
---

# Move Agent File

`POST /api/agents/{agent_id}/files/move`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/agents/{agent_id}/files/move`
- Auth: HTTP bearer

Rename or move a file/directory within the agent's persistent volume.

Fails loudly instead of guessing: 404 if the source doesn't exist and
409 if the destination already does (`mv -n` alone would exit 0 and
silently do nothing on a collision).

## Path parameters

- `agent_id` string, required

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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