{"openapi":"3.1.0","info":{"title":"PostHog Experiments (BYOK) API","version":"0.1.0","description":"PostHog Experiments (BYOK) lets an AI assistant read your own PostHog Experiments data through the PostHog Experiments API with a key you supply (personal API key (with experiment:read and activity_log:read scopes)). Read-only: 5 tools (list_experiments, get_experiment, get_experiment_health, get_experiment_session_exposure, list_experiment_activity). The BYOK key travels with each request, is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-posthog-experiments.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-posthog-experiments/docs"},"termsOfService":"https://connectorbay.com/byok-posthog-experiments/terms"},"servers":[{"url":"https://byok-posthog-experiments.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-posthog-experiments/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_experiments":{"post":{"operationId":"list_experiments","summary":"List the A/B experiments of a project with name, status, start and end dates, linked feature flag key, conclusion and ta","description":"List the A/B experiments of a project with name, status, start and end dates, linked feature flag key, conclusion and tags. Filter by status, archive state or text. Use for \"Which A/B experiments are running 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, see the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"status":{"anyOf":[{"enum":["all","complete","draft","exposure_frozen","paused","running","stopped"],"type":"string"},{"type":"null"}],"default":null,"description":"Only experiments in this state.","title":"Status"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list only archived experiments.","title":"Archived"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only experiments whose name matches this text.","title":"Search"},"feature_flag_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only experiments linked to the feature flag with this numeric id.","title":"Feature Flag Id"},"event":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only experiments that use this event name.","title":"Event"},"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_experimentsArguments","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_experiment":{"post":{"operationId":"get_experiment","summary":"Get one experiment with its name, description, status, dates, linked feature flag key, conclusion, tags and legacy flag.","description":"Get one experiment with its name, description, status, dates, linked feature flag key, conclusion, tags and legacy flag. Use for \"Show the details of PostHog experiment 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, see the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"experiment_id":{"description":"Experiment id (an integer) from list_experiments.","maximum":2147483647,"minimum":1,"title":"Experiment Id","type":"integer"}},"required":["region","project_id","experiment_id"],"title":"get_experimentArguments","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_experiment_health":{"post":{"operationId":"get_experiment_health","summary":"Get the health findings PostHog reports for an experiment, such as a flag turned off while running or a rollout of zero,","description":"Get the health findings PostHog reports for an experiment, such as a flag turned off while running or a rollout of zero, each with code, severity, title and detail. Use for \"Is PostHog experiment 7 healthy\".","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, see the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"experiment_id":{"description":"Experiment id (an integer) from list_experiments.","maximum":2147483647,"minimum":1,"title":"Experiment Id","type":"integer"}},"required":["region","project_id","experiment_id"],"title":"get_experiment_healthArguments","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_experiment_session_exposure":{"post":{"operationId":"get_experiment_session_exposure","summary":"Show whether the in-session exposure scope of the recordings tab is available for an experiment, and whether it falls ba","description":"Show whether the in-session exposure scope of the recordings tab is available for an experiment, and whether it falls back to the stamped flag property. Use for \"Can I scope PostHog recordings to experiment 7 exposure\".","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, see the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"experiment_id":{"description":"Experiment id (an integer) from list_experiments.","maximum":2147483647,"minimum":1,"title":"Experiment Id","type":"integer"}},"required":["region","project_id","experiment_id"],"title":"get_experiment_session_exposureArguments","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_experiment_activity":{"post":{"operationId":"list_experiment_activity","summary":"List the change history of one experiment: what happened (created, updated, launched), when, and the item name; people a","description":"List the change history of one experiment: what happened (created, updated, launched), when, and the item name; people are left out. Use for \"What changes were made to PostHog experiment 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, see the PostHog connector list_projects).","maxLength":200,"title":"Project Id","type":"string"},"experiment_id":{"description":"Experiment id (an integer) from list_experiments.","maximum":2147483647,"minimum":1,"title":"Experiment Id","type":"integer"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many entries to return 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","experiment_id"],"title":"list_experiment_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}}}}