beehiiv

beehiiv

Sync PostHog persons to beehiiv as subscribers

Configuration

OptionDescription
API key
Type: string
Required: True

Create an API key in beehiiv under Settings > Workspace Settings > API. The key must have access to the selected publication.

Publication ID
Type: string
Required: True

The beehiiv publication ID, beginning with pub_.

Email
Type: string
Required: True

Email address used to find, create, or update the beehiiv subscription.

Custom field mapping
Type: dictionary
Required: False

Map existing beehiiv custom field names to PostHog values. Unknown beehiiv custom fields are ignored by the beehiiv API.

Send welcome email
Type: boolean
Required: False

Send the publication welcome email when a new subscription is created.

Reactivate existing subscription
Type: boolean
Required: False

Reactivate a previously unsubscribed subscriber. Enable this only when the person has knowingly requested to resubscribe.

UTM source
Type: string
Required: False

Acquisition source applied when a subscription is first created.

UTM medium
Type: string
Required: False

Acquisition medium applied when a subscription is first created.

UTM campaign
Type: string
Required: False

Acquisition campaign applied when a subscription is first created.

UTM term
Type: string
Required: False

Acquisition term applied when a subscription is first created.

UTM content
Type: string
Required: False

Acquisition content applied when a subscription is first created.

Referring site
Type: string
Required: False

Referring URL applied when a subscription is first created.

Using our REST API you can create this destination like so:

Terminal
# Create a new destination
curl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \
--data '{
"type": "destination",
"name": "beehiiv",
"inputs": {
"apiKey": {
"value": ""
},
"publicationId": {
"value": ""
},
"email": {
"value": ""
}
},
"enabled": true,
"template_id": "template-beehiiv"
}'