Skip to main content
DELETE
/
api
/
notes
Delete Note
curl --request DELETE \
  --url https://api.example.com/api/notes \
  --header 'Authorization: <authorization>'
{
  "message": "<string>",
  "data": {
    "id": 123,
    "title": "<string>",
    "data": {},
    "description": {},
    "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

notes_id
string
required
The ID of the note to delete

Response

message
string
Success message indicating the note was deleted
data
object
The deleted note object
id
number
Unique identifier for the deleted note
title
string
Title of the deleted note
data
string | null
Content of the deleted note
description
string | null
Description of the deleted note
ownerId
number
ID of the user who owned 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 DELETE "https://api.noteverse.com/api/notes?notes_id=123" \
  -H "Authorization: Bearer YOUR_AUTH_TOKEN"

Response Example

{
  "message": "Note deleted successfully",
  "data": {
    "id": 123,
    "title": "Deleted Note",
    "data": "Content that was deleted",
    "description": null,
    "thumbnail": null,
    "views": 15,
    "visibility": "Private",
    "createdAt": "2026-03-01T10:30:00.000Z",
    "updatedAt": "2026-03-02T14:20:00.000Z",
    "ownerId": 42,
    "categoryId": null,
    "subcategoryId": null
  }
}

Error Responses

error
string
Error message describing what went wrong

Unauthorized (401)

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

Bad Request (400)

Returned when the request is malformed or the user is not the owner.
{
  "error": "Error deleting note"
}

Not Found (404)

Returned when the note with the specified ID doesn’t exist or doesn’t belong to the authenticated user.
{
  "error": "Note not found or you don't have permission to delete it"
}
This operation is irreversible and cascades to delete:
  • All comments on the note
  • All shared status records for the note
The note data cannot be recovered after deletion.
Only the note owner can delete a note. Users who have the note shared with them (even with Edit permission) cannot delete it.

Cascade Behavior

When a note is deleted, the following related records are automatically deleted:
  1. Comments - All comments associated with the note are deleted first
  2. Shared Statuses - All sharing records for the note are deleted
  3. Note - Finally, the note itself is deleted
This ensures referential integrity in the database and prevents orphaned records.

Build docs developers (and LLMs) love