beehiiv integration for AI agents.
beehiiv integration for AI agents with secure authentication and server-side credential injection. Open Connector runs the OAuth, seals the token in an encrypted vault, and serves beehiiv tools to your agent over MCP or a typed API — credentials injected server-side, every call audited, nothing leaving your infrastructure. Open source (AGPL-3.0) and self-hostable.
Real beehiiv actions, managed and audited.
Your user connects beehiiv once; your agent can then use beehiiv API to manage newsletters, publications, posts, subscribers, automations, segments, custom fields, and reporting — scoped to the OAuth permissions you grant and the tool allowlist you configure. Every action is least-privilege and written to a tamper-evident audit trail.
- 1
Your user grants beehiiv access once (OAuth) — the token lands in the vault.
- 2
Your agent calls a tool over MCP or the typed API; Open Connector injects the credential server-side.
- 3
Every routed call appends a hash-chained audit record — nothing leaves your infra.
Supported beehiiv tools.
84 tools are generated from the published beehiiv catalog. Descriptions are plain text; each action remains subject to its configured authentication and tool allowlist.
Showing 84 tools. All published catalog entries are included in this page's server-rendered HTML.
- Get aggregate stats <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>
- Retrieve aggregate stats for all posts
- Posts
- Add subscription to an automation <Badge intent="info" minimal outlined>OAuth Scope: automations:write</Badge>
- Add an existing subscription to an automation flow. Requires the automation to have an active *Add by API* trigger. The specified `email` or `subscription_id` will be matched against your existing subscribers. If an existing subscriber is found, they will be enrolled immediately. Looking to enroll new subscribers? Use the **[Create Subscription](/api-reference/subscriptions/create)** endpoint instead and specify the `automation_ids` param.
- Automation Journeys
- Delete custom field <Badge intent="info" minimal outlined>OAuth Scope: custom_fields:write</Badge>
- Delete a custom field from a publication.
- Custom Fields
- Delete newsletter list <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:write</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> Delete a newsletter list belonging to a specific publication.
- Newsletter Lists
- Delete post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>
- Delete or Archive a post. Any post that has been confirmed will have it's status changed to `archived`. Posts in the `draft` status will be permanently deleted.
- Posts
- Delete segment <Badge intent="info" minimal outlined>OAuth Scope: segments:write</Badge>
- Delete a segment. Deleting the segment does not effect the subscriptions in the segment.
- Segments
- Delete subscription <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- <Warning>This cannot be undone. All data associated with the subscription will also be deleted. We recommend unsubscribing when possible instead of deleting. If a premium subscription is deleted they will no longer be billed.</Warning> Deletes a subscription.
- Subscriptions
- Delete a webhook <Badge intent="info" minimal outlined>OAuth Scope: webhooks:write</Badge>
- Delete a webhook subscription from a publication.
- Webhooks
- List segment subscriber IDs <Badge intent="info" minimal outlined>OAuth Scope: segments:read</Badge>
- List subscriber IDs for a segment. Returns a lightweight array of subscription IDs only, without additional subscriber details. **Use this endpoint when you only need subscriber IDs** (e.g., for counting, ID-based lookups, or integrations with external systems). If you need full subscriber details (email, status, custom fields, etc.), use `/segments/{segmentId}/members` instead.
- Segments
- Get subscription by email <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:read</Badge>
- <Info>Please note that this endpoint requires the email to be URL encoded. Please reference your language's documentation for the correct method of encoding.</Info> Retrieve a single subscription belonging to a specific email address in a specific publication.
- Subscriptions
- Get subscription by ID <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:read</Badge>
- <Info>In previous versions of the API, another endpoint existed to retrieve a subscription by the subscriber ID. This endpoint is now deprecated and will be removed in a future version of the API. Please use this endpoint instead. The subscription ID can be found by exporting a list of subscriptions either via the `Settings > Publications > Export Data` or by exporting a CSV in a segment.</Info> Retrieve a single subscription belonging to a specific publication.
- Subscriptions
- List publications <Badge intent="info" minimal outlined>OAuth Scope: publications:read</Badge>
- Retrieve all publications associated with your API key.
- Publications
- Get publication <Badge intent="info" minimal outlined>OAuth Scope: publications:read</Badge>
- Retrieve a single publication
- Publications
- List authors
- Retrieve a list of authors available for the publication.
- Authors
- List automations <Badge intent="info" minimal outlined>OAuth Scope: automations:read</Badge>
- Retrieve automations for a publication.
- Automations
- Get automation <Badge intent="info" minimal outlined>OAuth Scope: automations:read</Badge>
- Retrieve a single automation for a publication.
- Automations
- List automation journeys <Badge intent="info" minimal outlined>OAuth Scope: automations:read</Badge>
- Retrieve a list of automation journeys that have occurred within a specific automation.
- Automation Journeys
- Get automation journey <Badge intent="info" minimal outlined>OAuth Scope: automations:read</Badge>
- Retrieve a single automation journey by ID.
- Automation Journeys
- List subscription updates <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:read</Badge>
- Returns a list of Subscription Update objects for a publication.
- Bulk Subscription Updates
- Get subscription update <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:read</Badge>
- Returns a single Subscription Update object for a publication.
- Bulk Subscription Updates
- List complimentary access <Badge intent="info" minimal outlined>OAuth Scope: complimentary_access:read</Badge>
- Retrieve all complimentary access objects belonging to a specific publication.
- Complimentary Access
- Get complimentary access <Badge intent="info" minimal outlined>OAuth Scope: complimentary_access:read</Badge>
- Retrieve a single complimentary access object belonging to a specific publication.
- Complimentary Access
- List condition sets <Badge intent="info" minimal outlined>OAuth Scope: condition_sets:read</Badge>
- Retrieve all active condition sets for a publication. Condition sets define reusable audience segments for targeting content to specific subscribers. Use the `purpose` parameter to filter by a specific use case.
- Condition Sets
- Get condition set <Badge intent="info" minimal outlined>OAuth Scope: condition_sets:read</Badge>
- Retrieve a single active dynamic content condition set for a publication. Use `expand[]=stats` to calculate and return the active subscriber count synchronously.
- Condition Sets
- List custom fields <Badge intent="info" minimal outlined>OAuth Scope: custom_fields:read</Badge>
- List all custom fields on a publication.
- Custom Fields
- Get custom field <Badge intent="info" minimal outlined>OAuth Scope: custom_fields:read</Badge>
- View a specific custom field on a publication.
- Custom Fields
- List data deletion requests <Badge intent="info" minimal outlined>OAuth Scope: data_deletion:read</Badge>
- <Warning>This is a gated feature that requires enablement. Contact support to enable Data Deletion API access for your organization.</Warning> List all data deletion requests for your organization. API keys restricted to specific publications cannot access this endpoint and will receive a 403 response, since deletion requests apply to the entire workspace.
- Data Deletion
- Get data deletion request <Badge intent="info" minimal outlined>OAuth Scope: data_deletion:read</Badge>
- <Warning>This is a gated feature that requires enablement. Contact support to enable Data Deletion API access for your organization.</Warning> Retrieve the details and current status of a specific data deletion request. API keys restricted to specific publications cannot access this endpoint and will receive a 403 response, since deletion requests apply to the entire workspace.
- Data Deletion
- Get publication engagements <Badge intent="info" minimal outlined>OAuth Scope: publications:read</Badge>
- Retrieve email engagement metrics for a specific publication over a defined date range and granularity.<br><br> By default, the endpoint returns metrics for the past day, aggregated daily. The max number of days allowed is 31. All dates and times are in UTC.
- engagements
- List newsletter lists <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:read</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> List all newsletter lists for a publication.
- Newsletter Lists
- Get newsletter list <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:read</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> Retrieve a single newsletter list belonging to a specific publication.
- Newsletter Lists
- List newsletter list subscriptions <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:read</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> List all subscriptions for a newsletter list.
- Newsletter List Subscriptions
- Get newsletter list subscription <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:read</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> Retrieve a single newsletter list subscription.
- Newsletter List Subscriptions
- List polls <Badge intent="info" minimal outlined>OAuth Scope: polls:read</Badge>
- Retrieve all polls belonging to a specific publication. Poll choices are always included. Use `expand[]=stats` to include aggregate vote counts per choice.
- Polls
- Get poll <Badge intent="info" minimal outlined>OAuth Scope: polls:read</Badge>
- Retrieve detailed information about a specific poll belonging to a publication. Use `expand[]=stats` for aggregate vote counts, or `expand[]=poll_responses` for individual subscriber responses.
- Polls
- Get post templates <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>
- Retrieve a list of post templates available for the publication.
- Post Templates
- List posts <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>
- Retrieve all posts belonging to a specific publication
- Posts
- Get post <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>
- Retrieve a single Post belonging to a specific publication
- Posts
- Get referral program <Badge intent="info" minimal outlined>OAuth Scope: referral_program:read</Badge>
- Retrieve details about the publication's referral program, including milestones and rewards.
- Referral Program
- List segments <Badge intent="info" minimal outlined>OAuth Scope: segments:read</Badge>
- Retrieve information about all segments belonging to a specific publication
- Segments
- Get segment <Badge intent="info" minimal outlined>OAuth Scope: segments:read</Badge>
- Retrieve information about a specific segment belonging to a publication
- Segments
- List subscriptions <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:read</Badge>
- Retrieve all subscriptions belonging to a specific publication. <Info> **New**: This endpoint now supports cursor-based pagination for better performance and consistency. Use the `cursor` parameter instead of `page` for new integrations. </Info> <Warning> **Deprecation Notice**: Offset-based pagination (using `page` parameter) is deprecated and limited to 100 pages maximum. Please migrate to cursor-based pagination. See our [Pagination Guide](/welcome/pagination) for details. </Warning>
- Subscriptions
- List tiers <Badge intent="info" minimal outlined>OAuth Scope: tiers:read</Badge>
- Retrieve all tiers belonging to a specific publication
- Tiers
- Get tier <Badge intent="info" minimal outlined>OAuth Scope: tiers:read</Badge>
- Retrieve a single tier belonging to a specific publication
- Tiers
- List webhooks <Badge intent="info" minimal outlined>OAuth Scope: webhooks:read</Badge>
- Retrieve all webhooks belonging to a specific publication.
- Webhooks
- Get webhook <Badge intent="info" minimal outlined>OAuth Scope: webhooks:read</Badge>
- Retrieve a specific webhook belonging to a publication.
- Webhooks
- Identify workspace <Badge intent="info" minimal outlined>OAuth Scope: identify:read</Badge>
- Retrieve information about the workspace the OAuth or API token is associated with.
- workspaces
- Identify user <Badge intent="info" minimal outlined>OAuth Scope: identify:read</Badge>
- Retrieve information about the user who authorized the OAuth access token.
- oauth_users
- Get advertisement opportunities <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>
- Retrieve a list of accepted advertisement opportunities for the publication.
- Advertisement Opportunities
- List automation emails
- Retrieve all emails belonging to a specific automation, including engagement statistics for each email.
- Automations
- List segment subscribers <Badge intent="info" minimal outlined>OAuth Scope: segments:read</Badge>
- List all members in a segment with full subscription data. Each member is returned as a subscription object containing complete subscriber information and their subscription details. Supports optional expansions for stats, custom fields, tags, referrals, and premium tiers. **Use this endpoint when you need detailed subscriber information.** If you only need subscriber IDs, use `/segments/{segmentId}/results` for a lighter-weight response.
- Segments
- List poll responses <Badge intent="info" minimal outlined>OAuth Scope: polls:read</Badge>
- Retrieve all individual subscriber responses for a specific poll with cursor-based pagination. Use this endpoint for large datasets instead of the `expand[]=poll_responses` parameter on the poll show endpoint.
- Polls
- Update subscriptions <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Bulk update multiple subscriptions fields, including status, custom fields, and tiers.
- Bulk Subscription Updates
- Update custom field <Badge intent="info" minimal outlined>OAuth Scope: custom_fields:write</Badge>
- Update a custom field on a publication.
- Custom Fields
- Update newsletter list subscription <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:write</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> Update a newsletter list subscription. Currently supports unsubscribing a subscription from a newsletter list.
- Newsletter List Subscriptions
- Update post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>
- <Note title="Currently in beta" icon="b"> This feature is currently in beta, the API is subject to change, and available only to Enterprise users.<br/><br/>To inquire about Enterprise pricing, please visit our <a href="https://www.beehiiv.com/enterprise">Enterprise page</a>. </Note> Update an existing post for a specific publication. Only the fields provided in the request body will be updated — all other fields remain unchanged. For a detailed walkthrough of content methods and working with custom HTML, see the <a href="https://www.beehiiv.com/support/article/36759164012439-using-the-send-api-and-create-post-endpoint">Using the Send API and Create Post Endpoint</a> guide. To update post content, provide either `blocks` or `body_content` (not both). If neither is provided, the existing content is preserved. The same content methods and CSS guardrails described in the create endpoint apply here.
- Posts
- Update subscription by ID <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Update a single subscription.
- Subscriptions
- Update a tier <Badge intent="info" minimal outlined>OAuth Scope: tiers:write</Badge>
- Update an existing tier belonging to a specific publication
- Tiers
- Update webhook <Badge intent="info" minimal outlined>OAuth Scope: webhooks:write</Badge>
- Update a webhook subscription for a publication.
- Webhooks
- Update subscriptions' status <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Bulk update subscriptions' status.
- Bulk Subscription Updates
- Bulk create subscription <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Create new subscriptions for a publication.
- Bulk Subscriptions
- Create custom field <Badge intent="info" minimal outlined>OAuth Scope: custom_fields:write</Badge>
- Create a custom field on a publication, for use in subscriptions.
- Custom Fields
- Create data deletion request <Badge intent="info" minimal outlined>OAuth Scope: data_deletion:write</Badge>
- <Warning>This is a gated feature that requires enablement. Contact support to enable Data Deletion API access for your organization.</Warning> Creates a data deletion request for a subscriber within your organization. The subscriber's data will be redacted from all publications in the organization after a 14-day safety delay. This action cannot be undone once processing begins. API keys restricted to specific publications cannot access this endpoint and will receive a 403 response, since deletion requests apply to the entire workspace.
- Data Deletion
- Create newsletter list <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:write</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> Create a new newsletter list for a publication. The list will be created with an active status. The slug will be auto-generated from the name if not provided.
- Newsletter Lists
- Create newsletter list subscription <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:write</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> Subscribe a subscription to a newsletter list. Accepts either a subscription_id or email to identify the subscription.
- Newsletter List Subscriptions
- Create post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>
- <Note title="Currently in beta" icon="b"> This feature is currently in beta, the API is subject to change, and available only to Enterprise users.<br/><br/>To inquire about Enterprise pricing, please visit our <a href="https://www.beehiiv.com/enterprise">Enterprise page</a>. </Note> Create a post for a specific publication. For a detailed walkthrough including setup, testing workflows, and working with custom HTML and templates, see the <a href="https://www.beehiiv.com/support/article/36759164012439-using-the-send-api-and-create-post-endpoint">Using the Send API and Create Post Endpoint</a> guide. ## Content methods There are three ways to provide content for a post. You must provide either `blocks` or `body_content`, but not both. ### 1. Blocks Use the `blocks` field to build your post with structured content blocks such as paragraphs, images, headings, buttons, tables, and more. Each block has a `type` and its own set of properties. This method gives you fine-grained control over individual content elements and supports features like visual settings, visibility settings, and dynamic content targeting. ### 2. Raw HTML (`body_content`) Use the `body_content` field to provide a single string of raw HTML. The HTML is wrapped in an `htmlSnippet` block internally. This is useful when you have pre-built HTML content or are migrating from another platform. ### 3. HTML blocks within blocks Use `type: html` blocks inside the `blocks` array to embed raw HTML snippets alongside other structured blocks. This lets you mix structured content (paragraphs, images, etc.) with custom HTML where needed. ## CSS and styling guardrails beehiiv processes all HTML content through a sanitization pipeline. When using `body_content` or `html` blocks, be aware of the following: - **`<style>` tags are removed.** All `<style>` block elements are stripped during sanitization. Do not rely on embedded stylesheets. - **`<link>` tags are removed.** External stylesheet references are not allowed. - **Inline styles are preserved.** Styles applied directly to elements via the `style` attribute (e.g., `<div style="color: red;">`) are kept intact. - **CSS classes have no effect.** While class attributes are not stripped, no corresponding stylesheets are loaded to apply them. - **beehiiv's email template wraps your content.** Your HTML is rendered inside beehiiv's email table structure, which applies its own layout and spacing. This may affect the appearance of your content. - **Use inline styles for all visual styling.** Since `<style>` and `<link>` tags are removed, inline styles on individual elements are the only reliable way to control appearance.
- Posts
- Create segment
- Create a new segment.<br><br> **Manual segments** — Use `subscriptions` or `emails` input to create a segment from an explicit list of subscription IDs or email addresses. The segment is processed synchronously and returns with `status: completed`. Net new email addresses will be ignored; create subscriptions using the `Create Subscription` endpoint.<br><br> **Dynamic segments** — Use `custom_fields` input to create a segment that filters subscribers by custom field values. The segment is processed asynchronously and returns with `status: pending`. Results will be available in the `List Segment Subscribers` endpoint after processing is complete.
- Segments
- Create subscription <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Create new subscriptions for a publication.
- Subscriptions
- Add subscription tag <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Adds tags to a subscription. If the tag does not exist on the publication, it will be created automatically.
- Subscription Tags
- Create a tier <Badge intent="info" minimal outlined>OAuth Scope: tiers:write</Badge>
- Create a new tier for a publication.
- Tiers
- Create a webhook <Badge intent="info" minimal outlined>OAuth Scope: webhooks:write</Badge>
- Create a new webhook for a given publication.
- Webhooks
- Generate post preview URL <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>
- Generate a URL to preview a post as a given audience. The returned `preview_url` renders the post in the beehiiv app and requires a beehiiv session with access to the publication - it is not itself an HTML-returning endpoint.
- Posts
- Get publications by subscription email <Badge intent="info" minimal outlined>OAuth Scope: publications:read</Badge>
- Retrieve all publications in the workspace that have a subscription for the specified email address. The workspace is determined by the provided API key.
- workspaces
- Update subscriptions <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Bulk update multiple subscriptions fields, including status, custom fields, and tiers.
- Bulk Subscription Updates
- Update custom field <Badge intent="info" minimal outlined>OAuth Scope: custom_fields:write</Badge>
- Update a custom field on a publication.
- Custom Fields
- Update subscription by ID <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Update a single subscription.
- Subscriptions
- Update a tier <Badge intent="info" minimal outlined>OAuth Scope: tiers:write</Badge>
- Update an existing tier belonging to a specific publication
- Tiers
- Update subscriptions' status <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Bulk update subscriptions' status.
- Bulk Subscription Updates
- Recalculate segment <Badge intent="info" minimal outlined>OAuth Scope: segments:write</Badge>
- Recalculates a specific segment belonging to a publication
- Segments
- Get author
- Retrieve a single author from a publication.
- Authors
- Send test email <Badge intent="info" minimal outlined>OAuth Scope: posts</Badge>
- Send a test email for a specific post to one or more email addresses. Returns the number of remaining test sends for the day and the time at which the limit resets.
- Posts
- Update newsletter list <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:write</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> Update a newsletter list belonging to a specific publication.
- Newsletter Lists
- Update subscription by email <Badge intent="info" minimal outlined>OAuth Scope: subscriptions:write</Badge>
- Update a single subscription by email.
- Subscriptions
- Update newsletter list subscription by subscription ID <Badge intent="warning" minimal outlined>Beta</Badge> <Badge intent="info" minimal outlined>OAuth Scope: newsletter_lists:write</Badge>
- <Note title="Currently in beta" icon="b"> Newsletter Lists is currently in beta, the API is subject to change. </Note> Update a newsletter list subscription by subscription ID. An alternative to the update endpoint when you don't have the newsletter list subscription ID. Accepts either a subscription_id or email to identify the subscription. Currently supports unsubscribing a subscription from a newsletter list.
- Newsletter List Subscriptions
beehiiv integration, answered
- How do AI agents use beehiiv through Open Connector?
- Your user connects beehiiv once with one of its cataloged authentication methods. Open Connector stores the credential in an encrypted vault and exposes beehiiv tools to your agent over MCP or a typed API, with credentials injected server-side on each call.
- Is this a beehiiv MCP server?
- Yes. Open Connector can serve beehiiv as a named MCP server with a scoped allowlist and a per-user connection URL, so any MCP client can call beehiiv actions with credentials injected server-side.
- Where do beehiiv credentials live?
- In your own infrastructure. Open Connector keeps credentials in its own vault and injects them at call time, so they never leave your environment.
Give your agents beehiiv — keep the keys.
Open source, self-hostable, with beehiiv credentials that never leave your infrastructure. Run it from source today.