Visual
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
POST | |
POST | |
GET | |
POST | |
POST | |
GET | |
GET | |
POST | |
GET | |
GET |
Create visual review runs finalize
Finalize a fully-reviewed run: commit the approved baseline and green the gate.
Commits exactly the snapshots approved in the DB (tolerated ones keep their baseline) and only succeeds once every changed/new snapshot is resolved. With approve_all=true, any still-pending changed/new snapshot is approved first; quarantined snapshots are skipped, but a quarantined snapshot approved by identifier is still committed. With commit_to_github=false the server returns the signed baseline YAML instead of committing it.
Required API key scopes
visual_review:writePath parameters
- idstring
Request parameters
- approve_allbooleanDefault:
false - commit_to_githubbooleanDefault:
true - add_images_to_comment_on_prbooleanDefault:
false
Response
Example request
POST /api /projects /:project_id /visual_review /runs /:id /finalizeExample response
Status 200
Create visual review runs lift on merge
Lift a quarantined snapshot's quarantine once this run's pull request merges. The lift applies only after a default-branch run that contains the merge renders the expected picture, and the baseline entry holds that same picture. Requesting a lift never approves a picture: approve a changed or new snapshot by identifier first. Requesting again from the same pull request replaces the pending request.
Required API key scopes
visual_review:writePath parameters
- idstring
Request parameters
- identifierstring
Response
Example request
POST /api /projects /:project_id /visual_review /runs /:id /lift_on_mergeExample response
Status 201
List all visual review runs quarantine lifts
Every request to lift a quarantine when this run's pull request merges, newest first, in any state. Empty for a run without a pull request.
Required API key scopes
visual_review:readPath parameters
- idstring
Example request
GET /api /projects /:project_id /visual_review /runs /:id /quarantine_liftsExample response
Status 200
Create visual review runs quarantine lifts cancel
Withdraw a pending request to lift a quarantine when this run's pull request merges.
Required API key scopes
visual_review:writePath parameters
- idstring
- request_idstring
Example request
POST /api /projects /:project_id /visual_review /runs /:id /quarantine_lifts /:request_id /cancelExample response
Status 204 No response body
Create visual review runs recompute
Re-evaluate quarantine and counts, update commit status, and optionally rerun the CI job.
Required API key scopes
visual_review:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /visual_review /runs /:id /recomputeExample response
Status 200
List all visual review runs snapshot history
Also available via the PostHog MCP server:
visual-review-runs-snapshot-history-list— Snapshot change history
Recent change history for a snapshot identifier across runs.
Required API key scopes
visual_review:readPath parameters
- idstring
Query parameters
- identifierstring
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /visual_review /runs /:id /snapshot-historyExample response
Status 200
List all visual review runs snapshots
Also available via the PostHog MCP server:
visual-review-runs-snapshots-list— List run snapshots
Get a run's snapshots with diff results, excluding quarantined ones by default.
Required API key scopes
visual_review:readPath parameters
- idstring
Query parameters
- exclude_unchangedbooleanDefault:
false - include_quarantinedbooleanDefault:
false - limitinteger
- offsetinteger
- quarantined_onlybooleanDefault:
false - snapshot_idstring
Response
Example request
GET /api /projects /:project_id /visual_review /runs /:id /snapshotsExample response
Status 200
Create visual review runs tolerate
Mark a changed snapshot as a known tolerated alternate.
Required API key scopes
visual_review:writePath parameters
- idstring
Request parameters
- snapshot_idstring
Response
Example request
POST /api /projects /:project_id /visual_review /runs /:id /tolerateExample response
Status 200
List all visual review runs tolerated hashes
Also available via the PostHog MCP server:
visual-review-runs-tolerated-hashes-list— List tolerated hashes
List known tolerated hashes for a snapshot identifier.
Required API key scopes
visual_review:readPath parameters
- idstring
Query parameters
- identifierstring
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /visual_review /runs /:id /tolerated-hashesExample response
Status 200
Retrieve visual review runs counts
Also available via the PostHog MCP server:
visual-review-runs-counts-retrieve— Visual review run counts
Review state counts for the runs list.
Required API key scopes
visual_review:readResponse
Example request
GET /api /projects /:project_id /visual_review /runs /counts










