How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

PostHog logs API

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

PostHog logs API is one of 139 APIs that PostHog publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Logs. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, a getting-started guide, authentication docs, and an AsyncAPI specification.

This API exposes 63 operations across 43 paths, and defines 65 schemas. It is described by OpenAPI 3.2.0, at version 1.0.0.

Requests are made against a single base URL, https://app.posthog.com/api.

63 operations 43 paths 65 schemas 5 DELETE18 GET5 PATCH30 POST5 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.0.0
Base URL
https://app.posthog.com/api
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

PostHog logs API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (PersonalAPIKeyAuth).

Paths & Operations 63

Across 43 paths, the API surfaces 63 operations — 5 DELETE, 18 GET, 5 PATCH, 30 POST, 5 PUT. Each is listed below with its method, path, parameters, and response codes.

logs 63
GET
/api/environments/{environment_id}/logs/alerts/deprecated
environments_logs_alerts_list 3 params → 200
POST
/api/environments/{environment_id}/logs/alerts/deprecated
environments_logs_alerts_create 1 param body → 201
GET
/api/environments/{environment_id}/logs/alerts/{id}/deprecated
environments_logs_alerts_retrieve 2 params → 200
PUT
/api/environments/{environment_id}/logs/alerts/{id}/deprecated
environments_logs_alerts_update 2 params body → 200
PATCH
/api/environments/{environment_id}/logs/alerts/{id}/deprecated
environments_logs_alerts_partial_update 2 params body → 200
DELETE
/api/environments/{environment_id}/logs/alerts/{id}/deprecated
environments_logs_alerts_destroy 2 params → 204
POST
/api/environments/{environment_id}/logs/alerts/{id}/destinations/deprecated
Create a notification destination for this alert. One HogFunction is created per alert event kind (firing, resolved, ...) atomically.
environments_logs_alerts_destinations_create 2 params body → 201
POST
/api/environments/{environment_id}/logs/alerts/{id}/destinations/delete/deprecated
Delete a notification destination by deleting its HogFunction group atomically.
environments_logs_alerts_destinations_delete_create 2 params body → 204
GET
/api/environments/{environment_id}/logs/alerts/{id}/events/deprecated
Paginated event history for this alert, newest first. Returns state transitions, errored checks, and user-initiated control-plane rows (reset, enable/disable, snooze/unsnooze, threshold change) — qui…
environments_logs_alerts_events_list 4 params → 200
POST
/api/environments/{environment_id}/logs/alerts/{id}/reset/deprecated
Reset a broken alert. Clears the consecutive-failure counter and schedules an immediate recheck.
environments_logs_alerts_reset_create 2 params → 200
POST
/api/environments/{environment_id}/logs/alerts/simulate/deprecated
Simulate a logs alert on historical data using the full state machine. Read-only — no alert check records are created.
environments_logs_alerts_simulate_create 1 param body → 200
GET
/api/environments/{environment_id}/logs/attributes/deprecated
environments_logs_attributes_retrieve 9 params → 200
POST
/api/environments/{environment_id}/logs/count/deprecated
environments_logs_count_create 1 param body → 200
POST
/api/environments/{environment_id}/logs/count-ranges/deprecated
environments_logs_count_ranges_create 1 param body → 200
POST
/api/environments/{environment_id}/logs/export/deprecated
environments_logs_export_create 1 param → 201
GET
/api/environments/{environment_id}/logs/has_logs/deprecated
environments_logs_has_logs_retrieve 1 param → 200
POST
/api/environments/{environment_id}/logs/query/deprecated
environments_logs_query_create 1 param body → 200
GET
/api/environments/{environment_id}/logs/sampling_rules/deprecated
environments_logs_sampling_rules_list 3 params → 200
POST
/api/environments/{environment_id}/logs/sampling_rules/deprecated
environments_logs_sampling_rules_create 1 param body → 201
GET
/api/environments/{environment_id}/logs/sampling_rules/{id}/deprecated
environments_logs_sampling_rules_retrieve 2 params → 200
PUT
/api/environments/{environment_id}/logs/sampling_rules/{id}/deprecated
environments_logs_sampling_rules_update 2 params body → 200
PATCH
/api/environments/{environment_id}/logs/sampling_rules/{id}/deprecated
environments_logs_sampling_rules_partial_update 2 params body → 200
DELETE
/api/environments/{environment_id}/logs/sampling_rules/{id}/deprecated
environments_logs_sampling_rules_destroy 2 params → 204
POST
/api/environments/{environment_id}/logs/sampling_rules/{id}/simulate/deprecated
Dry-run estimate for how much volume this rule would remove (placeholder response until CH-backed simulation is wired).
environments_logs_sampling_rules_simulate_create 2 params → 200
POST
/api/environments/{environment_id}/logs/sampling_rules/reorder/deprecated
Atomically reassign priorities so the given ID order maps to ascending priorities (0..n-1).
environments_logs_sampling_rules_reorder_create 3 params body → 200
POST
/api/environments/{environment_id}/logs/services/deprecated
environments_logs_services_create 1 param body → 200
POST
/api/environments/{environment_id}/logs/sparkline/deprecated
environments_logs_sparkline_create 1 param body → 200
GET
/api/environments/{environment_id}/logs/values/deprecated
environments_logs_values_retrieve 7 params → 200
POST
/api/environments/{project_id}/logs/explainLogWithAI/
Explain a log entry using AI. POST /api/environments/:id/logs/explainLogWithAI/
logs_explainLogWithAI_create 1 param body → 201
GET
/api/environments/{project_id}/logs/views/
logs_views_list 3 params → 200
POST
/api/environments/{project_id}/logs/views/
logs_views_create 1 param body → 201
GET
/api/environments/{project_id}/logs/views/{short_id}/
logs_views_retrieve 2 params → 200
PUT
/api/environments/{project_id}/logs/views/{short_id}/
logs_views_update 2 params body → 200
PATCH
/api/environments/{project_id}/logs/views/{short_id}/
logs_views_partial_update 2 params body → 200
DELETE
/api/environments/{project_id}/logs/views/{short_id}/
logs_views_destroy 2 params → 204
GET
/api/projects/{project_id}/logs/alerts/
logs_alerts_list 3 params → 200
POST
/api/projects/{project_id}/logs/alerts/
logs_alerts_create 1 param body → 201
GET
/api/projects/{project_id}/logs/alerts/{id}/
logs_alerts_retrieve 2 params → 200
PUT
/api/projects/{project_id}/logs/alerts/{id}/
logs_alerts_update 2 params body → 200
PATCH
/api/projects/{project_id}/logs/alerts/{id}/
logs_alerts_partial_update 2 params body → 200
DELETE
/api/projects/{project_id}/logs/alerts/{id}/
logs_alerts_destroy 2 params → 204
POST
/api/projects/{project_id}/logs/alerts/{id}/destinations/
Create a notification destination for this alert. One HogFunction is created per alert event kind (firing, resolved, ...) atomically.
logs_alerts_destinations_create 2 params body → 201
POST
/api/projects/{project_id}/logs/alerts/{id}/destinations/delete/
Delete a notification destination by deleting its HogFunction group atomically.
logs_alerts_destinations_delete_create 2 params body → 204
GET
/api/projects/{project_id}/logs/alerts/{id}/events/
Paginated event history for this alert, newest first. Returns state transitions, errored checks, and user-initiated control-plane rows (reset, enable/disable, snooze/unsnooze, threshold change) — qui…
logs_alerts_events_list 4 params → 200
POST
/api/projects/{project_id}/logs/alerts/{id}/reset/
Reset a broken alert. Clears the consecutive-failure counter and schedules an immediate recheck.
logs_alerts_reset_create 2 params → 200
POST
/api/projects/{project_id}/logs/alerts/simulate/
Simulate a logs alert on historical data using the full state machine. Read-only — no alert check records are created.
logs_alerts_simulate_create 1 param body → 200
GET
/api/projects/{project_id}/logs/attributes/
logs_attributes_retrieve 9 params → 200
POST
/api/projects/{project_id}/logs/count/
logs_count_create 1 param body → 200
POST
/api/projects/{project_id}/logs/count-ranges/
logs_count_ranges_create 1 param body → 200
POST
/api/projects/{project_id}/logs/export/
logs_export_create 1 param → 201
GET
/api/projects/{project_id}/logs/has_logs/
logs_has_logs_retrieve 1 param → 200
POST
/api/projects/{project_id}/logs/query/
logs_query_create 1 param body → 200
GET
/api/projects/{project_id}/logs/sampling_rules/
logs_sampling_rules_list 3 params → 200
POST
/api/projects/{project_id}/logs/sampling_rules/
logs_sampling_rules_create 1 param body → 201
GET
/api/projects/{project_id}/logs/sampling_rules/{id}/
logs_sampling_rules_retrieve 2 params → 200
PUT
/api/projects/{project_id}/logs/sampling_rules/{id}/
logs_sampling_rules_update 2 params body → 200
PATCH
/api/projects/{project_id}/logs/sampling_rules/{id}/
logs_sampling_rules_partial_update 2 params body → 200
DELETE
/api/projects/{project_id}/logs/sampling_rules/{id}/
logs_sampling_rules_destroy 2 params → 204
POST
/api/projects/{project_id}/logs/sampling_rules/{id}/simulate/
Dry-run estimate for how much volume this rule would remove (placeholder response until CH-backed simulation is wired).
logs_sampling_rules_simulate_create 2 params → 200
POST
/api/projects/{project_id}/logs/sampling_rules/reorder/
Atomically reassign priorities so the given ID order maps to ascending priorities (0..n-1).
logs_sampling_rules_reorder_create 3 params body → 200
POST
/api/projects/{project_id}/logs/services/
logs_services_create 1 param body → 200
POST
/api/projects/{project_id}/logs/sparkline/
logs_sparkline_create 1 param body → 200
GET
/api/projects/{project_id}/logs/values/
logs_values_retrieve 7 params → 200

Schemas 65

The contract defines 65 schemas that model the data the API accepts and returns. The most detailed are PatchedLogsAlertConfiguration (24 properties), LogsAlertConfiguration (24 properties), _LogEntry (13 properties), LogsSamplingRule (13 properties). Each schema is shown below with its type and property counts.

_LogsSparklineBody
object
6 properties
ThresholdOperatorEnum
string
above - Above below - Below
_LogsServicesSummary
object
2 properties 2 required
_LogPropertyFilterTypeEnum
string
log - log logattribute - logattribute logresourceattribute - logresourceattribute
NullEnum
PatchedLogsAlertConfiguration
object
24 properties
PatchedLogsView
object
8 properties
_LogsValuesResponse
object
2 properties 2 required
SeverityLevelsEnum
string
trace - trace debug - debug info - info warn - warn error - error fatal - fatal
_LogsAttributesResponse
object
2 properties 2 required
_LogAttributeEntry
object
4 properties 3 required
ExplainRequest
object
3 properties 2 required
LogsAlertEvent
object
9 properties 9 required
NotificationDestinationTypeEnum
string
slack - slack webhook - webhook
_LogsServicesBody
object
5 properties
_LogPropertyFilterOperatorEnum
string
exact - exact isnot - isnot icontains - icontains noticontains - noticontains regex - regex notregex - notregex gt - gt lt - lt isdateexact - isdateexact isdat…
_LogsQueryResponse
object
5 properties 4 required
PatchedLogsSamplingRule
object
13 properties
_LogsServicesSparklineBucket
object
3 properties 3 required
_LogsSparklineBucket
object
4 properties 2 required
LogsAlertSimulateRequest
object
8 properties 5 required
_LogsCountRangesResponse
object
2 properties 2 required
SparklineBreakdownByEnum
string
severity - severity service - service
LogsAlertConfiguration
object
24 properties 14 required
_LogsServicesRequest
object
1 property 1 required
LogsAlertCreateDestination
object
5 properties 1 required
_LogsSparklineRequest
object
1 property 1 required
LogsAlertConfigurationStateEnum
string
notfiring - Not firing firing - Firing pendingresolve - Pending resolve errored - Errored snoozed - Snoozed broken - Broken
LogsAlertDeleteDestination
object
1 property 1 required
PaginatedLogsAlertConfigurationList
object
4 properties 2 required
LogsView
object
8 properties 6 required
OrderByEnum
string
latest - latest earliest - earliest
_LogsCountBody
object
5 properties
LogsSamplingRuleReorder
object
1 property 1 required
_LogsServiceAggregate
object
7 properties 4 required
LogsAlertSimulateBucket
object
6 properties 6 required
LogsSamplingRuleSimulateResponse
object
2 properties 2 required
_LogsCountRangeBucket
object
3 properties 3 required
_LogsCountRequest
object
1 property 1 required
_LogsSparklineResponse
object
1 property 1 required
_LogEntry
object
13 properties 11 required
_LogsCountRangesRequest
object
1 property 1 required
_LogPropertyFilter
object
4 properties 3 required
_LogsQueryRequest
object
1 property 1 required
PaginatedLogsSamplingRuleList
object
4 properties 2 required
_LogsCountResponse
object
1 property 1 required
_LogsQueryBody
object
8 properties
LogsAlertStateInterval
object
4 properties 4 required
UserBasic
object
9 properties 4 required
_LogsServiceSeverityBreakdown
object
4 properties 4 required
RuleTypeEnum
string
severitysampling - Severity-based reduction pathdrop - Path exclusion ratelimit - Rate limit
LogsSamplingRule
object
13 properties 8 required
BlankEnum
_LogsServiceActiveRule
object
3 properties 3 required
LogsAlertDestinationResponse
object
1 property 1 required
RoleAtOrganizationEnum
string
engineering - Engineering data - Data product - Product Management founder - Founder leadership - Leadership marketing - Marketing sales - Sales / Success othe…
_LogAttributeValue
object
2 properties 2 required
_LogsServicesResponse
object
3 properties 2 required
PaginatedLogsAlertEventList
object
4 properties 2 required
MatchedOnEnum
string
key - key value - value
LogsAlertEventKindEnum
string
check - Check reset - Reset enable - Enable disable - Disable snooze - Snooze unsnooze - Unsnooze thresholdchange - Threshold change
PaginatedLogsViewList
object
4 properties 2 required
LogsAlertSimulateResponse
object
6 properties 6 required
_DateRange
object
2 properties
_LogsCountRangesBody
object
6 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

posthog-logs-api-openapi.yml Raw ↑

Other APIs PostHog publishes across the network.

PostHog Capture API
PostHog Query API
PostHog Persons API
PostHog Feature Flags API
PostHog Experiments API
PostHog Insights API
PostHog Cohorts API
PostHog Annotations API
PostHog actions API
PostHog activity_log API
PostHog activity_logs API
PostHog advanced_activity_logs API
Where this information came from

This is an independent, third-party profile of PostHog logs API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.