{"openapi":"3.1.0","info":{"title":"PostHog Pipelines (BYOK) API","version":"0.1.0","description":"PostHog Pipelines (BYOK) lets an AI assistant read your own PostHog Pipelines data through the PostHog Pipelines API with a key you supply (personal API key (with batch_export:read, hog_function:read and alert:read scopes)). Read-only: 8 tools (list_batch_exports, get_batch_export, list_batch_export_runs, list_batch_export_backfills, list_pipeline_functions, get_pipeline_function,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-posthog-pipelines.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-posthog-pipelines/docs"},"termsOfService":"https://connectorbay.com/byok-posthog-pipelines/terms"},"servers":[{"url":"https://byok-posthog-pipelines.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-posthog-pipelines/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_batch_exports":{"post":{"operationId":"list_batch_exports","summary":"List the batch exports (scheduled copies of PostHog data to a warehouse or storage) with name, data model, destination t","description":"List the batch exports (scheduled copies of PostHog data to a warehouse or storage) with name, data model, destination type, interval and paused state. Destination settings are left out. Use for \"Which PostHog batch exports are set up and are any paused\".","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_batch_exportsArguments","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_batch_export":{"post":{"operationId":"get_batch_export","summary":"Get one batch export with its data model, destination type, interval, schedule window and paused state. Destination sett","description":"Get one batch export with its data model, destination type, interval, schedule window and paused state. Destination settings are left out. Use for \"Show the settings of PostHog batch export 0197e1aa\".","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"},"batch_export_id":{"description":"Batch export id (a UUID string) from list_batch_exports.","maxLength":64,"title":"Batch Export Id","type":"string"}},"required":["region","project_id","batch_export_id"],"title":"get_batch_exportArguments","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_batch_export_runs":{"post":{"operationId":"list_batch_export_runs","summary":"List recent runs of a batch export with status, time window, records and bytes exported and the latest error. Defaults t","description":"List recent runs of a batch export with status, time window, records and bytes exported and the latest error. Defaults to the last 7 days. Use for \"Did last night's PostHog batch export run succeed\".","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"},"batch_export_id":{"description":"Batch export id (a UUID string) from list_batch_exports.","maxLength":64,"title":"Batch Export Id","type":"string"},"after":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only runs created at or after this ISO 8601 time or relative value such as -7d (default -7d).","title":"After"},"before":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only runs created at or before this ISO 8601 time or relative value such as -1d (default now).","title":"Before"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor taken from the next link of the previous answer.","title":"Cursor"}},"required":["region","project_id","batch_export_id"],"title":"list_batch_export_runsArguments","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_batch_export_backfills":{"post":{"operationId":"list_batch_export_backfills","summary":"List the backfills (historical re-exports) of a batch export with status, range, progress and record count. Use for \"Has","description":"List the backfills (historical re-exports) of a batch export with status, range, progress and record count. Use for \"Has PostHog batch export 0197e1aa been backfilled\".","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"},"batch_export_id":{"description":"Batch export id (a UUID string) from list_batch_exports.","maxLength":64,"title":"Batch Export Id","type":"string"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor taken from the next link of the previous answer.","title":"Cursor"}},"required":["region","project_id","batch_export_id"],"title":"list_batch_export_backfillsArguments","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_pipeline_functions":{"post":{"operationId":"list_pipeline_functions","summary":"List the data pipeline functions (destinations, transformations and sources that run Hog code) with type, name, enabled ","description":"List the data pipeline functions (destinations, transformations and sources that run Hog code) with type, name, enabled state and dates. The code and input settings are left out. Use for \"Which PostHog pipeline destinations are enabled\".","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"},"type":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only functions of this type, for example destination, transformation or source_webhook; comma-separated for several.","title":"Type"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for enabled functions only, false for disabled ones.","title":"Enabled"},"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_pipeline_functionsArguments","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_pipeline_function":{"post":{"operationId":"get_pipeline_function","summary":"Get one data pipeline function with its type, name, description, enabled state and dates. Code and input settings are le","description":"Get one data pipeline function with its type, name, description, enabled state and dates. Code and input settings are left out. Use for \"Show PostHog pipeline function 0197f1\".","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"},"function_id":{"description":"Pipeline function id (a UUID string) from list_pipeline_functions.","maxLength":64,"title":"Function Id","type":"string"}},"required":["region","project_id","function_id"],"title":"get_pipeline_functionArguments","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_insight_alerts":{"post":{"operationId":"list_insight_alerts","summary":"List the alerts set on insights with the insight name, state (Firing, Not firing, Errored, Snoozed), enabled flag, last ","description":"List the alerts set on insights with the insight name, state (Firing, Not firing, Errored, Snoozed), enabled flag, last check and last value; subscribers are left out. Use for \"Which PostHog alerts are firing\".","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":"Fuzzy match on the alert name.","title":"Search"},"insight_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only alerts on this insight id (an integer).","title":"Insight Id"},"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_insight_alertsArguments","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_insight_alert":{"post":{"operationId":"get_insight_alert","summary":"Get one insight alert with its condition, threshold, check interval, state and last value. Use for \"Show the threshold o","description":"Get one insight alert with its condition, threshold, check interval, state and last value. Use for \"Show the threshold of PostHog alert 0197a1\".","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"},"alert_id":{"description":"Alert id (a UUID string) from list_insight_alerts.","maxLength":64,"title":"Alert Id","type":"string"}},"required":["region","project_id","alert_id"],"title":"get_insight_alertArguments","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}}}}