Rename / move a note
POST
/notes/rename
const url = 'https://api.engram.page/notes/rename';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"new_path":"Archive/Engram.md","old_path":"Projects/Engram.md"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.engram.page/notes/rename \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "new_path": "Archive/Engram.md", "old_path": "Projects/Engram.md" }'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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Old + new path
Media typeapplication/json
RenameRequest
object
new_path
required
string
old_path
required
string
Example
{ "new_path": "Archive/Engram.md", "old_path": "Projects/Engram.md"}Responses
Section titled “Responses”Renamed
Media typeapplication/json
RenameNoteResponse
object
new_path
string
note
Note
object
content
string
content_hash
string
description
OKF frontmatter description field
string
fm_created
OKF frontmatter created/date field
string format: date-time
fm_timestamp
OKF frontmatter timestamp/modified/updated field
string format: date-time
folder
string
id
string format: uuid
mtime
Client mtime (epoch seconds)
number format: float
parse_reason
Present when parse_status is “degraded”: {code, message, detail}
object
parse_status
Frontmatter parse outcome
string
path
required
string
resource
OKF frontmatter resource field
string
tags
Array<string>
title
string
type
OKF frontmatter type field
string
updated_at
string format: date-time
version
integer
old_path
string
renamed
boolean
Example
{ "note": { "parse_status": "ok", "path": "Projects/engram.md" }}No such note
Target exists / version conflict