provider endpoints PATCH /api/environments/{environment_id}/endpoints/{name}/
@utdk/posthog /api/environments/{environment_id}/endpoints/{name}/
environments_endpoints_partial_update
Update an existing endpoint.
environment_id path required
Deprecated. Use /api/projects/{project_id}/ instead.
string
name path required
string

Try it

Authentication
Configure credentials for PostHog API
environmentsEndpointsPartialUpdate
PATCH/api/environments/{environment_id}/endpoints/{name}/
Update an existing endpoint.

Parameters

required

Deprecated. Use /api/projects/{project_id}/ instead.

required

Input

Unique URL-safe name. Must start with a letter, only letters/numbers/hyphens/underscores, max 128 chars.

HogQL or insight query this endpoint executes. Changing this auto-creates a new version.

Human-readable description of what this endpoint returns.

How fresh the data should be, in seconds. Must be one of: 900 (15 min), 1800 (30 min), 3600 (1 h), 21600 (6 h), 43200 (12 h), 86400 (24 h, default), 604800 (7 d). Controls cache TTL and materialization sync frequency.

Whether this endpoint is available for execution via the API.

Whether query results are materialized to S3.

Short ID of the insight this endpoint was derived from.

Target a specific version for updates (defaults to current version).

Per-column bucket overrides for range variable materialization. Keys are column names, values are bucket keys.

Set to true to soft-delete this endpoint.

List of tag names to associate with this endpoint. Replaces any existing tags.

Breakdown property names that may be omitted on /run. Omitted ones return data aggregated across all values of that breakdown. Defaults to [] — every breakdown variable is required.

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.environmentsEndpointsPartialUpdate()