PostHog API logo

Analytics integration

Connect StefanBrain to PostHog API

Connect PostHog to StefanBrain with a personal API key. Read your insights, dashboards, events, and experiments in a chat.

API keyWorks in every chatPer-tool permissions

What connecting PostHog API unlocks

Insights and dashboards in chat

Ask for your saved insights and dashboards, or a funnel or retention view, without opening PostHog.

HogQL queries

Ask a question StefanBrain answers with a HogQL query over your events. Queries ask you first, since they can read people's details.

Experiments, flags, and surveys

Check experiment results, feature flags, and survey statistics from the same chat.

A key you control

Pick the scopes when you create the key. Read scopes are enough for reports, and you can delete the key in PostHog at any time.

How to connect

1Create a personal API key in PostHog

In PostHog, open Account settings, then Personal API keys, and create a key. Choose read scopes for reports, and copy the key.

2Open Connectors and choose PostHog API

In StefanBrain, open Connectors, find PostHog API, and click Connect.

3Paste the key and your region

A secure hosted credential page opens. Paste the key, and enter us for US Cloud or eu for EU Cloud as the Sub Domain.

4Ask your first question

Try asking for your dashboards, or how last week's signups compare with the week before.

Good to know

  • Use a personal API key, which starts with phx_. The project key that starts with phc_ only sends events.
  • Reads of persons, session recordings, raw events, survey responses, support conversations, and HogQL queries ask you first.
  • Most changes ask you first. 81 tools start switched off: deletes, role, invite, and access changes, and live sends such as destinations and workflow emails.
  • If you would rather sign in than paste a key, use the PostHog card instead.

Your credentials stay yours

  • We never store your passwords
  • Encrypted at rest and in transit
  • Disconnect anytime

Frequently asked questions

Which scopes should the key have?

Read scopes cover reports. Add write scopes only for what you want StefanBrain to change, such as insights or dashboards. Most changes still ask you first, and some start switched off.

What is the Sub Domain field?

It tells the connection which PostHog Cloud region holds your account. Enter us for US Cloud or eu for EU Cloud.

How is this different from the PostHog card?

The PostHog card signs in with your PostHog login and needs no key. This card uses a personal API key you create and can delete in PostHog.

How do I disconnect?

Open Connectors in StefanBrain, choose the PostHog API card, and disconnect it. You can also delete the key in PostHog.

More integrations

Put your PostHog API data to work

Connect once and every StefanBrain surface can use it: chat, creative, copy review, and analysis.

Built for brands serious about growth.