{"openapi":"3.1.0","info":{"title":"PostHog Data Definitions (BYOK) API","version":"0.1.0","description":"PostHog Data Definitions (BYOK) lets an AI assistant read your own PostHog Data Definitions data through the PostHog Data Definitions API with a key you supply (personal API key (with event_definition:read, property_definition:read and group:read scopes)). Read-only: 6 tools (list_event_definitions, get_event_definition, get_event_definition_by_name, list_property_definitions,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-posthog-definitions.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-posthog-definitions/docs"},"termsOfService":"https://connectorbay.com/byok-posthog-definitions/terms"},"servers":[{"url":"https://byok-posthog-definitions.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-posthog-definitions/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_event_definitions":{"post":{"operationId":"list_event_definitions","summary":"List the event definitions (names of tracked events) of a project with description, tags, verification, hidden flag, enf","description":"List the event definitions (names of tracked events) of a project with description, tags, verification, hidden flag, enforcement mode and when the event was last seen. No event data is returned. Use for \"Which events does my PostHog project track\".","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":"Case-insensitive match on the event name; every word must match.","title":"Search"},"event_type":{"anyOf":[{"enum":["event","event_custom","event_posthog"],"type":"string"},{"type":"null"}],"default":null,"description":"event_custom keeps names without a $ prefix, event_posthog only names with one; default event (all).","title":"Event Type"},"exclude_stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to leave out events not seen for 30 days.","title":"Exclude Stale"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True keeps only verified events (Enterprise feature); false keeps the rest.","title":"Verified"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"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_event_definitionsArguments","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_event_definition":{"post":{"operationId":"get_event_definition","summary":"Get one event definition by its UUID with description, tags, verification, hidden flag, enforcement mode and last seen t","description":"Get one event definition by its UUID with description, tags, verification, hidden flag, enforcement mode and last seen time. Use for \"Show the definition of PostHog event 0197c1\".","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"},"definition_id":{"description":"Event definition id (a UUID string) from list_event_definitions.","maxLength":64,"title":"Definition Id","type":"string"}},"required":["region","project_id","definition_id"],"title":"get_event_definitionArguments","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_event_definition_by_name":{"post":{"operationId":"get_event_definition_by_name","summary":"Look up one event definition by its exact event name, for example checkout_completed. Use for \"What is the definition of","description":"Look up one event definition by its exact event name, for example checkout_completed. Use for \"What is the definition of the checkout_completed event in PostHog\".","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"},"name":{"description":"The exact event name.","maxLength":200,"title":"Name","type":"string"}},"required":["region","project_id","name"],"title":"get_event_definition_by_nameArguments","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_property_definitions":{"post":{"operationId":"list_property_definitions","summary":"List the property definitions of a project (names and types of event, person, group or session properties) with descript","description":"List the property definitions of a project (names and types of event, person, group or session properties) with description, tags and numeric flag. No property values are returned. Use for \"Which person properties does my PostHog project have\".","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":[{"enum":["event","person","group","session"],"type":"string"},{"type":"null"}],"default":null,"description":"Kind of property: event, person, group or session (the API default is event).","title":"Type"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Case-insensitive match on the property name.","title":"Search"},"group_type_index":{"anyOf":[{"maximum":10,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Group type index (an integer from list_group_types); only used with type=group.","title":"Group Type Index"},"is_numerical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True keeps only numeric properties, false only non-numeric ones.","title":"Is Numerical"},"exclude_hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to leave out properties hidden by an admin.","title":"Exclude Hidden"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"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_property_definitionsArguments","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_property_definition":{"post":{"operationId":"get_property_definition","summary":"Get one property definition by its UUID with description, tags, numeric flag and verification state. Use for \"Show PostH","description":"Get one property definition by its UUID with description, tags, numeric flag and verification state. Use for \"Show PostHog property definition 0197d2\".","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"},"definition_id":{"description":"Property definition id (a UUID string) from list_property_definitions.","maxLength":64,"title":"Definition Id","type":"string"}},"required":["region","project_id","definition_id"],"title":"get_property_definitionArguments","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_group_types":{"post":{"operationId":"list_group_types","summary":"List the group types of a project (for example company or organization) with their index, singular and plural display na","description":"List the group types of a project (for example company or organization) with their index, singular and plural display names. Use for \"Which group types are set up 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"}},"required":["region","project_id"],"title":"list_group_typesArguments","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}}}}