canvases

Apply surgical operations to the grid canvas's current layout.

The default write path for both the editor and agents: add, move, resize, fill, or remove one placement without resending the layout. expected_current_version_id is mandatory so an agent filling a box and a user rearranging widgets cannot overwrite each other.

post/api/projects/{project_id}/canvases/{id}/layout/patch/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/canvases/{id}/layout/patch/
  • Auth: HTTP bearer

Path parameters

idstring uuid required

A UUID string identifying this canvas.

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

promptstring

Short description of the change, stored on the appended version history entry.

expected_current_version_idstring nullable required

Required optimistic-concurrency guard: the current_version_id the operations are based on (null when the canvas has no layout versions yet). A moved head is rejected with 409 version_conflict — patches cannot apply unguarded.

Response

current_version_idstring required

Id of the layout version this publish created.

Changes

No recorded changes to this operation across all 1 revision of this API.