canvases

Publish a complete layout document as the grid canvas's new head version.

Layout is data, not code: the new version is live immediately, with no build. Validation errors reject the publish (400) and leave the canvas untouched; a stale expected_current_version_id is rejected with 409.

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

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/canvases/{id}/layout/publish/
  • 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

Optimistic-concurrency guard: the current_version_id the layout was based on (null when the canvas has no versions yet). A moved head is rejected with 409 version_conflict. Omit to publish 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.