canvases

Make a draft version the canvas's live head.

A draft whose build is ready goes live immediately, with no rebuild; otherwise a fresh build is queued. Returns that build.

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

Request

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

version_idstring uuid required

Id of the draft source version to make live.

expected_current_version_idstring uuid nullable required

Current source version observed before requesting the promote (null when the canvas has never been published). A moved head is rejected with 409 version_conflict.

Response

idstring uuid required

The build's id.

source_version_idstring uuid required

The source version this build compiled.

build_status'queued' | 'building' | 'ready' | 'failed' required
  • queued - queued
  • building - building
  • ready - ready
  • failed - failed
integritystring nullable required

Hex SHA-256 over the manifest — the artifact's integrity anchor. Null until ready.

artifact_urlstring nullable required

Signed URL for the ready build's entry HTML. Null until ready or when artifact delivery is unavailable.

pinnedboolean required

Pinned builds are retained for the lifetime of the canvas.

created_atstring date-time required

When the build was queued.

finished_atstring date-time nullable required

When the build reached a terminal state.

Changes

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