provider feature_flags POST /api/projects/{project_id}/feature_flags/{id}/test_evaluation/
@utdk/posthog /api/projects/{project_id}/feature_flags/{id}/test_evaluation/
feature_flags_test_evaluation_create
Test feature flag evaluation against a specific user at an optional point in time. This endpoint allows testing how a feature flag would evaluate for a specific user, optionally at a historical timestamp. When a timestamp is provided, both the flag conditions and person properties are evaluated as they existed at that time.
id path required
A unique integer value identifying this feature flag.
integer
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string

Try it

Authentication
Configure credentials for PostHog API
featureFlagsTestEvaluationCreate
POST/api/projects/{project_id}/feature_flags/{id}/test_evaluation/
Test feature flag evaluation against a specific user at an optional point in time. This endpoint allows testing how a feature flag would evaluate for a specific user, optionally at a historical timestamp. When a timestamp is provided, both the flag conditions and person properties are evaluated as they existed at that time.

Parameters

required

A unique integer value identifying this feature flag.

required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Input

User distinct ID to test against (mutually exclusive with person_id)

Person ID to test against (mutually exclusive with distinct_id)

Optional point-in-time to evaluate the flag against — both flag conditions and person properties are reconstructed as they existed at that timestamp. ISO 8601 with timezone, e.g. ``2026-04-29T15:30:00Z`` or ``2026-04-29T15:30:00+00:00``. Naive timestamps (no timezone) are interpreted as UTC.

Groups for feature flag evaluation (JSON object, defaults to empty dict)

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