beehiiv
Create subscribers, list publications, and manage your newsletter on beehiiv.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("beehiiv", action, input) resolves with the provider's answer and rejects when beehiiv isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "beehiiv"} says whether yours can call it.
// workflows/notify.ts: call beehiiv when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellBeehiiv = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when beehiiv isn't connected.
const output = await step.run("beehiiv", () =>
step.ctx.integrations.invoke("beehiiv", "create_subscription", {
"publicationId": "<publicationId>",
"email": "<email>"
}),
);
step.ctx.log("beehiiv answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "beehiiv",
"piece_action": "create_subscription",
"input": {
"publicationId": "<publicationId>",
"email": "<email>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/beehiiv/create_subscription" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"publicationId":"<publicationId>","email":"<email>"}}'Actions
create_subscription
Create Subscription. Creates a new subscription.
| Input | Type | Description |
|---|---|---|
publicationIdrequired | id (picked from your account) | Publication |
emailrequired | text | The email address of the new subscription. |
reactivate_existingoptional | boolean | Whether to reactivate the subscription if they have already unsubscribed. Use only if the subscription is knowingly resubscribing. |
send_welcome_emailoptional | boolean | Whether to send the default welcome email to the subscription. |
utm_sourceoptional | text | The source of the subscription. |
utm_mediumoptional | text | The medium of the subscription. |
utm_campaignoptional | text | The acquisition campaign of the subscription. |
referring_siteoptional | text | The website that the subscription was referred from. |
referral_codeoptional | text | A subscription's referral_code to give them credit for the new subscription. |
tieroptional | one of "free" | "premium" | The tier for this subscription. |
custom_fieldsoptional | object (depends on other props) | Custom Fields |
stripe_customer_idoptional | text | The Stripe customer ID for this subscription. |
double_opt_overrideoptional | text | Override publication double-opt settings for this subscription. |
premium_tier_idsoptional | array | The IDs of the premium tiers this subscription is associated with. |
automation_idsoptional | id (picked from your account) | Enroll the subscription into automations after their subscription has been created. |
list_automations
List Automations. Retrieves a list of automations for a publication.
| Input | Type | Description |
|---|---|---|
publicationIdrequired | id (picked from your account) | Publication |
limitoptional | number | A limit on the number of automations to be returned (1-100, default 10). |
pageoptional | number | The page number for pagination (default 1). |
add_subscription_to_automation
Add Subscription to Automation. Adds an existing subscription to a specific automation flow.
| Input | Type | Description |
|---|---|---|
publicationIdrequired | id (picked from your account) | Publication |
automationIdrequired | id (picked from your account) | Automation ID |
emailoptional | text | The email address of the subscription. Provide either Email or Subscription ID. |
subscription_idoptional | id (picked from your account) | Subscription ID |
double_opt_overrideoptional | text | Override publication double-opt settings for this subscription (e.g., "on"). |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
list_posts
List Posts. Retrieves all posts belonging to a specific publication.
| Input | Type | Description |
|---|---|---|
publicationIdrequired | id (picked from your account) | Publication |
expandoptional | list of | Optionally expand the results by adding additional information. |
audiencerequired | one of "all" | "free" | "premium" | Audience |
platformrequired | one of "all" | "web" | "email" | "both" | Platform |
statusrequired | one of "all" | "draft" | "confirmed" | "archived" | Status |
content_tagsoptional | array | Filter posts by content tags. Returns posts with ANY of the specified tags. |
limitoptional | number | Number of posts to return (1-100, default 10). |
pageoptional | number | Page number for pagination (default 1). |
update_subscription
Update Subscription. Update an existing subscription.
| Input | Type | Description |
|---|---|---|
publicationIdrequired | id (picked from your account) | Publication |
subscriptionIdrequired | id (picked from your account) | Subscription ID |
tieroptional | one of "free" | "premium" | Set the tier for this subscription. |
stripe_customer_idoptional | text | The Stripe Customer ID of the subscription. |
unsubscribeoptional | boolean | Whether to unsubscribe this subscription from the publication. |
custom_fieldsoptional | object (depends on other props) | Custom Fields |
Details
- Id
beehiiv- Category
- Marketing
- Tags
- email, newsletter, publishing, creators
- Package
@activepieces/piece-beehiiv@0.2.4- Runs
- Through the integration runner