Skip to main content

Toggle the file favorite (ASK-130)

POST 

/files/:file_id/favorite

Toggles whether the authenticated user has favorited this file. If not favorited, inserts a file_favorites row and returns {favorited: true, favorited_at: <NOW>}. If already favorited, deletes the row and returns {favorited: false, favorited_at: null}.

Favoriting is intentionally permission-less: any authenticated user can favorite any non-deleted file. This is a personal bookmark, not an access-control action -- the favorites list endpoint already filters down to files the viewer can see.

Request

Responses

Toggle result