Manage soft-deleted links — list, restore, and permanently purge.
/api/trashList all soft-deleted links belonging to the authenticated user, ordered by deletion date descending.
curl -H "Authorization: Bearer <token>" \
"http://localhost:3000/api/trash"[
{
"id": "uuid",
"url": "https://example.com",
"title": "Example Article",
"domain": "example.com",
"tldr": "A sample description.",
"tags": ["Tag1"],
"deletedAt": "2024-04-01T10:00:00.000Z",
"createdAt": "2024-03-26T12:00:00.000Z"
}
]/api/trash/:id/restoreRestore a soft-deleted link by clearing its deletedAt timestamp. The link immediately reappears in the dashboard and is re-indexed for search and AI features.
curl -X POST "http://localhost:3000/api/trash/123e4567-e89b-12d3/restore" \
-H "Authorization: Bearer <token>"{ "success": true, "id": "123e4567-e89b-12d3" }/api/trash/:idPermanently delete a specific link from trash. This removes the row, all AI metadata, and the embedding vector. This action is irreversible.
curl -X DELETE "http://localhost:3000/api/trash/123e4567-e89b-12d3" \
-H "Authorization: Bearer <token>"{ "success": true, "id": "123e4567-e89b-12d3" }/api/trashEmpty the entire trash — permanently deletes all soft-deleted links for the authenticated user. This action is irreversible.
curl -X DELETE "http://localhost:3000/api/trash" \
-H "Authorization: Bearer <token>"{ "success": true, "deleted": 12 }