PostHog Logs API

The logs API from PostHog — 43 operation(s) for logs.

Business capability
Observability Management BC-4220.20

Operations 63

GET /api/environments/{environment_id}/logs/alerts/ Environments logs alerts list #
POST /api/environments/{environment_id}/logs/alerts/ Environments logs alerts create #
GET /api/environments/{environment_id}/logs/alerts/{id}/ Environments logs alerts retrieve #
PUT /api/environments/{environment_id}/logs/alerts/{id}/ Environments logs alerts update #
PATCH /api/environments/{environment_id}/logs/alerts/{id}/ Environments logs alerts partial update #
DELETE /api/environments/{environment_id}/logs/alerts/{id}/ Environments logs alerts destroy #
POST /api/environments/{environment_id}/logs/alerts/{id}/destinations/ Environments logs alerts destinations create #
POST /api/environments/{environment_id}/logs/alerts/{id}/destinations/delete/ Environments logs alerts destinations delete create #
GET /api/environments/{environment_id}/logs/alerts/{id}/events/ Environments logs alerts events list #
POST /api/environments/{environment_id}/logs/alerts/{id}/reset/ Environments logs alerts reset create #
POST /api/environments/{environment_id}/logs/alerts/simulate/ Environments logs alerts simulate create #
GET /api/environments/{environment_id}/logs/attributes/ Environments logs attributes retrieve #
POST /api/environments/{environment_id}/logs/count/ Environments logs count create #
POST /api/environments/{environment_id}/logs/count-ranges/ Environments logs count ranges create #
POST /api/environments/{environment_id}/logs/export/ Environments logs export create #
GET /api/environments/{environment_id}/logs/has_logs/ Environments logs has logs retrieve #
POST /api/environments/{environment_id}/logs/query/ Environments logs query create #
GET /api/environments/{environment_id}/logs/sampling_rules/ Environments logs sampling rules list #
POST /api/environments/{environment_id}/logs/sampling_rules/ Environments logs sampling rules create #
GET /api/environments/{environment_id}/logs/sampling_rules/{id}/ Environments logs sampling rules retrieve #
PUT /api/environments/{environment_id}/logs/sampling_rules/{id}/ Environments logs sampling rules update #
PATCH /api/environments/{environment_id}/logs/sampling_rules/{id}/ Environments logs sampling rules partial update #
DELETE /api/environments/{environment_id}/logs/sampling_rules/{id}/ Environments logs sampling rules destroy #
POST /api/environments/{environment_id}/logs/sampling_rules/{id}/simulate/ Environments logs sampling rules simulate create #
POST /api/environments/{environment_id}/logs/sampling_rules/reorder/ Environments logs sampling rules reorder create #
POST /api/environments/{environment_id}/logs/services/ Environments logs services create #
POST /api/environments/{environment_id}/logs/sparkline/ Environments logs sparkline create #
GET /api/environments/{environment_id}/logs/values/ Environments logs values retrieve #
POST /api/environments/{project_id}/logs/explainLogWithAI/ Logs explain log with AI create #
GET /api/environments/{project_id}/logs/views/ Logs views list #
POST /api/environments/{project_id}/logs/views/ Logs views create #
GET /api/environments/{project_id}/logs/views/{short_id}/ Logs views retrieve #
PUT /api/environments/{project_id}/logs/views/{short_id}/ Logs views update #
PATCH /api/environments/{project_id}/logs/views/{short_id}/ Logs views partial update #
DELETE /api/environments/{project_id}/logs/views/{short_id}/ Logs views destroy #
GET /api/projects/{project_id}/logs/alerts/ Logs alerts list #
POST /api/projects/{project_id}/logs/alerts/ Logs alerts create #
GET /api/projects/{project_id}/logs/alerts/{id}/ Logs alerts retrieve #
PUT /api/projects/{project_id}/logs/alerts/{id}/ Logs alerts update #
PATCH /api/projects/{project_id}/logs/alerts/{id}/ Logs alerts partial update #
DELETE /api/projects/{project_id}/logs/alerts/{id}/ Logs alerts destroy #
POST /api/projects/{project_id}/logs/alerts/{id}/destinations/ Logs alerts destinations create #
POST /api/projects/{project_id}/logs/alerts/{id}/destinations/delete/ Logs alerts destinations delete create #
GET /api/projects/{project_id}/logs/alerts/{id}/events/ Logs alerts events list #
POST /api/projects/{project_id}/logs/alerts/{id}/reset/ Logs alerts reset create #
POST /api/projects/{project_id}/logs/alerts/simulate/ Logs alerts simulate create #
GET /api/projects/{project_id}/logs/attributes/ Logs attributes retrieve #
POST /api/projects/{project_id}/logs/count/ Logs count create #
POST /api/projects/{project_id}/logs/count-ranges/ Logs count ranges create #
POST /api/projects/{project_id}/logs/export/ Logs export create #
GET /api/projects/{project_id}/logs/has_logs/ Logs has logs retrieve #
POST /api/projects/{project_id}/logs/query/ Logs query create #
GET /api/projects/{project_id}/logs/sampling_rules/ Logs sampling rules list #
POST /api/projects/{project_id}/logs/sampling_rules/ Logs sampling rules create #
GET /api/projects/{project_id}/logs/sampling_rules/{id}/ Logs sampling rules retrieve #
PUT /api/projects/{project_id}/logs/sampling_rules/{id}/ Logs sampling rules update #
PATCH /api/projects/{project_id}/logs/sampling_rules/{id}/ Logs sampling rules partial update #
DELETE /api/projects/{project_id}/logs/sampling_rules/{id}/ Logs sampling rules destroy #
POST /api/projects/{project_id}/logs/sampling_rules/{id}/simulate/ Logs sampling rules simulate create #
POST /api/projects/{project_id}/logs/sampling_rules/reorder/ Logs sampling rules reorder create #
POST /api/projects/{project_id}/logs/services/ Logs services create #
POST /api/projects/{project_id}/logs/sparkline/ Logs sparkline create #
GET /api/projects/{project_id}/logs/values/ Logs values retrieve #

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-logs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

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


# --- truncated at 32 KB (120 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/openapi/posthog-logs-api-openapi.yml