Skip to content

IntegrationsAnalytics

PostHog API integration

Put PostHog in your product or your AI agent. Truto handles the sign-in and the token refresh, and keeps the connection working after launch.

Elaichi

From the team behind Truto

Control plane for MCP servers

Put your team’s own apps to work in their AI. Connect an app once, and everyone’s AI can use it.

Works in

  • Each person’s AI gets exactly their access. Nothing more.
  • Share an app with your team, not a password.
  • Every call is checked and logged.

No credit card required · 1000+ apps

01Proxy API

Call the PostHog API directly. Every endpoint, through Truto.

Truto’s Proxy API is a 1-to-1 mapping of the PostHog API. You call us, we call PostHog, and pass the response back in the same cycle. Truto handles authentication and token refresh.

On every plan, including Free.

How the Proxy API works

Proxy APIPostHog

GEThttps://api.truto.one/proxy/?integrated_account_id=…

PostHog’s own response, passed back

02MCP server

PostHog tools for any AI agent. Any MCP client, or the agent you build.

Whatever your agent runs on, it gets PostHog tools for each customer’s account: through an MCP server, or straight from the tools API.

On every plan, including Free.

What an agent can doin PostHog
  • MeList
  • MembersList
  • ProjectsList, Attach comment, Attach subscription, Bulk update tags, List subscriptions, Selector match changes, Add product intents bulk update, Cohorts list activity, Complete product onboardings bulk update, Delete secret token backups bulk update, Reset tokens bulk update, Rotate heatmaps screenshot secrets bulk update, Rotate secret tokens bulk update
  • ActionsList, Get one, Create, Update, Delete, Partial update, Emails bulk update
  • AnnotationsList, Get one, Create, Update, Delete, Partial update
  • CohortsList, Get one, Create, Update, Delete, Partial update, Add persons to static cohorts bulk update, Remove person from static cohorts bulk update
  • DashboardsList, Get one, Create, Update, Delete, Partial update
  • Event definitionsList, Get one, Create, Update, Delete, Partial update
  • EventsList
  • GroupsList, Create, Types create detail dashboards bulk update, Types set default columns bulk update, Types update metadatas bulk update
  • InsightsList
  • PersonsList
  • Property definitionsList
  • SurveysList
  • Group typesList, Bulk delete
  • Session recordingsList
  • Me spendsList
  • Account custom property valuesList, Create
  • Account email threadsList, Get one
  • Account meetingsList
  • Account notebooksList, Get one, Create, Delete
  • Account presenceCreate
  • Account relationshipsList, Create, Delete
  • Account summariesList
  • Account support ticketsList, Get one
  • Account track rules previewCreate
  • Account track rules runsList, Create
  • Accounts by external idGet one
  • Accounts presence listsList
  • Action referencesList
  • Activate authorizeCreate
  • Advanced activity logs available filtersList
  • Advanced activity logs exportCreate
  • Advanced activity logs exports exportCreate
  • Aeo prompt checksList
  • Aeo prompt statsList
  • Aeo prompt versionsList
  • Aeo prompts bulk importCreate
  • Aeo prompts topicsList
  • Ai observability offline experimentsList, Get one, Create, Update, Complete

And 666 more. Open the tool names to see all.

Show tool names1,267 tools, for developers
  • list_all_post_hog_meGet the authenticated PostHog user's profile and settings via the @me shortcut. Returns the user record including its id and attributes defined by the upstream User schema. No required parameters.
  • list_all_post_hog_membersList members of a PostHog organization. Returns: id, user, level, joined_at, updated_at, is_2fa_enabled, has_social_auth, last_login, search_match_type. Required: organization_id.
  • list_all_post_hog_projectsList comments and tasks across a PostHog project, filterable by scope, item, kind, author, or search text. Returns comment records with id, content, kind, scope, created_by, and completion fields. Required: project_id.
  • post_hog_projects_attach_commentCreate a comment in a PostHog project. Returns the comment with id, content, scope, is_task, created_at, and created_by. Required: project_id. Identical support messages are deduplicated — the original comment is returned instead of a duplicate.
  • post_hog_projects_attach_subscriptionCreate a subscription in a PostHog project for recurring insight, dashboard, or AI report deliveries. Returns: id, resource_type, dashboard, insight, insight_short_id, resource_name, target_type, frequency, summary, next_delivery_date, and 22 more. Required: project_id, target_type, target_value, frequency, interval, start_date.
  • post_hog_projects_bulk_update_tagsBulk update tags on multiple PostHog objects. Returns: updated, skipped. Required: project_id, ids, action, tags.
  • post_hog_projects_list_subscriptionsList subscriptions in a PostHog project, filterable by insight, dashboard, resource type, delivery channel, creator, or search term. Returns: id, resource_type, target_type, frequency, summary, next_delivery_date. Required: project_id.
  • post_hog_projects_selector_match_changesList selector match changes for PostHog actions. Returns: action_id, action_name, selectors. Required: action_ids, project_id.
  • list_all_post_hog_actionsList PostHog actions in a project. Returns: id, name, description, tags, post_to_slack, steps, created_at, created_by. Required: project_id.
  • create_a_post_hog_actionCreate a PostHog action in a project. Returns the created action including its id, name, description, steps, created_at, and team_id. Required: project_id.
  • delete_a_post_hog_action_by_idDelete a PostHog action by id. PostHog does not allow hard deletes for this object, so this sends PATCH with deleted=true (a soft delete); the action no longer appears in lists afterwards. Required: id, project_id.
  • get_single_post_hog_action_by_idGet a single PostHog action by id. Returns the action including its id, name, description, steps, created_at, and team_id. Required: id, project_id.
  • post_hog_actions_partial_updatePartially update a PostHog action by id, modifying only the fields provided. Returns: id, name, description, tags, post_to_slack, slack_message_format, steps, created_at, created_by, deleted, is_calculating, last_calculated_at, team_id, is_action, bytecode_error, pinned_at, creation_context, and 2 more. Required: action_id, project_id.
  • update_a_post_hog_action_by_idUpdate a PostHog action by id, replacing its full definition. Returns: id, name, description, tags, post_to_slack, slack_message_format, steps, created_at, created_by, deleted, is_calculating, last_calculated_at, team_id, is_action, bytecode_error, pinned_at, creation_context, user_access_level, status. Required: id, project_id.
  • list_all_post_hog_annotationsList PostHog annotations for a project, covering dashboard and insight annotations. Returns: id, content, date_marker, creation_type, dashboard_item, dashboard_id, dashboard_name, insight_short_id, insight_name, insight_derived_name, created_by, created_at, updated_at, deleted, scope, emoji, hidden_in_user_interface. Required: project_id.
  • create_a_post_hog_annotationCreate a new annotation in a PostHog project. Returns the created annotation including id, content, date_marker, creation_type, dashboard_name, created_by, created_at, and updated_at. Required: project_id.
  • delete_a_post_hog_annotation_by_idDelete a PostHog annotation by id. PostHog does not allow hard deletes for this object, so this sends PATCH with deleted=true (a soft delete); the annotation no longer appears in lists afterwards. Required: id, project_id.
  • get_single_post_hog_annotation_by_idGet a single annotation by id in a PostHog project. Returns: id, content, date_marker, creation_type, dashboard_item, dashboard_id, dashboard_name, insight_short_id, insight_name, insight_derived_name, created_by, created_at, updated_at, deleted, scope, emoji, hidden_in_user_interface. Required: project_id, id.
  • post_hog_annotations_partial_updatePartially update an annotation in a PostHog project, changing only the fields provided. Returns: id, content, date_marker, creation_type, dashboard_item, dashboard_id, dashboard_name, insight_short_id, insight_name, insight_derived_name, created_by, created_at, updated_at, deleted, scope, emoji, and 1 more. Required: project_id, annotation_id.
  • update_a_post_hog_annotation_by_idUpdate an annotation by id in a PostHog project. Returns: id, content, date_marker, creation_type, dashboard_item, dashboard_id, dashboard_name, insight_short_id, insight_name, insight_derived_name, created_by, created_at, updated_at, deleted, scope, emoji, hidden_in_user_interface. Required: project_id, id.
  • list_all_post_hog_cohortsList the cohorts defined in a PostHog project. Returns: id, name, description, groups, deleted, filters, query, version, pending_version, is_calculating, created_by, created_at, last_calculation, last_backfill_person_properties_at, last_error_message, count, last_import_total_count, search_match_type, and 7 more. Required: project_id.
  • create_a_post_hog_cohortCreate a cohort in a PostHog project. Returns the cohort with id, name, filters, is_calculating, created_by, created_at, last_calculation, count, cohort_type, and realtime. Required: project_id.
  • delete_a_post_hog_cohort_by_idDelete a PostHog cohort by id. PostHog does not allow hard deletes for this object, so this sends PATCH with deleted=true (a soft delete); the cohort no longer appears in lists afterwards. Required: id, project_id.
  • get_single_post_hog_cohort_by_idGet a single PostHog cohort by id. Returns: id, name, description, groups, deleted, filters, query, version, pending_version, is_calculating, created_by, created_at, last_calculation, last_backfill_person_properties_at, errors_calculating, last_error_message, count, cohort_type, realtime, and 7 more. Required: id, project_id.
  • post_hog_cohorts_partial_updatePartially update a PostHog cohort, modifying only the fields supplied. Returns: id, name, description, groups, deleted, filters, query, is_calculating, created_by, created_at, last_calculation, last_backfill_person_properties_at, errors_calculating, last_error_message, count, cohort_type, realtime, and 9 more. Required: cohort_id, project_id.
  • update_a_post_hog_cohort_by_idUpdate a PostHog cohort by id. Returns the updated cohort with id, name, filters, is_calculating, and count. Required: id, project_id.
  • list_all_post_hog_dashboardsList dashboards in a PostHog project. Returns each dashboard with id, name, description, pinned, created_at, created_by, folder, and tags. Required: project_id.
  • create_a_post_hog_dashboardCreate a new dashboard in a PostHog project. Returns the created dashboard object including its id, name, pinned status, filters, tiles, and created_at. Required: project_id.
  • delete_a_post_hog_dashboard_by_idDelete a PostHog dashboard by id. PostHog does not allow hard deletes for this object, so this sends PATCH with deleted=true (a soft delete); the dashboard no longer appears in lists afterwards. Required: id, project_id.
  • get_single_post_hog_dashboard_by_idGet a single PostHog dashboard by id. Returns the dashboard object including its id, name, filters, tiles, and user_access_level. Required: project_id, id.
  • post_hog_dashboards_partial_updatePartially update a PostHog dashboard by dashboard_id, changing only the fields you send such as name, pinned, filters, or tiles. Returns the updated dashboard object including its id, name, pinned status, filters, and tiles. Required: project_id, dashboard_id.
  • update_a_post_hog_dashboard_by_idUpdate a PostHog dashboard by id, replacing its configuration. Returns the updated dashboard object including its id, name, pinned status, filters, tiles, and tags. Required: project_id, id.
  • list_all_post_hog_event_definitionsList event definitions of a PostHog project. Returns: id, name, description, tags, verified, last_seen_at, created_at, updated_at. Required: project_id. On projects with 50,000+ event definitions, counts cap at 10,000 unless search, exclude_stale, verified, names, tags, or event_type=event_posthog is set.
  • create_a_post_hog_event_definitionCreate a new event definition in a PostHog project. Returns the created definition with its id, name, description, tags, created_at, and verification metadata. Required: project_id, name.
  • delete_a_post_hog_event_definition_by_idDelete a PostHog event definition by its UUID id within a project. Returns an empty 204 response on success. Required: id, project_id.
  • get_single_post_hog_event_definition_by_idGet a single event definition in a PostHog project by id. Returns the full definition with its id, name, description, tags, last_seen_at, and calculation metadata. Required: project_id, id.
  • post_hog_event_definitions_partial_updatePartially update an event definition in a PostHog project, modifying only the fields you send. Returns the updated definition with its id, name, tags, and updated_at. Required: project_id, event_definition_id.
  • update_a_post_hog_event_definition_by_idFully update an event definition in a PostHog project by id. Returns the updated definition with its id, name, tags, verified, and updated_at. Required: project_id, id, name.
  • list_all_post_hog_eventsList and filter PostHog events captured in a project. Returns: id, event, distinct_id, properties, timestamp, person, elements, elements_chain. Required: project_id.
  • list_all_post_hog_groupsList all groups of a specific group type in a PostHog project. Returns: id, group_key, group_type_index, properties, created_at. Required: project_id, group_type_index. Pagination is forward-only by cursor; the previous page is always null.
  • create_a_post_hog_groupCreate a group in PostHog for group analytics. Returns: group_type_index, group_key, group_properties, created_at, status. Requires project_id, group_type_index, and group_key.
  • list_all_post_hog_insightsList insights in a PostHog project. Returns: id, short_id, name, query, result, created_at, tags, last_viewed_at. Required: project_id.
  • list_all_post_hog_personsList persons in a PostHog project. Returns each person's id, name, distinct_ids, properties, created_at, last_seen_at, uuid, and matched_fields. Required: project_id. Read-only through this endpoint; create or update persons via the capture API or SDKs instead.
  • list_all_post_hog_property_definitionsList PostHog property definitions for a project. Returns: id, name, property_type, is_numerical, verified, updated_at. Required: project_id.
  • list_all_post_hog_surveysList PostHog surveys configured for a project. Returns each survey with its id, name, type, questions, conditions, and created_at. Required: project_id.
  • list_all_post_hog_group_typesList the group types configured for a PostHog project. Returns each group type with its group_type_index, the value to pass as group_type_index when listing or filtering groups. Required: project_id.
  • post_hog_group_types_bulk_deleteDelete a group type from a PostHog project by its numeric index. Returns an empty 204 response on success. Required: project_id, group_type_index.
  • list_all_post_hog_session_recordingsList PostHog session recordings for a project. Returns: id, distinct_id, viewed, viewers, recording_duration, start_time, end_time, click_count, ongoing. Required: project_id.
  • list_all_post_hog_me_spendsGet a personal LLM spend analysis for the requesting user in PostHog. Returns: summary, by_product, by_tool, by_model, by_day, by_day_model, by_bucket, top_traces. Window defaults to the last 30 days, max 90; pass bucket_minutes (5/15/30/60) for a by_bucket series; refresh=true bypasses the 5-minute cache. Required: product.
  • create_a_post_hog_account_custom_property_valueCreate a custom property value for an account in PostHog. Returns: id, account_id, definition_id, value, created_at, created_by_id, PersonalAPIKeyAuth. Required: project_id, account_id, definition, value
  • list_all_post_hog_account_custom_property_valuesList custom property values configured on a PostHog account. Returns an array of custom property value records, each with id, created_at, and updated_at. Required: project_id, account_id.
  • get_single_post_hog_account_email_thread_by_idGet the email messages in a PostHog account email thread. Returns the thread's messages with their id, sent_at, sender, direction, and content. Required: project_id, account_id, id.
  • list_all_post_hog_account_email_threadsList email threads in a PostHog account. Returns: count, next, previous, results. Required: account_id, project_id.
  • list_all_post_hog_account_meetingsList meetings for a specific account in PostHog. Returns: id, title, start_time, end_time, organizer_email, status, participants. Required: account_id, project_id.
  • create_a_post_hog_account_notebookCreate a PostHog account notebook. Returns: id, short_id, title, content, text_content, created_at, created_by, last_modified_at, last_modified_by. Required: project_id, account_id.
  • delete_a_post_hog_account_notebook_by_idDelete a notebook belonging to a PostHog account by id. Returns an empty 204 response on success. Required: id, account_id, project_id, short_id.
  • get_single_post_hog_account_notebook_by_idGet a single PostHog account notebook by id. Returns: id, short_id, title, content, text_content, created_at, created_by, last_modified_at, last_modified_by. Required: id, account_id, project_id, short_id.
  • list_all_post_hog_account_notebooksList PostHog account notebooks for an account, newest first. Returns: id, short_id, title, content, text_content, created_at, created_by, last_modified_at, last_modified_by. Required: project_id, account_id.
  • create_a_post_hog_account_presenceReport the authenticated user's presence on a PostHog account. Returns the list of viewers currently on the account. Required: account_id, project_id, id.
  • create_a_post_hog_account_relationshipCreate a relationship on a PostHog account within a project. Returns: id, definition, user, started_at, ended_at, source. Required: project_id, account_id, definition, user.
  • delete_a_post_hog_account_relationship_by_idDelete an account relationship by id from a PostHog account. Returns an empty 204 response on success. Required: id, project_id, account_id.
  • list_all_post_hog_account_relationshipsList account relationships for a PostHog account; only active assignments are returned unless include_history is set. Returns: id, definition, user, started_at, ended_at, source. Required: project_id, account_id.
  • list_all_post_hog_account_summariesList PostHog account summaries for a specific account. Returns: id, slack_channel_id, cadence, period_start, period_end, content, message_count, messages, generated_at. Required: account_id, project_id.
  • get_single_post_hog_account_support_ticket_by_idList messages for a support ticket in PostHog. Returns each message with id, content, author_name, direction, is_private, and created_at. Required: project_id, account_id, id.
  • list_all_post_hog_account_support_ticketsList the support tickets associated with a PostHog customer analytics account. Returns ticket records including id, created_at, and updated_at. Required: account_id, project_id.
  • create_a_post_hog_account_track_rules_previewPreview how account track rules would affect event tracking in PostHog without applying them. Returns: config_version, eligible_active, skipped_churned, tracked, ignored, newly_ignored, restored, tracked_samples, ignored_samples, validation_errors, PersonalAPIKeyAuth. Required: project_id, schema_version, version, enabled, groups.
  • create_a_post_hog_account_track_rules_runTrigger a run of account track rules in a PostHog project. Returns the created run with id, config_version, trigger, status, and tracking counts (tracked, ignored, restored). Requires project_id, idempotency_key, and confirmed. Required: project_id, idempotency_key, confirmed.
  • list_all_post_hog_account_track_rules_runsList account track rule runs in a PostHog project. Returns each run's id, config_version, trigger, status, and tracking counts (tracked, ignored, restored). Required: project_id.
  • get_single_post_hog_accounts_by_external_id_by_idGet a PostHog account by its exact external_id within a project. Returns: id, name, external_id, properties, tags, notebooks, slack_summary_cadence, churned_at, ignored_at, created_at, created_by, updated_at. Required: id, external_id. Leading and trailing whitespace in external_id is significant.
  • list_all_post_hog_accounts_presence_listsList presence information for accounts in a PostHog project. Returns: account_id, viewers. Required: project_id, account_ids.
  • post_hog_action_emails_bulk_updatePartially update the email configuration of a Hog Flow action in PostHog by submitting bulk operations. Returns the updated Hog Flow including id, name, status, version, trigger, and actions. Required: project_id, hog_flow_id, action_id.
  • list_all_post_hog_action_referencesList references for a specific PostHog action within a project. Returns an array of references with type, id, name, url, created_at, and created_by. Required: action_id, project_id, id.
  • create_a_post_hog_activate_authorizeCreate a billing authorization for a PostHog organization. Returns: clientSecret, success. Required: organization_id.
  • list_all_post_hog_advanced_activity_logs_available_filtersList the pre-computed filter options for advanced activity logs in a PostHog project. Returns static_filters (the users, activity scopes, activity types, and API clients observed in the logs) and detail_fields (discovered detail fields with their value distributions). Required: project_id.
  • advanced_activity_logs_available_filters_advanced_activity_logs_List the pre-computed filters available for PostHog advanced activity logs across every project in an organization. Returns: static_filters, detail_fields, github_login. Required: organization_id.
  • create_a_post_hog_advanced_activity_logs_exportExport advanced activity logs for a PostHog project. Returns the created export record including its id, user, scope, activity, and created_at. Required: project_id, user, activity, and scope.
  • create_a_post_hog_advanced_activity_logs_exports_exportCreate an export of advanced activity logs across every project in a PostHog organization. Returns: id, user, unread, team_id, organization_id, was_impersonated, is_system, client, ip_address, activity, item_id, scope, detail, created_at, status. Required: organization_id, user, activity, scope.
  • list_all_post_hog_aeo_prompt_checksList the checks for a PostHog AEO prompt, newest first. Each check includes the engine, answer_text, cited_urls, search_queries, target_urls, and the prompt_version it ran on. Required: project_id, aeo_prompt_id.
  • list_all_post_hog_aeo_prompt_statsGet citation and brand-mention stats for a PostHog AEO prompt, with per-day counts for the last 30 days. Returns: engines, daily, consensus, sentiment, top_words, total_checks, brand_names, daily_from, daily_to. Required: project_id, aeo_prompt_id.
  • list_all_post_hog_aeo_prompt_versionsList all versions of a PostHog AEO prompt's text, newest first; a text edit adds a version and one is current. Returns: created_by, version, text, version_description, created_at, is_current. Required: project_id, aeo_prompt_id.
  • create_a_post_hog_aeo_prompts_bulk_importBulk import AEO prompts into a PostHog project, adding new prompts or updating the topic and visibility of existing ones; prompts whose text matches an archived prompt are skipped. Returns: created, updated, skipped. Required: project_id, prompts.
  • list_all_post_hog_aeo_prompts_topicsList the AEO prompt topics in a PostHog project, with the number of prompts in each; each item pairs a topic name (empty for prompts that have no topic) with its prompt count. Returns: topic, prompts, PersonalAPIKeyAuth. Required: project_id.
  • get_ai_observability_instrumentation_checklist_by_idGrade every AI observability instrumentation check for a PostHog project. Returns: window_days, checks, PersonalAPIKeyAuth. Required: id.
  • post_hog_ai_observability_offline_experiments_completeComplete an offline experiment in PostHog AI observability, marking it as finished for evaluation. Returns a receipt (ExperimentReceipt) with the resulting status. Required: offline_experiment_id, project_id, id.
  • create_a_post_hog_ai_observability_offline_experimentCreate an offline AI observability experiment in a PostHog project. Returns the receipt with id, status, created, started_at, and accepted item/result counts. Required: project_id, id, name, started_at.
  • get_single_post_hog_ai_observability_offline_experiment_by_idGet an offline AI observability experiment by id in a PostHog project. Returns the full experiment with id, name, status, run_source, counts, suite_key, dataset fields, tags, and created_by. Required: id, project_id.
  • list_all_post_hog_ai_observability_offline_experimentsList offline AI observability experiments in a PostHog project, filterable by status, dataset, suite, tags, model or prompt version, and name search. Returns: count, next_cursor, results, PersonalAPIKeyAuth. Required: project_id.
  • update_a_post_hog_ai_observability_offline_experiment_by_idPartially update an offline AI observability experiment in a PostHog project, e.g. its tags. Returns the updated experiment with id, name, status, tags, counts, and dataset fields. Required: project_id, id.
  • get_single_post_hog_ai_observability_trace_by_idGet a PostHog AI observability trace by id, rendered as a step tree with roll-ups, timeline, totals, and person, without inputs or outputs. Returns: id, name, createdAt, sessionId, person, totals, hasError, errorCount, tree, timeline, totalMs, threadNodeIds, defaultNodeId, nodeIdsByAlias, git, PersonalAPIKeyAuth. Required: id, project_id.
  • post_hog_ai_observability_traces_searchFind text in the steps of a PostHog AI observability trace, ignoring case. Returns: total, matches, PersonalAPIKeyAuth. Required: project_id, trace_id, q. Max query length 200.
  • create_a_post_hog_alert_destinationCreate a destination for a PostHog alert to send it to a Slack channel as well as by email. Returns: hog_function_ids. The Slack workspace must already be connected to the project. Required: alert_id, project_id, slack_workspace_id, slack_channel_id.
  • create_a_post_hog_alert_destinations_alertCreate a notification destination for a PostHog alert, atomically creating one HogFunction per alert event kind (firing, resolved, ...); PagerDuty destinations use incident opened/closed kinds instead. Returns: hog_function_ids. Required: alert_id, project_id, type.
  • create_a_post_hog_alert_test_deliveryTrigger a test delivery for a PostHog alert: sends a synthetic test notification to subscribed users and every active destination on the alert, accepted for asynchronous processing. Returns: destination_count, email_recipient_count, failed_delivery_channels. Required: alert_id, project_id.
  • create_a_post_hog_alerts_simulateSimulate a detector on an insight's historical data in PostHog without creating any AlertCheck records. Returns: status, PersonalAPIKeyAuth. Requires project_id and a request body (AlertSimulate). Required: project_id, insight.
  • create_a_post_hog_alerts_simulates_simulateSimulate a PostHog logs alert on historical data using the full state machine. Returns: buckets, fire_count, resolve_count, total_buckets, threshold_count, threshold_operator, status. Required: project_id, filters, threshold_count, threshold_operator, window_minutes, date_from. No alert check records are created.
  • list_all_post_hog_announcements_channelsList Slack channels the PostHog SupportHog bot can post to, labeled by customer account name. Returns: id, name, is_member, customer_name. Required: project_id.
  • list_all_post_hog_apm_endpointsList PostHog APM endpoint health, one row per service and entry span name ordered worst first. Returns: results, environment, service, date_from, date_to. Required: project_id.
  • list_all_post_hog_apm_service_mapsList service-to-service call edges in a PostHog project's APM service map for an environment and time window. Returns: edges, trace_count, environment, date_from, date_to. Required: project_id.
  • list_all_post_hog_apm_servicesList PostHog APM service health, one row per service in an environment and time window, ordered worst first. Returns: results, environments, environment, date_from, date_to. Required: project_id.
  • create_a_post_hog_artifacts_deleteDelete an artifact bundle file from a PostHog autoresearch training run by path. Removal is idempotent and the bundle is frozen once the run completes or fails. Returns: path, deleted. Required: training_run_id, pipeline_id, project_id, path.
  • create_a_post_hog_artifacts_getFetch a single file from a PostHog training run's artifact bundle, base64-encoded. Returns: path, size_bytes, sha256, content_base64. Required: training_run_id, pipeline_id, project_id, path.
  • create_a_post_hog_artifacts_uploadUpload one artifact bundle file to a PostHog autoresearch training run (file contents sent base64-encoded in content_base64). Returns: path, size_bytes, sha256. Re-uploading the same path overwrites it; the bundle is frozen once the run completes or fails. Required: training_run_id, pipeline_id, project_id, path, content_base64.
  • get_single_post_hog_assets_content_by_idGet the rendered HTML content of an email sent by a PostHog hog flow (workflow). Returns the email body as a raw text/html string rather than a JSON object. Required: id, invocation_id, project_id.
  • post_hog_assignment_rules_reorders_bulk_updateReorder error tracking assignment rules in a PostHog project. Returns an empty 204 response on success. Required: project_id.
  • create_a_post_hog_authorize_statusCheck the authorization status of a PostHog billing activation. Returns: status, error, success. Required: organization_id.
  • list_all_post_hog_autoresearch_agent_modelsList the training agent models a PostHog pipeline's agent may run on, with supported reasoning efforts, relative token cost, and the defaults used when pipeline settings are blank. Returns: default_model, default_model_label, default_reasoning_effort, models. Required: project_id.
  • create_a_post_hog_autoresearch_resolve_templateResolve a PostHog autoresearch template key (with optional overrides) into a concrete pipeline config. Returns: template_key, display_name, description, suggested_name, resolved_activity_event, horizon_days, training_population, and 6 more. Required: project_id, template_key.
  • list_all_post_hog_autoresearch_templatesList all built-in PostHog autoresearch prediction templates. Returns: key, display_name, description, default_horizon_days, requires_user_event, requires_activity_resolution, notes. Required: project_id.
  • create_a_post_hog_autoresearch_validateValidate a proposed PostHog autoresearch pipeline's target event and population before creating it. Returns: can_proceed, requires_acknowledgement, estimated_training_rows, base_rate, warnings, error, and 4 more. Required: project_id. Call this before creating the pipeline; an 'error' result means a run would fail or the data is too thin.
  • create_a_post_hog_backfills_estimateEstimate a PostHog evaluation backfill by counting what a backfill over the given window would evaluate, without creating one. Returns: total_units, already_evaluated_units, unit, window_start, window_end, PersonalAPIKeyAuth. Requires evaluation_id, project_id, window_start, and window_end.
  • create_a_post_hog_backfills_estimates_estimateEstimate a PostHog scanner backfill: enumerates exactly what a backfill over the given window would dispatch and its cost. Returns: total_sessions, total_credits, credits_per_observation, credits_remaining, and 2 more fields. Required: project_id, scanner_id, window_start, window_end. Requires project_id, scanner_id, window_start, and window_end.
  • post_hog_batch_export_backfills_cancelCancel a batch export backfill in PostHog, identified by its UUID. Returns: status, PersonalAPIKeyAuth. Required: batch_export_id, backfill_id, project_id, status, team, batch_export.
  • create_a_post_hog_batch_export_backfillCreate a new backfill for a PostHog batch export. Returns the created backfill including id, progress, status, start_at, and created_at. Required: batch_export_id, project_id, status, team, batch_export.
  • get_single_post_hog_batch_export_backfill_by_idGet a single PostHog batch export backfill by id. Returns the backfill including id, progress, status, start_at, and created_at. Required: project_id, batch_export_id, and id. Backfills cannot be updated or deleted.
  • list_all_post_hog_batch_export_backfillsList PostHog batch export backfills for a batch export. Returns each backfill including id, progress, status, start_at, and created_at. Required: project_id and batch_export_id. Backfills cannot be updated or deleted.
  • list_all_post_hog_batch_export_logsList log entries for a batch export in PostHog, filtered by time window, execution instance, log level, or message search. Returns: status. Defaults to the last 7 days of logs; up to 500 entries per page. Required: batch_export_id, project_id.
  • create_a_post_hog_batch_export_run_test_stepRun a test step for a batch export in PostHog to execute a single export step. Returns: status, PersonalAPIKeyAuth. Required: batch_export_id, project_id, name, destination, interval.
  • post_hog_batch_export_runs_cancelCancel a batch export run in PostHog. Returns an empty 200 response with no response body on success. Required: batch_export_id, run_id, project_id, id, data_interval_end, status.
  • get_single_post_hog_batch_export_run_by_idGet a single PostHog batch export run by id. Returns the run's id, status, records_completed, records_failed, data_interval_start, data_interval_end, and created_at. Required: project_id, batch_export_id, id.
  • list_all_post_hog_batch_export_runsList PostHog batch export runs for a batch export. Returns: id, status, data_interval_start, data_interval_end, records_completed, records_failed, latest_error, cursor, created_at, and finished_at. Required: project_id, batch_export_id. Defaults to the last 7 days of runs unless after/before are set.

And 1,147 more. Filter to find one.

AMCP serverno code

For any MCP client

One URL per connected PostHog account. Paste it into Claude, ChatGPT, Cursor, Windsurf, VS Code, Cline, Zed or a custom agent.

Server URLhttps://api.truto.one/mcp/<token>

BTools APIfor developers

For the agent you build

One call returns every PostHog tool for an account, with its description and JSON schema, ready for any LLM framework.

GEThttps://api.truto.one/integrated-account/<id>/tools

Tools come as JSON schema, so they plug into any agent framework.

  • Always up to date

    Tools are generated from curated documentation, not hand-coded. As the integration changes, the tools stay current.

  • You set the limits

    Scope each MCP server to read-only, write-only, specific methods or tagged tool groups. Expose only what the agent needs.

  • One customer each

    Each MCP server is scoped to one connected account with its own credentials. Nothing leaks across tenants.

  • Tools you can edit

    Tool descriptions and schemas are editable in your Truto account. A change updates at once, with no deploy.

  • Sign-in handled

    Tool calls run through Truto’s proxy layer, with OAuth refresh, rate-limit handling and normalized errors.

  • Access can expire

    Create time-limited servers for contractors or automated workflows. Optionally require a Truto API token as well.

How MCP servers work

03Unified API

PostHog is in the Unified User Directory API. One call for every User Directory app.

Ask for organizations or users the same way for PostHog and every other User Directory app. Truto makes PostHog’s own call and returns the same data shape.

Add-on: $499 per category a month. 30-day trial on Free.

PostHog is mappedSame call, same data shapeStart free

Unified User Directory API2 resources

04Sync and webhooks

Sync PostHog data on a schedule. Sent to your webhook.

A sync job reads PostHog records on a schedule and sends each page to your webhook or your datastore. Signed webhooks tell you when an account connects or needs to sign in again.

On every plan, including Free.

05Custom actions

Add any PostHog endpoint. With the Truto CLI.

Need a PostHog endpoint or method that is not here yet? Add it with the Truto CLI and your coding agent, or call any PostHog path through the Custom API.

On every plan, including Free. Truto CLI

For your own AI tools

Use PostHog in ChatGPT, Claude or Cursor with Elaichi.

Truto puts PostHog in the product you build. To use PostHog yourself, in the AI your team already has, we recommend Elaichi.

For your product

Ship PostHog tools in your product

Give the AI in your product access to each customer’s own PostHog account, with one MCP server per connected account.

Start free with PostHog

Rather talk it through? Book a demo

Elaichi

For your own team

Use PostHog in your own AI

Connect your company’s PostHog once, then ask in the AI you already use, with exactly your own access.

Works in

PostHog on Elaichi

From the team behind Truto · 14-day free trial

Use cases

Why integrate with PostHog.

  1. Sync PostHog persons and groups into your product's user directory

    If you're building a CRM, customer success platform, or revenue tool, you can pull PostHog's Persons (users) and Groups (organizations) into your product so your customers see real account structures alongside product usage context — without building a custom PostHog integration from scratch.

  2. Enrich support workflows with PostHog user context

    Helpdesk and support platforms can map their user records to PostHog Persons, giving agents instant visibility into who the user is, which organization they belong to, and their associated properties — all surfaced natively in the support UI.

  3. Power account-level health scoring with organization data

    Customer success and revenue intelligence platforms can pull PostHog Group (organization) data to build product health scores, identify at-risk accounts, and give account executives real context about how a company is using the product.

  4. Build AI-powered copilots with user and org awareness

    AI agent platforms and copilot products can query PostHog user and organization data to ground their responses in real context — knowing who the user is, what organization they belong to, and their properties before generating recommendations or troubleshooting steps.

  5. Automate user and organization provisioning across tools

    Workflow automation and iPaaS products can sync PostHog's user and organization directory with other systems, ensuring that when a new person or group appears in PostHog, downstream tools stay in sync without manual intervention.

What you can build

Ship these with Truto and PostHog.

  • Account directory sync from PostHog Groups

    Automatically import PostHog Groups (organizations) into your platform so customers see their real account hierarchy without manual CSV uploads.

  • User identity resolution panel

    Surface PostHog Person properties — like email, name, and custom traits — directly inside your product's user detail view, giving your customers a unified profile.

  • Organization-aware feature gating

    Pull PostHog Group properties (e.g., subscription tier, plan type) into your platform to drive access controls, entitlements, or tiered feature visibility for end users.

  • Cross-platform user directory search

    Let your customers search and browse PostHog Persons and Groups alongside users from other connected tools using Truto's Unified User Directory API.

  • Account context cards for sales and support

    Display a compact PostHog organization card — showing group properties and associated users — inside CRM deal views or support ticket sidebars.

Security

Your customers’ PostHog data stays theirs. Truto passes it through.

  • Records pass through

    Customer records are not kept. Truto fetches them when your product asks and passes them on.

  • Our OAuth apps or yours

    Where an app signs in with OAuth, use Truto’s OAuth apps or your own, on every plan. Each customer’s login is kept encrypted (AES-256) while connected.

  • SOC 2 · TYPE IIAUDITEDISO/IEC 27001CERTIFIEDGDPRHIPAACASA · TIER 2TAC SECURITY

    Audited and certified

    SOC 2 Type II, ISO 27001, GDPR and HIPAA. CASA Tier 2, verified by TAC Security. Trust Centre

How it works

From zero to integrated. Start free, no card.

  1. Link your customer’s PostHog account

    Use Truto’s frontend SDK to connect your customer’s PostHog account. We handle all OAuth and API key flows — you don’t need to create the OAuth app.

  2. We handle authentication

    Don’t spend time refreshing access tokens or figuring out secure storage. We handle it and inject credentials into every API request.

  3. Call our API, we call PostHog

    Truto’s Proxy API is a 1-to-1 mapping of the PostHog API. You call us, we call PostHog, and pass the response back in the same cycle.

  4. Unified response format

    Every response follows a single format across all integrations. We translate PostHog’s pagination into unified cursor-based pagination. Data is always in the result attribute.

FAQs

Common questions about PostHog on Truto.

What Truto Unified APIs are available for PostHog?

PostHog is supported through Truto's Unified User Directory API, which provides standardized access to Organizations (mapped from PostHog Groups) and Users (mapped from PostHog Persons). Additional tools and API resources can be built on request.

How does authentication work for PostHog integrations via Truto?

PostHog's API uses personal API keys or project API keys for authentication. Truto handles credential storage and auth management so your end users can connect their PostHog accounts securely without you building a custom auth flow.

Does PostHog have rate limits that affect integration performance?

Yes, PostHog enforces rate limits on its API endpoints. Truto manages pagination and request throttling automatically, so your integration handles large datasets without hitting limits or requiring manual retry logic.

Can I access custom properties on PostHog Persons and Groups?

PostHog allows arbitrary custom properties on both Persons and Groups. Truto's Unified User Directory API maps standard fields, and custom properties can be accessed as additional data. If you need specific custom field mappings, Truto can build tailored support on request.

What if I need PostHog data beyond users and organizations — like events, session replays, or feature flags?

Currently, the Unified User Directory API covers Organizations and Users. PostHog's API also exposes events, session recordings, feature flags, insights, and more. Truto can build custom tools for these endpoints on request to match your specific integration needs.

Does Truto support both PostHog Cloud and self-hosted instances?

PostHog can be deployed as a cloud service (us.posthog.com / eu.posthog.com) or self-hosted. Truto can be configured to point at your end users' specific PostHog instance URL, supporting both deployment models.

PostHog

Get PostHog integrated into your app

Sign up free, connect a test PostHog account and make your first call today. No card and no sales call.