provider insight_variables PUT /api/environments/{environment_id}/insight_variables/{id}/
@utdk/posthog /api/environments/{environment_id}/insight_variables/{id}/
environments_insight_variables_update
environment_id path required
Deprecated. Use /api/projects/{project_id}/ instead.
string
id path required
A UUID string identifying this insight variable.
string

Try it

Authentication
Configure credentials for PostHog API
environmentsInsightVariablesUpdate
PUT/api/environments/{environment_id}/insight_variables/{id}/

Parameters

required

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

required

A UUID string identifying this insight variable.

Input

required

UUID of the SQL variable.

required

Human-readable name for the SQL variable.

required

Variable type. Controls how the value is rendered and substituted in HogQL. * `String` - String * `Number` - Number * `Boolean` - Boolean * `List` - List * `Date` - Date

Default value used when a query references this variable.

required

ID of the user who created the SQL variable.

required

Timestamp when the SQL variable was created.

required

Generated code-safe name used in HogQL as {variables.code_name}. Derived from name.

Allowed values for List variables. Null for other variable types.

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