> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PostHog Integration for AI Agents & Workflows

> Product analytics platform: events, persons, groups, cohorts, dashboards, insights, experiments, feature flags, surveys, session recordings, error tracking, and more (78 actions).

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/posthog.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=7c5edabcc775f4e4d97a0fc7f68ae587" alt="PostHog logo" width="72" height="72" data-path="logos/posthog.svg" />

## Overview

Add **PostHog** to any ModuleX agent or workflow. Product analytics platform integration via the PostHog REST + ingest APIs. Pure HTTP. **78 actions** — the largest single integration in the package.

<Info>
  **Categories**: Analytics & Data · Data & Analytics · Data · Development · **Auth**: PostHog API Key · **Actions**: 78
</Info>

## Authentication

### PostHog API Key Authentication

Connect to PostHog using your personal API key, project ID, and instance URL.

#### Required Credentials

| Field                                                                                                                               | Description                                                                                                                                     | Required                 | Format                                 |
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -------------------------------------- |
| Personal API Key                                                                                                                    | Your PostHog personal API key                                                                                                                   | Yes                      | `phx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` |
| Project ID                                                                                                                          | PostHog project ID (found in project settings)                                                                                                  | Yes                      | `12345`                                |
| Instance URL                                                                                                                        | Your PostHog instance URL — required. MUST be ONLY the host with scheme, no trailing slash, no path. Pick the line that matches your workspace: |                          |                                        |
| • US cloud:    [https://us.posthog.com](https://us.posthog.com)                                                                     |                                                                                                                                                 |                          |                                        |
| • EU cloud:    [https://eu.posthog.com](https://eu.posthog.com)                                                                     |                                                                                                                                                 |                          |                                        |
| • Self-hosted: [https://posthog.your-company.com](https://posthog.your-company.com)                                                 |                                                                                                                                                 |                          |                                        |
| DO NOT append /api, /api/projects, or any other path — the rest of the URL is added automatically. Trailing slash also not allowed. | Yes                                                                                                                                             | `https://us.posthog.com` |                                        |

## Available Actions

<AccordionGroup>
  <Accordion title="get_dashboards — List dashboards with optional search / pinned filter">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    <ResponseField name="pinned" type="boolean">
      Filter by pinned status
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_dashboard — Get a specific dashboard">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="dashboard_id" type="integer" required>
      dashboard\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_dashboard — Create a new dashboard">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Dashboard name
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="description" type="string">
      Dashboard description
    </ResponseField>

    <ResponseField name="pinned" type="boolean">
      Pin the dashboard
    </ResponseField>

    <ResponseField name="tags" type="array">
      Tag list
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_dashboard — Update a dashboard's name, description, pin, or tags">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="dashboard_id" type="integer" required>
      Dashboard ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="name" type="string">
      New name
    </ResponseField>

    <ResponseField name="description" type="string">
      New description
    </ResponseField>

    <ResponseField name="pinned" type="boolean">
      Pin status
    </ResponseField>

    <ResponseField name="tags" type="array">
      Tag list
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_dashboard — Delete a dashboard">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="dashboard_id" type="integer" required>
      dashboard\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_experiments — List experiments">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_experiment — Get an experiment">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="experiment_id" type="integer" required>
      experiment\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_experiment — Create an A/B test experiment">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Experiment name
    </ResponseField>

    <ResponseField name="feature_flag_key" type="string" required>
      Feature flag key linked to the experiment
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="description" type="string">
      Experiment description
    </ResponseField>

    <ResponseField name="experiment_type" type="string">
      'product' or 'web' (Default: `product`)
    </ResponseField>

    <ResponseField name="primary_metrics" type="array">
      Primary metric definitions
    </ResponseField>

    <ResponseField name="secondary_metrics" type="array">
      Secondary metric definitions
    </ResponseField>

    <ResponseField name="variants" type="array">
      Experiment variants
    </ResponseField>

    <ResponseField name="minimum_detectable_effect" type="number">
      Minimum detectable effect % (Default: `30`)
    </ResponseField>

    <ResponseField name="filter_test_accounts" type="boolean">
      Filter out internal/test accounts (Default: `true`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_experiment — Update an experiment (rename, change metrics, launch, conclude, or archive)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="experiment_id" type="integer" required>
      Experiment ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="name" type="string">
      New name
    </ResponseField>

    <ResponseField name="description" type="string">
      New description
    </ResponseField>

    <ResponseField name="primary_metrics" type="array">
      Primary metrics
    </ResponseField>

    <ResponseField name="secondary_metrics" type="array">
      Secondary metrics
    </ResponseField>

    <ResponseField name="launch" type="boolean">
      Launch the experiment
    </ResponseField>

    <ResponseField name="conclude" type="string">
      'won' / 'lost' / 'inconclusive'
    </ResponseField>

    <ResponseField name="archive" type="boolean">
      Archive the experiment
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_experiment — Delete an experiment">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="experiment_id" type="integer" required>
      experiment\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_experiment_results — Get experiment results (optionally force refresh)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="experiment_id" type="integer" required>
      Experiment ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="refresh" type="boolean">
      Force refresh (Default: `false`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_feature_flags — List feature flags">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_feature_flag — Get a flag definition. EITHER flag_id OR flag_key must be provided — pass only one. If both are given, flag_id is used.">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="flag_id" type="integer">
      Feature flag ID (integer). Mutually exclusive with flag\_key — provide one or the other.
    </ResponseField>

    <ResponseField name="flag_key" type="string">
      Feature flag key (string). Mutually exclusive with flag\_id — provide one or the other.
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_feature_flag — Create a feature flag">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="key" type="string" required>
      Flag key
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Flag name
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="description" type="string">
      Description
    </ResponseField>

    <ResponseField name="filters" type="object">
      Flag filters
    </ResponseField>

    <ResponseField name="active" type="boolean">
      Active (Default: `true`)
    </ResponseField>

    <ResponseField name="tags" type="array">
      Tag list
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_feature_flag — Update a feature flag (addressed by key)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="flag_key" type="string" required>
      Flag key to update
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="name" type="string">
      New name
    </ResponseField>

    <ResponseField name="description" type="string">
      New description
    </ResponseField>

    <ResponseField name="filters" type="object">
      Updated filters
    </ResponseField>

    <ResponseField name="active" type="boolean">
      Active state
    </ResponseField>

    <ResponseField name="tags" type="array">
      Tag list
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_feature_flag — Delete a feature flag">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="flag_id" type="integer" required>
      flag\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_insights — List insights">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_insight — Get an insight">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="insight_id" type="integer" required>
      insight\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_insight — Create an insight">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Insight name
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="description" type="string">
      Description
    </ResponseField>

    <ResponseField name="filters" type="object">
      Insight filter config
    </ResponseField>

    <ResponseField name="query" type="object">
      HogQL/JSON query
    </ResponseField>

    <ResponseField name="dashboards" type="array">
      Dashboard IDs to attach
    </ResponseField>

    <ResponseField name="tags" type="array">
      Tag list
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_insight — Update an insight">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="insight_id" type="integer" required>
      Insight ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="name" type="string">
      New name
    </ResponseField>

    <ResponseField name="description" type="string">
      New description
    </ResponseField>

    <ResponseField name="filters" type="object">
      Filter config
    </ResponseField>

    <ResponseField name="query" type="object">
      Query
    </ResponseField>

    <ResponseField name="tags" type="array">
      Tag list
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_insight — Delete an insight">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="insight_id" type="integer" required>
      insight\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="run_query — Run an ad-hoc HogQL/JSON query">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="query" type="object" required>
      Query body
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_error_tracking_issues — List error tracking issues">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    <ResponseField name="status" type="string">
      Filter by status
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_error_tracking_issue — Get an error tracking issue">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="issue_id" type="string" required>
      issue\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_surveys — List surveys">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_survey — Get a survey">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="survey_id" type="string" required>
      survey\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_survey — Create a survey">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Survey name
    </ResponseField>

    <ResponseField name="type" type="string">
      'popover' / 'widget' / 'api' (Default: `popover`)
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="description" type="string">
      Description
    </ResponseField>

    <ResponseField name="questions" type="array">
      Survey questions
    </ResponseField>

    <ResponseField name="conditions" type="object">
      Trigger conditions
    </ResponseField>

    <ResponseField name="linked_flag_id" type="integer">
      Linked feature flag ID
    </ResponseField>

    <ResponseField name="targeting_flag_filters" type="object">
      Targeting filters
    </ResponseField>

    <ResponseField name="appearance" type="object">
      Survey appearance config
    </ResponseField>

    <ResponseField name="start_date" type="string">
      Start date
    </ResponseField>

    <ResponseField name="end_date" type="string">
      End date
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_survey — Update a survey">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="survey_id" type="string" required>
      Survey ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="name" type="string">
      New name
    </ResponseField>

    <ResponseField name="description" type="string">
      New description
    </ResponseField>

    <ResponseField name="questions" type="array">
      Questions
    </ResponseField>

    <ResponseField name="conditions" type="object">
      Trigger conditions
    </ResponseField>

    <ResponseField name="archived" type="boolean">
      Archive the survey
    </ResponseField>

    <ResponseField name="start_date" type="string">
      Start date
    </ResponseField>

    <ResponseField name="end_date" type="string">
      End date
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_survey — Delete a survey">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="survey_id" type="string" required>
      survey\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_organizations — List organizations the user belongs to">
    ### Parameters

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_projects — List projects in an organization">
    ### Parameters

    <ResponseField name="organization_id" type="string">
      Organization ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_event_definitions — List event definitions">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_property_definitions — List property definitions">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    <ResponseField name="event_names" type="array">
      Filter by event names
    </ResponseField>

    <ResponseField name="type" type="string">
      Filter by property type
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="capture_event — Capture a single event (ingest API)">
    ### Parameters

    <ResponseField name="project_api_key" type="string" required>
      PostHog project API key
    </ResponseField>

    <ResponseField name="distinct_id" type="string" required>
      Distinct user ID
    </ResponseField>

    <ResponseField name="event" type="string" required>
      Event name
    </ResponseField>

    <ResponseField name="properties" type="object">
      Event properties
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      ISO 8601 timestamp
    </ResponseField>

    <ResponseField name="ingest_url" type="string">
      PostHog ingest URL (default: [https://us.i.posthog.com](https://us.i.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="batch_capture_events — Capture multiple events in one batch request">
    ### Parameters

    <ResponseField name="project_api_key" type="string" required>
      PostHog project API key
    </ResponseField>

    <ResponseField name="events" type="array" required>
      List of event objects
    </ResponseField>

    <ResponseField name="historical_migration" type="boolean">
      Flag historical imports (Default: `false`)
    </ResponseField>

    <ResponseField name="ingest_url" type="string">
      PostHog ingest URL (default: [https://us.i.posthog.com](https://us.i.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="identify_user — Set / update properties on a person via $identify event">
    ### Parameters

    <ResponseField name="project_api_key" type="string" required>
      PostHog project API key
    </ResponseField>

    <ResponseField name="distinct_id" type="string" required>
      Distinct user ID
    </ResponseField>

    <ResponseField name="properties" type="object" required>
      Properties to set
    </ResponseField>

    <ResponseField name="ingest_url" type="string">
      PostHog ingest URL (default: [https://us.i.posthog.com](https://us.i.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="alias_user — Create an alias between two distinct IDs (merge users)">
    ### Parameters

    <ResponseField name="project_api_key" type="string" required>
      PostHog project API key
    </ResponseField>

    <ResponseField name="distinct_id" type="string" required>
      Canonical distinct ID
    </ResponseField>

    <ResponseField name="alias" type="string" required>
      Alias distinct ID to merge in
    </ResponseField>

    <ResponseField name="ingest_url" type="string">
      PostHog ingest URL (default: [https://us.i.posthog.com](https://us.i.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="evaluate_feature_flags — Evaluate all feature flags for a user (server-side flag evaluation via /flags?v=2)">
    ### Parameters

    <ResponseField name="project_api_key" type="string" required>
      PostHog project API key
    </ResponseField>

    <ResponseField name="distinct_id" type="string" required>
      Distinct user ID
    </ResponseField>

    <ResponseField name="groups" type="object">
      Group memberships
    </ResponseField>

    <ResponseField name="person_properties" type="object">
      Person properties
    </ResponseField>

    <ResponseField name="group_properties" type="object">
      Group properties
    </ResponseField>

    <ResponseField name="ingest_url" type="string">
      PostHog ingest URL (default: [https://us.i.posthog.com](https://us.i.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="group_identify — Identify a group (B2B analytics — org/company/etc.)">
    ### Parameters

    <ResponseField name="project_api_key" type="string" required>
      PostHog project API key
    </ResponseField>

    <ResponseField name="group_type" type="string" required>
      Group type (e.g. 'company')
    </ResponseField>

    <ResponseField name="group_key" type="string" required>
      Group key (the unique ID)
    </ResponseField>

    <ResponseField name="properties" type="object" required>
      Properties to set on the group
    </ResponseField>

    <ResponseField name="ingest_url" type="string">
      PostHog ingest URL (default: [https://us.i.posthog.com](https://us.i.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_persons — List persons">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    <ResponseField name="distinct_id" type="string">
      Filter by distinct ID
    </ResponseField>

    <ResponseField name="email" type="string">
      Filter by email
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_person — Get a person by ID">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="person_id" type="string" required>
      person\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_person — Update person properties (PATCH)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="person_id" type="integer" required>
      Person ID
    </ResponseField>

    <ResponseField name="properties" type="object" required>
      Properties to set
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_person — Delete a person (optionally with associated events)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="person_id" type="integer" required>
      Person ID
    </ResponseField>

    <ResponseField name="delete_events" type="boolean">
      Also delete events (GDPR) (Default: `false`)
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="bulk_delete_persons — Delete multiple persons in one call">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="person_ids" type="array" required>
      Person IDs to delete
    </ResponseField>

    <ResponseField name="delete_events" type="boolean">
      Also delete events (Default: `false`)
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_groups — List groups of a specific group type">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="group_type_index" type="integer" required>
      Group type index (0-4)
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="find_group — Find a specific group by type + key">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="group_type_index" type="integer" required>
      Group type index
    </ResponseField>

    <ResponseField name="group_key" type="string" required>
      Group key
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_group_types — List configured group types for the project">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_cohorts — List cohorts">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_cohort — Get a cohort">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="cohort_id" type="integer" required>
      cohort\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_cohort — Create a static or dynamic cohort">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Cohort name
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="description" type="string">
      Description
    </ResponseField>

    <ResponseField name="is_static" type="boolean">
      Static cohort (Default: `false`)
    </ResponseField>

    <ResponseField name="filters" type="object">
      Filter config
    </ResponseField>

    <ResponseField name="groups" type="array">
      Group filters
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_cohort — Update a cohort">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="cohort_id" type="integer" required>
      Cohort ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="name" type="string">
      New name
    </ResponseField>

    <ResponseField name="description" type="string">
      New description
    </ResponseField>

    <ResponseField name="filters" type="object">
      Filters
    </ResponseField>

    <ResponseField name="groups" type="array">
      Groups
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_cohort — Soft-delete a cohort">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="cohort_id" type="integer" required>
      cohort\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_cohort_persons — List persons in a cohort">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="cohort_id" type="integer" required>
      Cohort ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_session_recordings — List session recordings (metadata only)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_session_recording — Get one session recording">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="recording_id" type="string" required>
      recording\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_session_recording — Delete a session recording">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="recording_id" type="string" required>
      recording\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_actions — List actions">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_action — Get an action">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="action_id" type="integer" required>
      action\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_action — Create an action (composite event)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Action name
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="description" type="string">
      Description
    </ResponseField>

    <ResponseField name="steps" type="array">
      Action steps (conditions)
    </ResponseField>

    <ResponseField name="tags" type="array">
      Tag list
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_action — Update an action">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="action_id" type="integer" required>
      Action ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="name" type="string">
      New name
    </ResponseField>

    <ResponseField name="description" type="string">
      New description
    </ResponseField>

    <ResponseField name="steps" type="array">
      Steps
    </ResponseField>

    <ResponseField name="tags" type="array">
      Tag list
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_action — Delete an action (tries soft-delete, falls back to rename if PostHog's soft-delete fails — legacy bug workaround)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="action_id" type="integer" required>
      Action ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_action_by_name — Search + delete an action by name (DELETE → soft-delete → rename fallback chain)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Action name to find + delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_annotations — List annotations">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="search" type="string">
      Search query
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_annotation — Get an annotation">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="annotation_id" type="integer" required>
      annotation\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_annotation — Create an annotation (a note at a point in time)">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="content" type="string" required>
      Annotation text
    </ResponseField>

    <ResponseField name="date_marker" type="string" required>
      Date marker (ISO 8601)
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="dashboard_item" type="integer">
      Linked insight (dashboard item)
    </ResponseField>

    <ResponseField name="scope" type="string">
      'dashboard\_item' / 'project' / 'organization' (Default: `organization`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_annotation — Update an annotation">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="annotation_id" type="integer" required>
      Annotation ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="content" type="string">
      New content
    </ResponseField>

    <ResponseField name="date_marker" type="string">
      New date marker
    </ResponseField>

    <ResponseField name="scope" type="string">
      New scope
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_annotation — Delete an annotation">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="annotation_id" type="integer" required>
      annotation\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_alerts — List alerts">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    <ResponseField name="insight_id" type="integer">
      Filter by insight ID
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_alert — Get an alert">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="alert_id" type="string" required>
      alert\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_alert — Create an alert on an insight">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="insight_id" type="integer" required>
      Insight ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Alert name
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="threshold" type="object">
      Threshold config
    </ResponseField>

    <ResponseField name="subscribed_users" type="array">
      User IDs to notify
    </ResponseField>

    <ResponseField name="enabled" type="boolean">
      Enabled (Default: `true`)
    </ResponseField>

    <ResponseField name="notification_targets" type="object">
      Notification target config
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_alert — Update an alert">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="alert_id" type="string" required>
      Alert ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="name" type="string">
      New name
    </ResponseField>

    <ResponseField name="threshold" type="object">
      Threshold config
    </ResponseField>

    <ResponseField name="subscribed_users" type="array">
      User IDs
    </ResponseField>

    <ResponseField name="enabled" type="boolean">
      Enabled state
    </ResponseField>

    <ResponseField name="notification_targets" type="object">
      Notification targets
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_alert — Delete an alert">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="alert_id" type="string" required>
      alert\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_early_access_features — List early-access features">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Max results (Default: `100`)
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Results to skip (Default: `0`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_early_access_feature — Get an early-access feature">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="feature_id" type="string" required>
      feature\_id to retrieve
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_early_access_feature — Create an early-access feature">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Feature name
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="description" type="string">
      Description
    </ResponseField>

    <ResponseField name="stage" type="string">
      draft / beta / general-availability / archived (Default: `beta`)
    </ResponseField>

    <ResponseField name="documentation_url" type="string">
      Documentation URL
    </ResponseField>

    <ResponseField name="feature_flag_id" type="integer">
      Linked feature flag ID
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_early_access_feature — Update an early-access feature">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="feature_id" type="string" required>
      Feature ID
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    <ResponseField name="name" type="string">
      New name
    </ResponseField>

    <ResponseField name="description" type="string">
      New description
    </ResponseField>

    <ResponseField name="stage" type="string">
      Updated stage
    </ResponseField>

    <ResponseField name="documentation_url" type="string">
      Updated documentation URL
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_early_access_feature — Delete an early-access feature">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="feature_id" type="string" required>
      feature\_id to delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_early_access_feature_by_name — Search + delete an early-access feature by name">
    ### Parameters

    <ResponseField name="project_id" type="integer" required>
      PostHog project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Feature name to find + delete
    </ResponseField>

    <ResponseField name="base_url" type="string">
      PostHog instance URL (default: [https://app.posthog.com](https://app.posthog.com))
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "default": null,
          "title": "Result"
        }
      },
      "required": [
        "success"
      ],
      "title": "PostHogResult",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Related integrations

<CardGroup cols={3}>
  <Card title="Amplitude" href="/integrations/tools/amplitude" />

  <Card title="Databricks" href="/integrations/tools/databricks" />

  <Card title="Exa Search" href="/integrations/tools/exa-search" />
</CardGroup>

## Links

* [PostHog](https://posthog.com)
