Canonical: https://weaveos.com/reference/posthog/read-feature-flag-definition

1. [Software capabilities](https://weaveos.com/reference)
2. /[PostHog](https://weaveos.com/reference/posthog)
3. /Read a PostHog feature flag definition

PostHog capability

# Read a PostHog feature flag definition

Read a feature flag definition to inspect its key, active state, and rollout rules. To check what a given user receives, evaluate the flag with that user’s context.

Documentation reviewed November 26, 2026

## Ways to do it

API

### GET /api/projects/{project\_id}/feature\_flags/{id}/

Retrieve the flag definition and its filters by numeric ID.

- Requirements

  Project ID, numeric feature flag ID, and a personal API key with feature\_flag:read permission.

- Limitations

  The endpoint requires the numeric ID. Resolve it first when you only have the flag key.

Example

```
curl --fail -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
  "$POSTHOG_HOST/api/projects/$PROJECT_ID/feature_flags/$FLAG_ID/"
```

[Read source: PostHog Feature Flags API ↗](https://posthog.com/docs/api/feature-flags)

MCP

### feature-flag-get-definition-by-key

Retrieve the configuration for a flag using its key in an MCP tool call.

- Requirements

  An authenticated PostHog MCP client with access to the project, the flag key, and this tool enabled.

- Limitations

  The result describes the flag definition. A per-user value still needs an evaluation with user properties.

[Read source: PostHog MCP feature flag tools ↗](https://posthog.com/docs/model-context-protocol/tools)

Interface

### PostHog → Feature flags → flag

Open the flag to inspect release conditions, variant settings, and rollout percentages.

- Requirements

  Project access that allows viewing the flag.

- Limitations

  The page displays configuration. To see a user-specific value, evaluate against a user or group context.

[Read source: PostHog feature flag configuration ↗](https://posthog.com/docs/feature-flags/creating-feature-flags)

## More from PostHog

[View all PostHog capabilities →](https://weaveos.com/reference/posthog)

- [Query PostHog event data↗](https://weaveos.com/reference/posthog/query-event-data)
