---
title: "Move a memory file"
method: POST
path: "/v1/memory-files/rename"
tags: ["Memory files"]
---

# Move a memory file

`POST /v1/memory-files/rename`

## Request

- Base URL: `https://brain.inite.ai`
- URL: `https://brain.inite.ai/v1/memory-files/rename`
- Auth: HTTP bearer

Copies the content to `newPath` and removes the old row. The destination is overwritten if it exists, matching the memory tool’s own semantics. A destination that fails the path rules leaves the source untouched — a rejected move is not a delete.

Required scope: `brain:write`.

## Request body

- MemoryFileRenameRequest
  - `newPath` string, required: Absolute path under /memories, e.g. /memories/user_prefs.md
  - `path` string, required: Absolute path under /memories, e.g. /memories/user_prefs.md
  - `userId` string

## Response `200`

The file at its new path.

- MemoryFile
  - `content` string, required
  - `path` string, required
  - `updatedAt` string, required

## Other responses

- `400`: Validation failed.
- `401`: Missing or unknown bearer key.
- `403`: The key lacks the required scope.
- `404`: No such resource in this tenant.

---

[API](https://skmtc.dev/inite/apis/inite-brain-platform-api.md) · [All operations](https://skmtc.dev/inite/apis/inite-brain-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/inite/apis/inite-brain-platform-api/revisions/c7c3eb5e304b?raw)
