Project secret API keys are server-to-server credentials scoped to a single project. They're the right choice when a backend service needs scoped, project-level access without being tied to anyone's user account.
Unlike a personal API key, a project secret API key doesn't represent a user—it isn't affected when a teammate leaves, and it only has the scopes you grant it.
Today, they're supported on a growing set of scopes:
- Feature flag local evaluation and remote config (
feature_flag:readscope) - Endpoints execution (
endpoint:readscope) - Support external tickets API reads (
support_ticket:readscope)
Project secret API keys replace the legacy feature flags secure API key. If you're currently using one, we'll migrate it to a project secret API key without impacting your application.
How to obtain a project secret API key
- Go to the Project secret API keys section in your project settings.
- Click Create project secret API key.
- Give your key a label to describe its purpose.
- Choose the scopes for your key. We recommend selecting only the scopes the service really needs. This is a security best practice.
- Immediately copy the key's value, as you'll never see it again after refreshing the page.
How to authenticate using the project secret API key
Pass the key in the Authorization header using Bearer authentication:
PostHog detects the kind of key you sent from its phs_ prefix and authenticates accordingly.











