saved

Speculatively render a screenshot for a page URL ahead of heatmap creation, so it's ready (or closer to ready) by the time the user reaches the generation screen. Renders a single preview width. Idempotent within a short window: returns the existing in-flight or completed prewarm render for the same URL and consent setting if one exists (200), otherwise starts a new one (201). The result is reused when a heatmap is later created for the same URL.

post/api/projects/{project_id}/saved/prewarm/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/saved/prewarm/
  • Auth: HTTP bearer

Path parameters

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

urlstring required

Exact page URL to speculatively render ahead of heatmap creation. Wildcards are not allowed.

block_consent_modalsboolean

When true, ask the headless browser to dismiss cookie/consent banners before capturing. Must match the value used at creation time for the prewarmed render to be reused.

Response

idstring uuid required
short_idstring required

Short, URL-safe identifier used as the lookup key for saved-heatmap routes.

namestring nullable

Human-readable label for the saved heatmap.

urlstring uri required

The page URL this saved heatmap renders and overlays data on.

data_urlstring

URL whose heatmap data is overlaid on the screenshot (defaults to 'url').

target_widthsinteger[] required

Viewport widths (CSS pixels) the screenshot is rendered at.

type'screenshot' | 'iframe' | 'recording'
  • screenshot - Screenshot
  • iframe - Iframe
  • recording - Recording
source'server' | 'toolbar' required
  • server - Server
  • toolbar - Toolbar
status'processing' | 'completed' | 'failed' required
  • processing - Processing
  • completed - Completed
  • failed - Failed
has_contentboolean required

Whether at least one rendered image is ready to fetch.

deletedboolean

Soft-delete flag; deleted heatmaps are hidden from the list.

block_consent_modalsboolean

Whether the headless browser dismisses cookie/consent banners before capturing the screenshot. Only applies to 'screenshot' heatmaps.

created_atstring date-time required
updated_atstring date-time required
exceptionstring nullable required

Error detail when screenshot generation failed, otherwise null.

user_access_levelstring nullable required

The effective access level the user has for this object

Changes

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