Acquire Lock
POST /api/writing/locks/{document_id}/acquire
Acquire ownership of a document.
Called by the frontend document store immediately after loading a
document. If another live session owns the lock, returns
can_edit=False so the UI can open the document read-only.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Document ID to lock
Document ID to lock
Responses
Section titled “ Responses ”Successful Response
Response from any lock-state endpoint.
can_edit=True is the normal case — the caller may proceed to edit.
can_edit=False means another live session owns the lock; the
caller should open the document read-only and surface the
locked_by info plus a “Take Ownership” action.
external_word_lock=True means MS Word’s own ~$doc.docx
file is present alongside the document. We can’t prevent Word
from saving over us, but we can warn the user that simultaneous
editing is happening.
is_our_lock=True means the current session already holds the
lock — the caller is reopening the same document.
object
Identifying info for a session that holds an owner lock.
object
Validation Error