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

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. Locking requires that the account is allowed either to edit files or to rename, move and delete files and folders. 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. The owner of a file can lock over and unlock any lock.

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