provider alerts PATCH /api/projects/{project_id}/alerts/{id}/
@utdk/posthog /api/projects/{project_id}/alerts/{id}/
alerts_partial_update
id path required
A UUID string identifying this alert configuration.
string
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string

Try it

Authentication
Configure credentials for PostHog API
alertsPartialUpdate
PATCH/api/projects/{project_id}/alerts/{id}/

Parameters

required

A UUID string identifying this alert configuration.

required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Input

Insight ID monitored by this alert. Note: Response returns full InsightBasicSerializer object.

Human-readable name for the alert.

User IDs to subscribe to this alert. Note: Response returns full UserBasicSerializer object.

Threshold configuration with bounds and type for evaluating the alert.

Alert condition type. Determines how the value is evaluated: absolute_value, relative_increase, or relative_decrease.

Current alert state: Firing, Not firing, Errored, or Snoozed.

Whether the alert is actively being evaluated.

Alert check results. By default returns the last 5. Use checks_date_from and checks_date_to (e.g. '-24h', '-7d') to get checks within a time window, checks_limit to cap how many are returned (default 5, max 500), and checks_offset to skip the newest N checks for pagination (0-based). Newest checks first. Only populated on retrieve.

Total alert checks matching the retrieve filters (date window). Only set on alert retrieve; omitted otherwise.

Per-insight-kind alert configuration, discriminated by `type`. TrendsAlertConfig: series_index (which series to monitor) and check_ongoing_interval (whether to check the current incomplete interval). HogQLAlertConfig (SQL insights): column (which result column to evaluate, defaults to the single numeric column), evaluation ('last_row' checks the latest value of an oldest->newest query, 'first_row' checks the first value of a newest->oldest query, 'any_row' fires if any row breaches), and label_column (names the evaluated row(s) in breach messages, in every evaluation mode). FunnelsAlertConfig (funnel insights): funnel_step (the step to monitor, null for the overall last step), metric ('conversion_from_start' or 'conversion_from_previous'), and check_ongoing_interval (historical-trend funnels: also evaluate the current in-progress period). Steps funnels support only absolute_value conditions; historical-trend funnels also support relative_increase/relative_decrease (compared against the prior period).

How often the alert is checked: real time (Scale+), every 15 minutes (Boost+), hourly, daily, weekly, or monthly. * `real_time` - real_time * `every_15_minutes` - every_15_minutes * `hourly` - hourly * `daily` - daily * `weekly` - weekly * `monthly` - monthly

Snooze the alert until this time. Pass a relative date string (e.g. '2h', '1d') or null to unsnooze.

Skip alert evaluation on weekends (Saturday and Sunday, local to project timezone).

Blocked local time windows (HH:MM in the project timezone). Interval is half-open [start, end): start inclusive, end exclusive. Use blocked_windows array of {start, end}. Null disables.

The last calculated value from the most recent alert check.

When enabled, an investigation agent runs on the state transition to firing and writes findings to a Notebook linked from the alert check. Only effective for detector-based (anomaly) alerts.

When enabled (and investigation_agent_enabled is on), notification dispatch is held until the investigation agent produces a verdict. Notifications are suppressed when the verdict is false_positive (and optionally when inconclusive). A safety-net task force-fires after a few minutes if the investigation stalls.

How to handle an 'inconclusive' verdict when notifications are gated. 'notify' is the safe default — an agent that can't be sure is itself useful signal. * `notify` - Notify * `suppress` - Suppress

How this row matched the `search` query parameter: `exact` (the term is a case-insensitive substring of a searched field) or `similar` (a fuzzy trigram match, returned only when no exact match exists). Null when the list is not filtered by `search`.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.alertsPartialUpdate()