Take Ownership
POST /api/writing/locks/{document_id}/take
Forcibly take ownership, breaking any existing lock.
Used by the “Take Ownership” UI action when the user explicitly confirms they want to override another session. Caller should warn the user beforehand that the displaced session may lose unsaved changes.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Document ID to forcibly take
Document ID to forcibly take
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