# Beehiiv — Pipedream Connect

> Create, monetize, grow—a newsletter platform built by newsletter people.

- API slug: `beehiiv` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Marketing
- Website: https://www.beehiiv.com/
- This page (HTML): https://pipedream.com/apps/beehiiv
- Tools: 12 actions · 0 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: beehiiv`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "beehiiv",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Add Subscriber:
const result = await mcp.callTool({
  name: "beehiiv-add-subscriber",
  arguments: {
    publicationId: "Publication ID",
    email: "Email",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Beehiiv endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.beehiiv.com/v2/publications

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuYmVlaGlpdi5jb20vdjIvcHVibGljYXRpb25z?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "beehiiv-add-subscriber",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    beehiiv: { authProvisionId: "apn_xxxxxxx" },
    publicationId: "Publication ID",
    email: "Email",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (12)

### `beehiiv-add-subscriber` — Add Subscriber (Write)

Create a new subscriber for a publication. Use List Custom Fields to discover available custom field names before passing customFields. Use Get Publication Info to get the publication ID. Set reactivateExisting: true to re-subscribe someone who previously unsubscribed. See the documentation

Full schema: https://pipedream.com/apps/beehiiv/actions/add-subscriber.md

### `beehiiv-create-post` — Create Post (Write)

Create a new post (newsletter draft). Pass HTML content in the content parameter. The post is created as a draft by default — set status: "confirmed" to publish immediately. Use content tags to categorize the post. Use Get Publication Info to get the publication ID. See the documentation

Full schema: https://pipedream.com/apps/beehiiv/actions/create-post.md

### `beehiiv-create-subscriber` — Create Subscriber (Write)

Create a new subscriber. See docs

Full schema: https://pipedream.com/apps/beehiiv/actions/create-subscriber.md

### `beehiiv-get-post-analytics` — Get Post Analytics (Read-only)

Get aggregated analytics across all posts — open rates, click rates, unsubscribes, etc. Filter by audience (free/premium), platform (web/email), or content tags. Returns metrics: recipients, delivered, opens, unique_opens, open_rate, clicks, unique_clicks, click_rate, unsubscribes, spam_reports…

Full schema: https://pipedream.com/apps/beehiiv/actions/get-post-analytics.md

### `beehiiv-get-publication-info` — Get Publication Info (Read-only)

Get details about the current beehiiv publication, including name, URL, and subscriber stats. Call this first to get the publicationId needed by all other tools. If you have multiple publications, pass the publicationId — otherwise the first publication is returned. Returns the publication name…

Full schema: https://pipedream.com/apps/beehiiv/actions/get-publication-info.md

### `beehiiv-get-subscriber` — Get Subscriber (Read-only)

Get full details for a single subscriber by ID or email. Use expand to include stats (open/click rates), custom field values, or referral data. Either subscriptionId or email must be provided. Use Search Subscribers to find subscriber IDs. Use Get Publication Info to get the publication ID. See the…

Full schema: https://pipedream.com/apps/beehiiv/actions/get-subscriber.md

### `beehiiv-list-all-publications` — List All Publications (Read-only)

Get a list of all your publications. See docs

Full schema: https://pipedream.com/apps/beehiiv/actions/list-all-publications.md

### `beehiiv-list-custom-fields` — List Custom Fields (Read-only)

Schema discovery — list all custom fields defined for subscribers in a publication. Use this before Create Subscriber or Update Subscriber to know what custom fields are available and their expected types. Use Get Publication Info to get the publication ID. See the documentation

Full schema: https://pipedream.com/apps/beehiiv/actions/list-custom-fields.md

### `beehiiv-list-posts` — List Posts (Read-only)

List posts (newsletter issues) for a publication. Filter by status, audience, platform, or content tags. Returns post titles, dates, status, and URLs. Use Get Publication Info to get the publication ID. Use Get Post Analytics for aggregate performance metrics across posts. See the documentation

Full schema: https://pipedream.com/apps/beehiiv/actions/list-posts.md

### `beehiiv-list-segments` — List Segments (Read-only)

List subscriber segments for a publication. Segments are pre-defined subscriber groups (dynamic rules, static lists, or manual selections). Use this for discovery — to understand how subscribers are organized. Use Get Publication Info to get the publication ID. See the documentation

Full schema: https://pipedream.com/apps/beehiiv/actions/list-segments.md

### `beehiiv-search-subscribers` — Search Subscribers (Read-only)

Search and filter subscribers for a publication. Use email for exact email lookup, or combine status and tier filters to narrow results. Use Get Publication Info to get the publication ID. For full details on a single subscriber (with stats, custom fields, referrals), use Get Subscriber instead…

Full schema: https://pipedream.com/apps/beehiiv/actions/search-subscribers.md

### `beehiiv-update-subscriber` — Update Subscriber (Write)

Update an existing subscriber's fields or unsubscribe them. Use Search Subscribers or Get Subscriber to find the subscription ID first. Use List Custom Fields to discover available custom field names. Set unsubscribe: true to unsubscribe the subscriber. Use Get Publication Info to get the…

Full schema: https://pipedream.com/apps/beehiiv/actions/update-subscriber.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
