PostHog Alerts API

The alerts API from PostHog — 6 operation(s) for alerts.

GitHub OpenAPI

Operations 14

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/environments/{environment_id}/alerts/ List legacy environment alerts · Environments alerts list #
Ask an LLM
“How do I list the alerts configured in a legacy environment?”
“Can I page through environment-level alerts with offset and limit?”
Tell an agent
List the alerts in legacy environment {environment_id}.
Show {limit} alerts from environment {environment_id} starting at offset {offset}.
POST /api/environments/{environment_id}/alerts/ Create an environment-level alert · Environments alerts create #
Ask an LLM
“How do I create an alert on a legacy environment that watches an insight?”
“Can I snooze an environment alert until a certain time?”
Tell an agent
Create an alert in legacy environment {environment_id} on insight {insight} with threshold {threshold} and subscribers {subscribed_users}.
Snooze environment {environment_id} alert {id} until {snoozed_until}.
GET /api/environments/{environment_id}/alerts/{id}/ Get a legacy environment alert · Environments alerts retrieve #
Ask an LLM
“How do I look up one alert in a legacy environment?”
“Can I see the check history of an environment alert?”
Tell an agent
Get alert {id} in legacy environment {environment_id}.
Show checks for environment {environment_id} alert {id} from {checks_date_from} to {checks_date_to}.
PUT /api/environments/{environment_id}/alerts/{id}/ Replace an environment-level alert · Environments alerts update #
Ask an LLM
“How do I fully replace an alert on a legacy environment?”
“Can I change the threshold and condition of an environment alert?”
Tell an agent
Replace alert {id} in legacy environment {environment_id} with insight {insight}, threshold {threshold} and condition {condition}.
Fully update environment {environment_id} alert {id} to state {state}.
PATCH /api/environments/{environment_id}/alerts/{id}/ Update an old-environment alert · Environments alerts partial update #
Ask an LLM
“How do I rename an alert through the deprecated environment endpoint?”
“Can I snooze a legacy environment alert?”
Tell an agent
Rename environment alert {id} in env {environment_id}.
Snooze the legacy environment alert {id} until {snoozed_until}.
DELETE /api/environments/{environment_id}/alerts/{id}/ Delete an environment-level alert · Environments alerts destroy #
Ask an LLM
“How do I delete an alert from a legacy environment?”
“Can I remove an environment alert by its ID?”
Tell an agent destructive · confirm first
Delete alert {id} from legacy environment {environment_id}.
Remove environment {environment_id} alert {id}.
POST /api/environments/{environment_id}/alerts/simulate/ Simulate an environment detector · Environments alerts simulate create #
Ask an LLM
“How do I test a detector on an insight's data in a legacy environment?”
“Can I simulate an environment alert without creating any checks?”
Tell an agent
Simulate detector {detector_config} on insight {insight} in legacy environment {environment_id}.
Run a detector simulation on environment {environment_id} insight {insight} from {date_from}.
GET /api/projects/{project_id}/alerts/ List project alerts · Alerts list #
Ask an LLM
“How do I list the alerts in a project?”
“Can I page through project-level alerts?”
Tell an agent
List the alerts in project {project_id}.
Show {limit} alerts from project {project_id} starting at offset {offset}.
POST /api/projects/{project_id}/alerts/ Create a project alert · Alerts create #
Ask an LLM
“How do I create an alert on a project that watches an insight?”
“Can I snooze a project alert until a certain time?”
Tell an agent
Create an alert in project {project_id} on insight {insight} with threshold {threshold} and subscribers {subscribed_users}.
Snooze project {project_id} alert {id} until {snoozed_until}.
GET /api/projects/{project_id}/alerts/{id}/ Get a project alert · Alerts retrieve #
Ask an LLM
“How do I look up one alert in a project?”
“Can I see the check history of a project alert?”
Tell an agent
Get alert {id} in project {project_id}.
Show checks for project {project_id} alert {id} from {checks_date_from} to {checks_date_to}.
PUT /api/projects/{project_id}/alerts/{id}/ Replace a project alert · Alerts update #
Ask an LLM
“How do I fully replace an alert on a project?”
“Can I change the threshold and condition of a project alert?”
Tell an agent
Replace alert {id} in project {project_id} with insight {insight}, threshold {threshold} and condition {condition}.
Fully update project {project_id} alert {id} to state {state}.
PATCH /api/projects/{project_id}/alerts/{id}/ Update a project alert · Alerts partial update #
Ask an LLM
“How do I change the threshold of an insight alert?”
“Can I schedule a project alert to fire only on weekdays?”
Tell an agent
Update project alert {id} in project {project_id}.
Set the condition of project alert {id} to {condition}.
DELETE /api/projects/{project_id}/alerts/{id}/ Delete a project alert · Alerts destroy #
Ask an LLM
“How do I delete an alert from a project?”
“Can I remove a project alert by its ID?”
Tell an agent destructive · confirm first
Delete alert {id} from project {project_id}.
Remove project {project_id} alert {id}.
POST /api/projects/{project_id}/alerts/simulate/ Simulate a detector on a project insight · Alerts simulate create #
Ask an LLM
“How do I test a detector on an insight's data in a project?”
“Can I simulate a project alert without creating any checks?”
Tell an agent
Simulate detector {detector_config} on insight {insight} in project {project_id}.
Run a detector simulation on project {project_id} insight {insight} from {date_from}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/posthog:posthog-alerts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

posthog-alerts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PostHog Alerts API
  version: 1.0.0
  description: ''
tags:


# --- truncated at 32 KB (56 KB total) ---
# Full source: https://artifacts.apis.io/posthog/openapi/posthog-alerts-api-openapi.yml