Skip to main content
PATCH
/
api
/
notes
/
:id
/
archive
Archive Note
curl --request PATCH \
  --url https://arfan-notes.val.run/api/notes/:id/archive
{
  "id": 23,
  "title": "Advanced CSS Techniques",
  "content": "Modern CSS techniques including Grid, Flexbox, and custom properties...",
  "category": "css",
  "group": "first",
  "color": "primary",
  "archived": true,
  "createdAt": "2024-01-25T14:30:00Z",
  "updatedAt": "2024-01-25T17:20:00Z"
}

Archive Note

Archive a note by setting its archived status to true. Archived notes are hidden from regular views but can still be retrieved with filters.

Path Parameters

id
integer
required
The unique identifier of the note to archive

Examples

curl -X PATCH "https://arfan-notes.val.run/api/notes/23/archive" \
  -H "Content-Type: application/json"

Response

{
  "id": 23,
  "title": "Advanced CSS Techniques",
  "content": "Modern CSS techniques including Grid, Flexbox, and custom properties...",
  "category": "css",
  "group": "first",
  "color": "primary",
  "archived": true,
  "createdAt": "2024-01-25T14:30:00Z",
  "updatedAt": "2024-01-25T17:20:00Z"
}

Behavior

  • Sets the archived field to true
  • Updates the updatedAt timestamp
  • Returns the complete updated note object
  • Archived notes can still be retrieved using the filtered endpoint with archived=true

Use Cases

  • Content Management: Remove outdated notes from active views
  • Organization: Keep historical notes without cluttering the main interface
  • Soft Delete: Archive instead of permanently deleting notes
  • Workflow Management: Mark completed or obsolete notes as archived
I