{"openapi":"3.1.0","info":{"title":"PostHog Feature Flags (BYOK) API","version":"0.1.0","description":"PostHog Feature Flags (BYOK) lets an AI assistant read your own PostHog Feature Flags data through the PostHog Feature Flags API with a key you supply (personal API key (with feature_flag:read and early_access_feature:read scopes)). Read-only: 7 tools (list_feature_flags, get_feature_flag, get_feature_flag_status, list_dependent_flags, list_feature_flag_activity, list_early_access_features,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-posthog-feature-flags.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-posthog-feature-flags/docs"},"termsOfService":"https://connectorbay.com/byok-posthog-feature-flags/terms"},"servers":[{"url":"https://byok-posthog-feature-flags.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-posthog-feature-flags/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_feature_flags":{"post":{"operationId":"list_feature_flags","summary":"List the feature flags of a project with key, name, enabled state, status, tags and last evaluation time; filter by text","description":"List the feature flags of a project with key, name, enabled state, status, tags and last evaluation time; filter by text, type, tag or state. Rollout conditions are left out; use get_feature_flag for them. Use for \"Which feature flags are enabled in my PostHog project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"PostHog Cloud region of your account: us (us.posthog.com) or eu (eu.posthog.com).","enum":["us","eu"],"title":"Region","type":"string"},"project_id":{"description":"PostHog project id (a number, from the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only flags whose key or name matches this text (case-insensitive).","title":"Search"},"active":{"anyOf":[{"enum":["true","false","STALE"],"type":"string"},{"type":"null"}],"default":null,"description":"Serving state filter: true, false, or STALE (enabled but not evaluated for 30 days).","title":"Active"},"type":{"anyOf":[{"enum":["boolean","experiment","multivariant","remote_config"],"type":"string"},{"type":"null"}],"default":null,"description":"Only flags of this type.","title":"Type"},"tags":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"JSON-encoded list of tag names to filter by, for example [\"checkout\"].","title":"Tags"},"archived":{"anyOf":[{"enum":["true","false"],"type":"string"},{"type":"null"}],"default":null,"description":"Set to true to list archived flags (they are left out by default).","title":"Archived"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return per page (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many results to skip, for paging.","title":"Offset"}},"required":["region","project_id"],"title":"list_feature_flagsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_feature_flag":{"post":{"operationId":"get_feature_flag","summary":"Get one feature flag with its status, tags, evaluation contexts and release conditions (filters: groups, rollout percent","description":"Get one feature flag with its status, tags, evaluation contexts and release conditions (filters: groups, rollout percentages, variants). Use for \"Show the rollout conditions of PostHog feature flag 7\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"PostHog Cloud region of your account: us (us.posthog.com) or eu (eu.posthog.com).","enum":["us","eu"],"title":"Region","type":"string"},"project_id":{"description":"PostHog project id (a number, from the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"flag_id":{"description":"Feature flag id (an integer) from list_feature_flags.","maximum":2147483647,"minimum":1,"title":"Flag Id","type":"integer"}},"required":["region","project_id","flag_id"],"title":"get_feature_flagArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_feature_flag_status":{"post":{"operationId":"get_feature_flag_status","summary":"Show whether a flag is active, stale or inactive, why, and its rollout summary (full rollout, targeting conditions, maxi","description":"Show whether a flag is active, stale or inactive, why, and its rollout summary (full rollout, targeting conditions, maximum percentage). Use for \"Is PostHog feature flag 7 stale or fully rolled out\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"PostHog Cloud region of your account: us (us.posthog.com) or eu (eu.posthog.com).","enum":["us","eu"],"title":"Region","type":"string"},"project_id":{"description":"PostHog project id (a number, from the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"flag_id":{"description":"Feature flag id (an integer) from list_feature_flags.","maximum":2147483647,"minimum":1,"title":"Flag Id","type":"integer"}},"required":["region","project_id","flag_id"],"title":"get_feature_flag_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_dependent_flags":{"post":{"operationId":"list_dependent_flags","summary":"List the flags that depend on a given flag (use it as a condition), with id, key and name. Use for \"Which flags depend o","description":"List the flags that depend on a given flag (use it as a condition), with id, key and name. Use for \"Which flags depend on PostHog feature flag 7\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"PostHog Cloud region of your account: us (us.posthog.com) or eu (eu.posthog.com).","enum":["us","eu"],"title":"Region","type":"string"},"project_id":{"description":"PostHog project id (a number, from the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"flag_id":{"description":"Feature flag id (an integer) from list_feature_flags.","maximum":2147483647,"minimum":1,"title":"Flag Id","type":"integer"}},"required":["region","project_id","flag_id"],"title":"list_dependent_flagsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_feature_flag_activity":{"post":{"operationId":"list_feature_flag_activity","summary":"List the change history of one flag: activity type, time, scope and change detail; the acting person is left out. Newest","description":"List the change history of one flag: activity type, time, scope and change detail; the acting person is left out. Newest first. Use for \"What changed on PostHog feature flag 7 recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"PostHog Cloud region of your account: us (us.posthog.com) or eu (eu.posthog.com).","enum":["us","eu"],"title":"Region","type":"string"},"project_id":{"description":"PostHog project id (a number, from the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"flag_id":{"description":"Feature flag id (an integer) from list_feature_flags.","maximum":2147483647,"minimum":1,"title":"Flag Id","type":"integer"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many entries per page (1 to 100).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["region","project_id","flag_id"],"title":"list_feature_flag_activityArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_early_access_features":{"post":{"operationId":"list_early_access_features","summary":"List the early access features of a project (opt-in previews) with name, stage, description and documentation link. Use ","description":"List the early access features of a project (opt-in previews) with name, stage, description and documentation link. Use for \"Which early access features does my PostHog project offer\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"PostHog Cloud region of your account: us (us.posthog.com) or eu (eu.posthog.com).","enum":["us","eu"],"title":"Region","type":"string"},"project_id":{"description":"PostHog project id (a number, from the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return per page (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many results to skip, for paging.","title":"Offset"}},"required":["region","project_id"],"title":"list_early_access_featuresArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_early_access_feature":{"post":{"operationId":"get_early_access_feature","summary":"Get one early access feature with name, stage, description, documentation link and payload. Use for \"Show PostHog early ","description":"Get one early access feature with name, stage, description, documentation link and payload. Use for \"Show PostHog early access feature 0197aa\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"PostHog Cloud region of your account: us (us.posthog.com) or eu (eu.posthog.com).","enum":["us","eu"],"title":"Region","type":"string"},"project_id":{"description":"PostHog project id (a number, from the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"feature_id":{"description":"Early access feature id (a UUID string) from list_early_access_features.","maxLength":64,"title":"Feature Id","type":"string"}},"required":["region","project_id","feature_id"],"title":"get_early_access_featureArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}