canvases

Publish file edits against the canvas's current source project.

Diff-aware alternative to sending the complete project: operations replace text inside a file, write, delete, or rename files, applied in order to the head the caller read. expected_current_version_id is mandatory here — relative edits against an unverified base could silently merge into someone else's newer work.

post/api/projects/{project_id}/canvases/{id}/edit/

Request

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

namestring

Optional new display name for the canvas.

expected_current_version_idstring nullable required

Required optimistic-concurrency guard: the current_version_id the edits are based on (null when the canvas has never been published). Diff edits against a moved head are rejected with 409 version_conflict — they cannot be published unguarded.

Response

current_version_idstring required

Id of the source version this publish created.

Changes

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