canvases

Publish a complete source project as the canvas's new head version.

Validation errors reject the publish (400) and leave the canvas untouched; a stale expected_current_version_id is rejected with 409. A successful publish queues a server-side build.

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

Request

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

namestring

Optional new display name for the canvas.

expected_current_version_idstring nullable

Optimistic-concurrency guard: the current_version_id the publisher based its edits on (null when it read a canvas with no versions yet). When the canvas has since moved past it the publish is rejected with a 409 version_conflict instead of overwriting the newer head. Omit to publish 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.