Visual
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
GET | |
GET | |
GET | |
POST | |
POST | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
POST | |
GET | |
POST | |
POST | |
POST |
List all visual review repos
Also available via the PostHog MCP server:
visual-review-repos-list— List visual review repos
List all projects for the team.
Required API key scopes
visual_review:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /visual_review /reposExample response
Status 200
Create visual review repos
Create a new repo.
Required API key scopes
visual_review:writeRequest parameters
- repo_full_namestring
- repo_external_idinteger | null
Response
Example request
POST /api /projects /:project_id /visual_review /reposExample response
Status 201
Retrieve visual review repos
Also available via the PostHog MCP server:
visual-review-repos-retrieve— Get visual review repo
Get a repo by ID.
Required API key scopes
visual_review:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /visual_review /repos /:idExample response
Status 200
Update visual review repos
Update a repo's settings.
Required API key scopes
visual_review:writePath parameters
- idstring
Request parameters
- baseline_file_pathsobject | null
- enable_pr_commentsboolean | null
- debt_digest_enabledboolean | null
Response
Example request
PATCH /api /projects /:project_id /visual_review /repos /:idExample response
Status 200
Retrieve visual review repos baselines
Snapshots overview for a repo: every identifier with a current baseline (latest non-superseded master/main run per run_type), plus tolerate counts, active quarantine state, and a 30-day stability sparkline. Capped at 7500 entries — sets truncated and returns the most recently active when exceeded. Filtering / faceting / search are all done client-side; this endpoint takes no filter query params.
Required API key scopes
visual_review:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /visual_review /repos /:id /baselinesExample response
Status 200
Retrieve visual review repos flakiness
Snapshots in a repo whose rendering cannot be trusted: those that failed the gate on a recent default-branch run, those whose absorbed diff is close to the threshold, and those under an active quarantine. Small absorbed diffs well under the threshold are omitted, as is everything else, so this is far smaller than the baselines universe; totals.tracked gives the full denominator. Each entry carries the share of the last 7 days of default-branch runs that failed the gate (hard_rate) and the share a toleration absorbed (soft_rate), plus headroom, the fraction of the diff threshold its worst absorbed run leaves free. Capped at 2000 entries, which sets truncated. Filtering, faceting and search are done client-side; this endpoint takes no filter query params.
Required API key scopes
visual_review:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /visual_review /repos /:id /flakinessExample response
Status 200
List all visual review repos quarantine
List quarantined identifiers. Without filter: active only. With identifier: full history.
Required API key scopes
visual_review:readPath parameters
- idstring
Query parameters
- identifierstring
- limitinteger
- offsetinteger
- run_typestring
Response
Example request
GET /api /projects /:project_id /visual_review /repos /:id /quarantineExample response
Status 200
Create visual review repos quarantine
Quarantine a snapshot identifier for a specific run type.
Required API key scopes
visual_review:writePath parameters
- idstring
- run_typestring
Request parameters
- identifierstring
- reasonstring
- expires_atstring | null
- source_run_idstring | null
- notify_ownersbooleanDefault:
false
Response
Example request
POST /api /projects /:project_id /visual_review /repos /:id /quarantine /:run_typeExample response
Status 201
Create visual review repos quarantine expire
Expire all active quarantine entries for an identifier.
Required API key scopes
visual_review:writePath parameters
- idstring
- run_typestring
Request parameters
- identifierstring
Example request
POST /api /projects /:project_id /visual_review /repos /:id /quarantine /:run_type /expireExample response
Status 204 No response body
Status 400 No GitHub integration.
Status 429 GitHub rate limit. See Retry-After.
Status 503 GitHub cannot name the default branch head. The quarantine stays.
Retrieve visual review repos thumbnails
Serve a snapshot thumbnail by identifier. Returns WebP with ETag caching.
Required API key scopes
visual_review:readPath parameters
- idstring
- identifierstring
Query parameters
- run_typestring
Example request
GET /api /projects /:project_id /visual_review /repos /:id /thumbnails /:identifierExample response
Status 200 WebP thumbnail image
Retrieve visual review repos toleration pileups
Snapshots that keep getting tolerated, counted across baselines, most manual tolerations first. A toleration accepts one exact rendering, so a snapshot that keeps needing them renders differently from run to run, and the fix belongs in the story. With no parameters this is the weekly debt digest's rule (3 or more tolerations by a person or agent in 30 days), except that quarantined snapshots are kept and marked with is_quarantined. The list is small and returns fast; start here to find flaky stories worth fixing, then read one snapshot's history with the per-snapshot tools.
Required API key scopes
visual_review:readPath parameters
- idstring
Query parameters
- include_quarantinedbooleanDefault:
true - limitintegerDefault:
100 - min_automatic_tolerationsinteger
- min_tolerationsintegerDefault:
3 - run_typestring
- window_daysintegerDefault:
30
Response
Example request
GET /api /projects /:project_id /visual_review /repos /:id /toleration-pileupsExample response
Status 200
List all visual review repos runs
List runs in this repo, optionally filtered by review state and free-text search.
Required API key scopes
visual_review:readPath parameters
- repo_idstring
Query parameters
- limitinteger
- offsetinteger
- review_statestringOne of:
"clean""needs_review""processing""stale" - searchstring
Response
Example request
GET /api /projects /:project_id /visual_review /repos /:repo_id /runsExample response
Status 200
Retrieve visual review repos runs counts
Review state counts for runs in this repo.
Required API key scopes
visual_review:readPath parameters
- repo_idstring
Response
Example request
GET /api /projects /:project_id /visual_review /repos /:repo_id /runs /countsExample response
Status 200
List all visual review repos snapshots
Deduped baseline timeline for a snapshot identity. Newest first.
Required API key scopes
visual_review:readPath parameters
- identifierstring
- repo_idstring
- run_typestring
Query parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /visual_review /repos /:repo_id /snapshots /:run_type /:identifierExample response
Status 200
List all visual review runs
Also available via the PostHog MCP server:
visual-review-runs-list— List visual review runs
List runs for the team, optionally filtered by review state, PR number, commit SHA, branch, or free-text search.
Required API key scopes
visual_review:readQuery parameters
- branchstring
- commit_shastring
- limitinteger
- offsetinteger
- pr_numberinteger
- review_statestringOne of:
"clean""needs_review""processing""stale" - searchstring
Response
Example request
GET /api /projects /:project_id /visual_review /runsExample response
Status 200
Create visual review runs
Create a new run from a CI manifest.
Required API key scopes
visual_review:writeRequest parameters
- repo_idstring
- run_typestring
- commit_shastring
- branchstring
- snapshotsarray
- pr_numberinteger | null
- baseline_hashesobject
- unchanged_countinteger
- removed_identifiersarray
- purposestring
- metadataobject
- is_partialboolean
Response
Example request
POST /api /projects /:project_id /visual_review /runsExample response
Status 201
Retrieve visual review runs
Also available via the PostHog MCP server:
visual-review-runs-retrieve— Get visual review run
Get run status and summary.
Required API key scopes
visual_review:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /visual_review /runs /:idExample response
Status 200
Create visual review runs add snapshots
Add a batch of snapshots to a pending run (shard-based flow).
Required API key scopes
visual_review:writePath parameters
- idstring
Request parameters
- snapshotsarray
- baseline_hashesobject
- story_index_hashstring
Response
Example request
POST /api /projects /:project_id /visual_review /runs /:id /add-snapshotsExample response
Status 200
Create visual review runs approve
Mark snapshots reviewed (DB only).
Records the per-snapshot "Accept change" decision. Does not commit the baseline or change the GitHub gate — call finalize to ship the run. Works on a quarantined snapshot too: a quarantined snapshot approved here is committed by finalize, which updates a quarantined story's baseline entry without lifting the quarantine.
Required API key scopes
visual_review:writePath parameters
- idstring
Request parameters
- snapshotsarray
Response
Example request
POST /api /projects /:project_id /visual_review /runs /:id /approveExample response
Status 200
Create visual review runs complete
Complete a run: detect removals, verify uploads, trigger diff processing.
Required API key scopes
visual_review:writePath parameters
- idstring
Request parameters
- check_run_idstring
Response
Example request
POST /api /projects /:project_id /visual_review /runs /:id /complete










