PostHog Feature Flags API

The feature_flags API from PostHog — 19 operation(s) for feature_flags.

GitHub OpenAPI
Business capability
Feature Flag Management BC-4210.50

Operations 23

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/projects/{project_id}/feature_flags/ List feature flags · Feature flags list #
Ask an LLM
“Which feature flags are active in my project?”
“Can I list flags that use a particular evaluation runtime?”
Tell an agent
List feature flags in project {project_id}.
Show active feature flags in project {project_id} tagged {tags}.
POST /api/projects/{project_id}/feature_flags/ Create a feature flag · Feature flags create #
Ask an LLM
“How do I create a feature flag that targets specific users?”
“Can I set evaluation contexts when creating a flag?”
Tell an agent
Create feature flag {name} with key {key} in project {project_id}.
Create flag {key} in project {project_id} with filters {filters}.
GET /api/projects/{project_id}/feature_flags/{id}/ Get a feature flag · Feature flags retrieve #
Ask an LLM
“What filters and status does a specific feature flag have?”
“Can I look up one flag by its ID?”
Tell an agent
Get feature flag {id} in project {project_id}.
Show the filters on flag {id} in project {project_id}.
PUT /api/projects/{project_id}/feature_flags/{id}/ Replace a feature flag · Feature flags update #
Ask an LLM
“How do I overwrite a feature flag's filters and evaluation contexts?”
“Can I change a flag's key and name in one call?”
Tell an agent
Replace feature flag {id} in project {project_id} with key {key} and filters {filters}.
Overwrite flag {id} in project {project_id} with name {name}.
PATCH /api/projects/{project_id}/feature_flags/{id}/ Update a feature flag · Feature flags partial update #
Ask an LLM
“Can I deactivate a feature flag without replacing it?”
“How do I add tags to an existing flag?”
Tell an agent
Set active to {active} on feature flag {id} in project {project_id}.
Add tags {tags} to flag {id} in project {project_id}.
DELETE /api/projects/{project_id}/feature_flags/{id}/ Delete a feature flag · Feature flags destroy #
Ask an LLM
“How do I delete a feature flag?”
“Is a hard delete of a flag allowed?”
Tell an agent destructive · confirm first
Delete feature flag {id} in project {project_id}.
Remove flag {id} from project {project_id}.
GET /api/projects/{project_id}/feature_flags/{id}/activity/ Get a flag's activity log · Feature flags activity retrieve #
Ask an LLM
“Who changed a feature flag and when?”
“Can I page through the activity log for one flag?”
Tell an agent
Show the activity log for feature flag {id} in project {project_id}.
Get page {page} of flag {id}'s activity in project {project_id}.
POST /api/projects/{project_id}/feature_flags/{id}/create_static_cohort_for_flag/ Create a cohort from a flag · Feature flags create static cohort for flag create #
Ask an LLM
“How do I create a static cohort from a flag's filters?”
“Can I build a cohort based on a feature flag?”
Tell an agent
Create a static cohort from feature flag {id} in project {project_id}.
Build a cohort using the filters of flag {id} in project {project_id}.
POST /api/projects/{project_id}/feature_flags/{id}/dashboard/ Create a dashboard for a feature flag · Feature flags dashboard create #
Ask an LLM
“How do I create a dashboard for an existing feature flag?”
“Can I set up an analytics dashboard tied to one flag?”
Tell an agent
Create the analytics dashboard for flag {id} in project {project_id}.
Set up a dashboard for flag {id} with key {key} in project {project_id}.
GET /api/projects/{project_id}/feature_flags/{id}/dependent_flags/ List flags that depend on a flag · Feature flags dependent flags list #
Ask an LLM
“Which other flags depend on a given feature flag?”
“Can I see the dependency chain of a flag?”
Tell an agent
List flags that depend on feature flag {id} in project {project_id}.
Show the dependent flags of flag {id} in project {project_id}.
POST /api/projects/{project_id}/feature_flags/{id}/enrich_usage_dashboard/ Enrich a flag's usage dashboard · Feature flags enrich usage dashboard create #
Ask an LLM
“How do I enrich the usage dashboard of a feature flag?”
“Can I add more metrics to a flag's dashboard?”
Tell an agent
Enrich the usage dashboard of feature flag {id} in project {project_id}.
Add metrics to flag {id}'s dashboard in project {project_id}.
GET /api/projects/{project_id}/feature_flags/{id}/remote_config/ Get a flag's remote config · Feature flags remote config retrieve #
Ask an LLM
“What remote configuration does a feature flag use?”
“Can I fetch a flag's remote config by ID?”
Tell an agent
Get the remote config of feature flag {id} in project {project_id}.
Show remote config for flag {id} in project {project_id}.
GET /api/projects/{project_id}/feature_flags/{id}/status/ Get a flag's status · Feature flags status retrieve #
Ask an LLM
“Is a feature flag active and what is its status?”
“Can I check a flag's status before using it?”
Tell an agent
Get the status of feature flag {id} in project {project_id}.
Check whether flag {id} in project {project_id} is active.
GET /api/projects/{project_id}/feature_flags/{id}/versions/{version_number}/ Get a flag's version · Feature flags versions retrieve #
Ask an LLM
“What did a feature flag look like in a previous version?”
“Can I retrieve a specific version of a flag?”
Tell an agent
Get version {version_number} of feature flag {id} in project {project_id}.
Show the filters of flag {id} at version {version_number} in project {project_id}.
GET /api/projects/{project_id}/feature_flags/activity/ List activity across all flags · Feature flags all activity retrieve #
Ask an LLM
“Who created or changed feature flags across my whole project?”
“Can I page through activity for all flags at once?”
Tell an agent
List activity across all feature flags in project {project_id}.
Show page {page} of activity for every flag in project {project_id}.
POST /api/projects/{project_id}/feature_flags/bulk_delete/ Bulk delete feature flags · Feature flags bulk delete create #
Ask an LLM
“Can I delete several feature flags at once?”
“Does bulk flag deletion accept the same filters as the flag list?”
Tell an agent destructive · confirm first
Bulk delete feature flags in project {project_id} matching filters {filters}.
Bulk delete flag {id} and others I list in project {project_id}.
POST /api/projects/{project_id}/feature_flags/bulk_keys/ Look up feature flag keys by ID · Feature flags bulk keys create #
Ask an LLM
“What key does each of these feature flags have?”
“Can I look up flag keys from a list of IDs?”
Tell an agent
Get the feature flag key for flag ID {id} in project {project_id}.
Map flag ID {id} to its key in project {project_id}.
POST /api/projects/{project_id}/feature_flags/bulk_update_tags/ Bulk add, remove or replace tags on flags · Feature flags bulk update tags create #
Ask an LLM
“Can I add tags to many feature flags in one request?”
“Is there a way to remove specific tags from several flags?”
Tell an agent
Apply {action} action with tags {tags} to feature flags {ids} in project {project_id}.
Bulk {action} tags {tags} on flags {ids} in project {project_id}.
GET /api/projects/{project_id}/feature_flags/evaluation_reasons/ See why flags returned values for a user · Feature flags evaluation reasons retrieve #
Ask an LLM
“Why did a feature flag return on or off for one user?”
“Can I see the reason a flag evaluated a certain way for a person?”
Tell an agent
Show evaluation reasons for distinct ID {distinct_id} in project {project_id}.
Explain flag results for {distinct_id} in groups {groups} in project {project_id}.
GET /api/projects/{project_id}/feature_flags/local_evaluation/ Evaluate flags on a user's own device · Feature flags local evaluation retrieve #
Ask an LLM
“Can I evaluate flags locally on my own device?”
“Is there a local flag evaluation endpoint that includes cohorts?”
Tell an agent
Evaluate feature flags locally for project {project_id}.
Run a local flag evaluation for project {project_id} with cohorts: {send_cohorts}.
GET /api/projects/{project_id}/feature_flags/matching_ids/ Get IDs of flags matching filters · Feature flags matching ids retrieve #
Ask an LLM
“Which feature flag IDs match my current filters?”
“Can I get only the flag IDs I'm allowed to edit?”
Tell an agent
Get the IDs of feature flags matching my filters.
List only the flag IDs in project {project_id} that I can edit.
GET /api/projects/{project_id}/feature_flags/my_flags/ List flags I have access to · Feature flags my flags retrieve #
Ask an LLM
“Which feature flags can I edit?”
“Can I see the flags I'm assigned to in a project?”
Tell an agent
List my feature flags in project {project_id}.
Show the flags I have access to for groups {groups}.
POST /api/projects/{project_id}/feature_flags/user_blast_radius/ Estimate users affected by a release condition · Feature flags user blast radius create #
Ask an LLM
“How many users would a flag's release condition reach?”
“Can I calculate a blast radius for a group-based flag condition?”
Tell an agent
Calculate the user blast radius in project {project_id} for condition {condition}.
Estimate affected users in project {project_id} for condition {condition} on group type index {group_type_index}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/posthog:posthog-feature-flags-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

posthog-feature-flags-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PostHog Feature Flags API
  version: 1.0.0
  description: ''
tags:


# --- truncated at 32 KB (66 KB total) ---
# Full source: https://artifacts.apis.io/posthog/openapi/posthog-feature-flags-api-openapi.yml