Vision
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST | |
GET | |
POST | |
GET | |
GET | |
GET | |
GET | |
POST | |
POST | |
DELETE | |
POST | |
DELETE | |
POST |
List all vision alerts
Required API key scopes
vision_alert:readQuery parameters
- limitinteger
- offsetinteger
- scanner_idstring
Response
Example request
GET /api /projects /:project_id /vision /alertsExample response
Status 200
Create vision alerts
Required API key scopes
vision_alert:writesession_recording:readRequest parameters
- scanner_idstring
- namestringDefault:
Untitled alert - enabledbooleanDefault:
true - kind
- selection
- metric
- direction
- thresholdnumber | null
- window_daysinteger
- check_interval_minutesinteger
- evaluation_periodsinteger
- datapoints_to_alarminteger
- cooldown_minutesinteger
- schedule_restriction
- snooze_untilstring | null
Response
Example request
POST /api /projects /:project_id /vision /alertsExample response
Status 201
Retrieve vision alerts
Required API key scopes
vision_alert:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /vision /alerts /:idExample response
Status 200
Update vision alerts
Required API key scopes
vision_alert:writesession_recording:readPath parameters
- idstring
Request parameters
- scanner_idstring
- namestringDefault:
Untitled alert - enabledbooleanDefault:
true - kind
- selection
- metric
- direction
- thresholdnumber | null
- window_daysinteger
- check_interval_minutesinteger
- evaluation_periodsinteger
- datapoints_to_alarminteger
- cooldown_minutesinteger
- schedule_restriction
- snooze_untilstring | null
Response
Example request
PATCH /api /projects /:project_id /vision /alerts /:idExample response
Status 200
Delete vision alerts
Required API key scopes
vision_alert:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /vision /alerts /:idExample response
Status 204 No response body
Create vision alerts destinations
Create a notification destination for this alert. One HogFunction is created per alert event kind atomically.
Required API key scopes
vision_alert:writesession_recording:readPath parameters
- idstring
Request parameters
- type
- slack_workspace_idinteger
- slack_channel_idstring
- slack_channel_namestring
- webhook_urlstring
Response
Example request
POST /api /projects /:project_id /vision /alerts /:id /destinationsExample response
Status 201
Create vision alerts destinations delete
Delete a notification destination by deleting its HogFunction group atomically.
Required API key scopes
vision_alert:writePath parameters
- idstring
Request parameters
- hog_function_idsarray
Example request
POST /api /projects /:project_id /vision /alerts /:id /destinations /deleteExample response
Status 204 No response body
List all vision alerts events
Paginated event history for this alert, newest first. Quiet no-op check rows (no state change, no error) are filtered out. Optional ?kind=... narrows to one kind.
Required API key scopes
vision_alert:readPath parameters
- idstring
Query parameters
- kindstringOne of:
"check""disable""enable""reset""snooze""threshold_change""unsnooze" - limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /vision /alerts /:id /eventsExample response
Status 200
Create vision alerts reset
Reset a broken alert. Clears the consecutive-failure counter and schedules an immediate recheck.
Required API key scopes
vision_alert:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /vision /alerts /:id /resetExample response
Status 200
List all vision groups
Groups of near-duplicate issue observations, each one scanner's sessions that tell the same story, such as one bug many people hit. Narrower than themes. Use it to find the issues that reach the most people.
Required API key scopes
replay_scanner:readsession_recording:readQuery parameters
- by_variantbooleanDefault:
false - date_fromstring
- date_tostring
- include_routinebooleanDefault:
false - limitintegerDefault:
20 - offsetintegerDefault:
0 - orderstringDefault:
peopleOne of:"people""observations""growth""recent" - scanner_idstring
- variantstring
Response
Example request
GET /api /projects /:project_id /vision /groupsExample response
Status 200
Retrieve vision groups
One group's counts and examples over the window.
Required API key scopes
replay_scanner:readsession_recording:readPath parameters
- idstring
Query parameters
- by_variantbooleanDefault:
false - date_fromstring
- date_tostring
- include_routinebooleanDefault:
false - scanner_idstring
- variantstring
Response
Example request
GET /api /projects /:project_id /vision /groups /:idExample response
Status 200
List all vision observations
A session's observations across every scanner the caller can read, plus the team-level semantic
search action, which resolves its own scanner scope instead of this queryset.
Required API key scopes
replay_scanner:readsession_recording:readQuery parameters
- limitinteger
- offsetinteger
- order_bystringOne of:
"-completed_at""-created_at""-label""-recording_subject_email""-result_confidence""-result_score""-result_verdict""-scanner_version""-started_at""-status""completed_at""created_at""label""recording_subject_email""result_confidence""result_score""result_verdict""scanner_version""started_at""status" - session_idstring
Response
Example request
GET /api /projects /:project_id /vision /observationsExample response
Status 200
Retrieve vision observations
Retrieve one observation. Any list filters passed along (status, tags, order_by, …) scope the previous_observation_id/next_observation_id navigation to the matching, identically-ordered set — so prev/next from a filtered table stays within that filtered list.
Required API key scopes
replay_scanner:readsession_recording:readPath parameters
- idstring
Query parameters
- backfill_idstring
- date_fromstring
- date_tostring
- groupstring
- include_routineboolean
- labeledboolean
- max_scorenumber
- min_scorenumber
- order_bystringOne of:
"-completed_at""-created_at""-label""-recording_subject_email""-result_confidence""-result_score""-result_verdict""-scanner_version""-started_at""-status""completed_at""created_at""label""recording_subject_email""result_confidence""result_score""result_verdict""scanner_version""started_at""status" - recording_subjectstring
- session_idstring
- statusstring
- tagsstring
- themestring
- triggered_bystring
- variantstring
- verdictstring
- watch_categorystring
- watch_groupstring
Response
Example request
GET /api /projects /:project_id /vision /observations /:idExample response
Status 200
Create vision observations create task
Create a PostHog Task from this observation's finding so it can be triaged and fixed. Title and description are derived from the scanner and its result. Record-only: this does not start the coding agent. Idempotent per observation: once a task exists, repeat calls return its id with a 200 instead of creating a duplicate.
Required API key scopes
replay_scanner:writesession_recording:readtask:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /vision /observations /:id /create_taskExample response
Status 200
Status 201
Create vision observations feed dismissal
Mark this observation not useful for the calling user, with an optional reason. The Highlights feed stops showing it to that user. Sending it again replaces the reason.
Required API key scopes
replay_scanner:readsession_recording:readPath parameters
- idstring
Request parameters
- reason
Example request
POST /api /projects /:project_id /vision /observations /:id /feed_dismissalExample response
Status 204 No response body
Delete vision observations feed dismissal
Undo the calling user's not-useful mark, so the Highlights feed can show the observation again.
Required API key scopes
replay_scanner:readsession_recording:readPath parameters
- idstring
Example request
DELETE /api /projects /:project_id /vision /observations /:id /feed_dismissalExample response
Status 204 No response body
Create vision observations label
Set or update the observation's shared label: whether the scanner scored the session correctly, plus optional feedback on what it got wrong. One label per observation, shared across the team; these labels feed prompt improvement. Requires editor access to the scanner.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
Request parameters
- is_correctboolean
- feedbackstringDefault:
Response
Example request
POST /api /projects /:project_id /vision /observations /:id /labelExample response
Status 200
Delete vision observations label
Remove the observation's shared label. Requires editor access to the scanner.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
Example request
DELETE /api /projects /:project_id /vision /observations /:id /labelExample response
Status 204 No response body
Create vision observations retry
Delete a failed or ineligible observation and re-run its scanner on the same recording. Returns 202 with the workflow handle.
Required API key scopes
replay_scanner:writesession_recording:readPath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /vision /observations /:id /retry




