Skip to main content
Admin access to your PostHog account is required to generate a personal API key.

Identify your data region

Your data region determines the base URL for API requests. You can identify your region from your browser’s address bar when logged in to PostHog.

  • US Region: https://us.posthog.com/...
  • EU Region: https://eu.posthog.com/...

Generate a personal API key

A personal API key authenticates requests to PostHog.

1

Sign in to PostHog

Sign in to your PostHog account:

2

Navigate to Personal API keys

In PostHog, click Settings at the bottom of the left sidebar. Alternatively, if you are directed to the onboarding page, click the Default project dropdown in the top-right corner, then click the gear icon next to the default project name. On the Settings page, scroll down the left panel and select Personal API keys under the Account section.

3

Create a new API key

On the Personal API keys page, create a new key.

  • Click Create personal API key.
  • Enter a descriptive label (e.g., StackOne Integration).
4

Organization & project access

Select either All access or Organizations to grant the required access level. Do not select Projects only, as this will cause the connection to fail.

  • All access (recommended): All organizations and projects your account has access to.
  • Organizations: Select specific organizations to give access to.
  • Projects: Not supported — selecting this option alone will result in a connection failure.
5

Select API scopes

Enables actions: Cancel A Query, Change Organization, Create A Warehouse Saved Query, Create A Warehouse Table, Create A Warehouse View Link, Create Actions, Create An Insight Variable, Create Dashboards, Create Feature Flags, Create Groups Types Metrics, Create Insights, Create Organizations, Create Projects, Create Role, Create Role Membership, Delete A Session Recording, Delete A Warehouse Saved Query, Delete A Warehouse Table, Delete A Warehouse View Link, Delete An Action, Delete An Insight, Delete An Insight Variable, Delete Groups Types, Delete Groups Types Metrics, Delete Members, Delete Organizations, Delete Projects, Delete Role, Delete Role Membership, Delete Users, Get Unified Organization, Get Unified User, List All Actions, List All Activity Log, List All Alerts, List All Dashboards, List All Feature Flags, List All Groups Types, List All Groups Types Metrics, List All Insights, List All Integrations, List All Members, List All Role Memberships, List All Roles, List All Session Recordings, List All Users, List Event Definitions, List Insight Variables, List Property Definitions, List Unified Organizations, List Unified Resource Users, List Unified Users, List Warehouse Saved Queries, List Warehouse Tables, List Warehouse View Links, Retrieve A Dashboard, Retrieve A Feature Flag, Retrieve A Project, Retrieve A Property Definition, Retrieve A Query Status, Retrieve A Session Recording, Retrieve A Warehouse Saved Query, Retrieve A Warehouse Table, Retrieve A Warehouse View Link, Retrieve An Action, Retrieve An Event Definition, Retrieve An Insight, Retrieve An Insight Variable, Retrieve An Organization, Retrieve An Organization Project, Retrieve Groups Types Metrics, Retrieve List, Retrieve Organizations, Retrieve Role, Retrieve Role Membership, Retrieve Users, Run A Query, Update A Dashboard, Update A Feature Flag, Update A Session Recording, Update A Warehouse Saved Query, Update A Warehouse Table, Update An Action, Update An Insight, Update An Insight Variable, Update Complete Product Onboarding, Update Groups Types Metrics, Update Groups Types Update Metadata, Update Members, Update Partial Organization, Update Partial Organization Project, Update Role, Update Users

Use the Select preset dropdown to choose All access, or configure individual scopes based on your use case:

6

Copy the API key

After creation, copy your new API key and store it securely for use later.

  • Format: phx_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Note: The key is shown only once; keep it in a secure location.

Find your project token

The project token is required for event capture actions. This field is optional if you do not need capture functionality.

1

Locate Project Token

Navigate to Settings > Project > General.

  • Copy the Project Token value and store it securely for use later.
  • Format: phc_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
1

Connect

  • Click Connect.
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup.
2

Use Actions

Connect an AI platform to the linked account’s actions. See AI Platforms.Other ways to call actions are listed in Protocols & SDKs.

Next Steps

Webhooks setup

Configure receiving Events for PostHog into StackOne.