↑↓ to navigate ↵ to open Esc to close Search by Algolia

You are reading the documentation of FileRun 2026.4.0, which is not released yet. It is subject to change, so do not use it for planning. Read this page for FileRun 2026.3.0

API: Locking files

Available since FileRun 2026.3.0.

Target URL (lock) /api.php/Drive/files/lock
Target URL (unlock) /api.php/Drive/files/unlock
Required scope modify
HTTP Method GET/POST
Output format JSON

Request Parameters Reference

Parameter Type Required Description
path string Yes The FileRun path of the file. See this page

Only files can be locked. Since FileRun 2026.4.0, locking and unlocking require one of the permissions to edit files (edit_files), to rename and move (rename_move) or to delete files (delete_files). Before, they required the permission to make changes. On a shared file, the share role needs to allow it as well (editor or higher).

A lock is held by the account which placed it:

  • Locking a file you have already locked is refused ("It is already locked by you!").
  • Unlocking a file which is not locked is refused ("It is not locked!").
  • A file locked by another account cannot be locked or unlocked by you, unless you are the owner of the file or an administrator. The owner of the file and the administrators can lock over and unlock any lock.
  • A lock held by the visitor account, the account a web link is opened as, can be locked over and unlocked by any account allowed to lock the file.

The lock state of a file is shown in the file listing by the isLocked detail (see Retrieving lists of files and folders).