Skip to main content
PATCH
/
api
/
notes
Update Note
curl --request PATCH \
  --url https://api.example.com/api/notes \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "content": "<string>"
}
'
{
  "message": "<string>",
  "data": {
    "id": 123,
    "title": "<string>",
    "data": "<string>",
    "description": {},
    "thumbnail": {},
    "views": 123,
    "visibility": "<string>",
    "ownerId": 123,
    "createdAt": "<string>",
    "updatedAt": "<string>"
  },
  "error": "<string>"
}

Authentication

This endpoint requires authentication via an Authorization header.
Authorization
string
required
Bearer token for user authentication

Query Parameters

id
string
required
The ID of the note to update

Request Body

title
string
The new title for the note. Cannot be an empty string.
content
string
The new content for the note. Cannot be an empty string.

Response

message
string
Success message indicating the note was updated
data
object
The updated note object
id
number
Unique identifier for the note
title
string
Updated title of the note
data
string
Updated content of the note
description
string | null
Description of the note
thumbnail
string | null
Thumbnail image path
views
number
Number of views
visibility
string
Note visibility: “Public”, “Private”, or “Shared”
ownerId
number
ID of the user who owns the note
createdAt
string
ISO 8601 timestamp when the note was created
updatedAt
string
ISO 8601 timestamp when the note was last updated
curl -X PATCH "https://api.noteverse.com/api/notes?id=123" \
  -H "Authorization: Bearer YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Note Title",
    "content": "This is the updated content of my note."
  }'

Response Example

{
  "message": "Note updated",
  "data": {
    "id": 123,
    "title": "Updated Note Title",
    "data": "This is the updated content of my note.",
    "description": null,
    "thumbnail": null,
    "views": 15,
    "visibility": "Private",
    "createdAt": "2026-03-01T10:30:00.000Z",
    "updatedAt": "2026-03-03T14:45:00.000Z",
    "ownerId": 42,
    "categoryId": null,
    "subcategoryId": null
  }
}

Error Responses

error
string
Error message describing what went wrong

Bad Request (400)

Returned when the title or content are empty strings.
{
  "error": "Title and content are required"
}

Unauthorized (401)

Returned when the authentication token is invalid or missing.
{
  "error": "Invalid or expired token"
}

Forbidden (403)

Returned when the user doesn’t have permission to update the note.
{
  "error": "Error creating note"
}
Both title and content cannot be empty strings. If you need to clear the content, consider using a space or placeholder text instead.
Users can update a note if they:
  • Are the owner of the note, OR
  • Have the note shared with them (regardless of permission level)
The permission level (View/Edit) from the SharedStatus is not enforced in the current implementation.

Build docs developers (and LLMs) love