- Log in to your Beehiiv account at app.beehiiv.com
- Click your workspace name in the top-left corner
- Go to Settings (gear icon)
- In the left sidebar, click Integrations
- Click API under the Integrations section
- Click Generate API Key if you don't have one yet
- Copy the key — it starts with
bh_api_...
Add it to your .env file:
BEEHIIV_API_KEY=bh_api_xxxxxxxx
- In Beehiiv Settings, go to Publication in the left sidebar
- Scroll to the Publication Details section
- Your Publication ID is displayed — it starts with
pub_...
Add it to your .env file:
BEEHIIV_PUBLICATION_ID=pub_xxxxxxxxxxxxxxxx
The API key needs read access to Subscriptions and Posts. A newly generated Beehiiv API key has read access to all resources by default — no additional configuration is needed.