Trash
List what the user moved to the trash and bring it back.
How the trash works
Deleting a note, note folder, study set, set folder, task, file, recording or copilot conversation moves it to the trash, where it stays for 30 days. GET /trash lists it as the trash page does, newest first, and GET /trash/counts gives the numbers on the page's tabs.
- A key reads each kind with that kind's view scope: notes, note folders and recordings need
notes:view, sets and set folderssets:view, taskstasks:view, filesfiles:viewand copilot conversationscopilot:use. Withoutkind,GET /trashlists only the kinds the key can read; asking for a kind it can't read returns 403. - Notes and sets that went to the trash with their folder, and subtasks that went with their task, are counted in the folder's or task's
containsrather than listed. Restoring the folder or task brings them back too. - Every item names the operation that restores it in
restoreOperation, such asrestoreNoteorrestoreTask. It takes the item'sidand needs the scope that trashed it (notes:deletefor a note,tasks:deletefor a task). - A conversation that read the user's settings, or ran an operation the key can't, is left out of the list and the count, as it is of
GET /copilot/conversations.
What the API can't do
The trash can't be emptied through the API, and nothing in it can be deleted for good: neither can be undone, so the user does them in the app.
List the trash
What the user moved to the trash in the last 30 days, newest first, as the trash page shows it. Notes and sets that went with their folder, and subtasks that went with their task, are counted in the folder's or task's contains rather than listed. Each kind needs its own view scope: notes, note folders and recordings notes:view, sets and set folders sets:view, tasks tasks:view, files files:view and copilot conversations copilot:use. Without kind, only the kinds this key can read are listed. A file's context names its note only to a key that also has notes:view. Bring an item back with the operation in its restoreOperation. The trash can't be emptied through the API, and nothing in it can be deleted for good.
Required scopes: notes:view or sets:view or tasks:view or files:view or copilot:use
AuthorizationBearer <token>kind?stringOnly items of this kind. Omit for every kind this key may read. A kind it can't read returns 403.
"note""noteFolder""set""setFolder""task""file""recording""thread"OK
application/json- response
data*curl -X GET 'https://workroad.app/api/v1/trash' \ -H 'Authorization: Bearer $WORKROAD_API_KEY'{ "data": { "retentionDays": 30, "items": [ { "kind": "note", "id": "3c2b1a09-8f7e-4d6c-9b5a-4f3e2d1c0b9a", "title": "Photosynthesis", "context": "Biology", "contains": null, "deletedAt": "2026-01-15T09:30:00.000Z", "purgeAt": "2026-02-14T09:30:00.000Z", "restoreOperation": "restoreNote" } ] }}Count what is in the trash
How many items of each kind GET /trash lists, as the trash page's tabs show them. A kind this key can't read is null; see GET /trash for the scope each kind needs.
Required scopes: notes:view or sets:view or tasks:view or files:view or copilot:use
AuthorizationBearer <token>OK
application/json- response
data*curl -X GET 'https://workroad.app/api/v1/trash/counts' \ -H 'Authorization: Bearer $WORKROAD_API_KEY'{ "data": { "retentionDays": 30, "counts": { "note": 1, "noteFolder": 0, "set": 0, "setFolder": 0, "task": 2, "file": 0, "recording": null, "thread": null } }}