# Lock a page so it can't be edited by accident

While a page is locked it can be read and commented on, but its
content, title and icon can't change through any route (the editor,
live sync, the API, edit share links); those writes answer 423
`page_locked`. Moving, trashing and sharing still work.

Only the page's creator or a workspace owner/admin may lock or unlock
it (403 otherwise). Idempotent: locking a locked page keeps the first
lock. Each real change adds a `locked` / `unlocked` entry to the
page's version history and the audit log (`notes.page.locked`,
`notes.page.unlocked`). Open editors switch to read-only within a few
seconds.


Canonical: https://easerix.com/docs/developers/api/notes/pages/lockPage

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="notes" operations={[{"path":"/v1/pages/{id}/lock","method":"put"}]} />
    </>
  );
}
