---
title: "Rename / move a note"
method: POST
path: "/api/notes/rename"
tags: ["Notes"]
---

# Rename / move a note

`POST /api/notes/rename`

## Request

- Base URL: `https://api.engram.page`
- URL: `https://api.engram.page/api/notes/rename`
- Auth: HTTP bearer

Moves the note from `old_path` to `new_path` and returns the updated note. Returns 404 when the source note is missing and 409 when the target path already exists or the note version conflicts.

## Request body

- RenameRequest
  - `new_path` string, required
  - `old_path` string, required

## Response `200`

Renamed

- RenameNoteResponse
  - `new_path` string
  - `note` Note
    - `content` string
    - `content_hash` string, nullable
    - `description` string, nullable: OKF frontmatter `description` field
    - `fm_created` string, date-time, nullable: OKF frontmatter `created`/`date` field
    - `fm_timestamp` string, date-time, nullable: OKF frontmatter `timestamp`/`modified`/`updated` field
    - `folder` string, nullable
    - `id` string, uuid, nullable
    - `links` NoteLink[]: Outgoing link/embed edges, resolved. Wikilink and markdown syntax alike.
      - `alias` string, nullable: Display text: `[[target|alias]]`'s alias, or `[label](target)`'s label.
      - `anchor` string, nullable: Heading/block reference: `[[target#anchor]]` or `[x](target#anchor)`.
      - `dangling` boolean, required: True when the target could not be resolved.
      - `link_type` string, required: "wikilink" or "embed" — whether the link EMBEDS its target. Not the source syntax; markdown-form links carry these same two values.
      - `target_attachment_id` string, uuid, nullable
      - `target_note_id` string, uuid, nullable
      - `target_path` string, nullable: Resolved note path.
      - `target_text` string, required: The link target, percent-DECODED. `[[Target]]` and `[x](Target.md)` both yield `Target`/`Target.md` here — not the literal source bytes.
    - `mtime` number, float: Client mtime (epoch seconds)
    - `parse_reason` object, nullable: Present when parse_status is "degraded": {code, message, detail}
    - `parse_status` 'ok' | 'degraded', nullable: Frontmatter parse outcome
    - `path` string, required
    - `resource` string, nullable: OKF frontmatter `resource` field
    - `tags` string[]
    - `title` string, nullable
    - `type` string, nullable: OKF frontmatter `type` field
    - `updated_at` string, date-time, nullable
    - `version` integer, nullable
  - `old_path` string
  - `renamed` boolean

## Other responses

- `404`: No such note
- `409`: Target exists / version conflict

---

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