返回顶部
b

beehiiv蜂巢平台

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
2,055
下载量
免费
免费
6
收藏
概述
安装方式
版本历史

beehiiv

beehiiv

通过托管 OAuth 认证访问 beehiiv API。管理新闻通讯出版物、订阅、文章、自定义字段、细分、层级和自动化。

快速开始

bash

列出出版物


python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/beehiiv/v2/publications)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

基础 URL

https://gateway.maton.ai/beehiiv/{native-api-path}

将 {native-api-path} 替换为实际的 beehiiv API 端点路径。网关将请求代理到 api.beehiiv.com 并自动注入您的 OAuth 令牌。

认证

所有请求都需要在 Authorization 标头中包含 Maton API 密钥:

Authorization: Bearer $MATONAPIKEY

环境变量: 将您的 API 密钥设置为 MATONAPIKEY:

bash
export MATONAPIKEY=YOURAPIKEY

获取您的 API 密钥

  1. 1. 在 maton.ai 登录或创建账户
  2. 前往 maton.ai/settings
  3. 复制您的 API 密钥

连接管理

在 https://ctrl.maton.ai 管理您的 beehiiv OAuth 连接。

列出连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections?app=beehiiv&status=ACTIVE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

创建连接

bash
python < import urllib.request, os, json
data = json.dumps({app: beehiiv}).encode()
req = urllib.request.Request(https://ctrl.maton.ai/connections, data=data, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Content-Type, application/json)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

获取连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id})
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

响应:
json
{
connection: {
connection_id: 8bfe17f4-0038-4cbd-afb4-907b1ffa9d66,
status: ACTIVE,
creation_time: 2026-02-11T00:25:10.464852Z,
lastupdatedtime: 2026-02-11T00:27:00.816431Z,
url: https://connect.maton.ai/?session_token=...,
app: beehiiv,
metadata: {}
}
}

在浏览器中打开返回的 url 以完成 OAuth 授权。

删除连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id}, method=DELETE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

指定连接

如果您有多个 beehiiv 连接,请使用 Maton-Connection 标头指定要使用的连接:

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/beehiiv/v2/publications)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Maton-Connection, 8bfe17f4-0038-4cbd-afb4-907b1ffa9d66)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

如果省略,网关将使用默认(最旧的)活动连接。

API 参考

所有 beehiiv API 端点遵循以下模式:

/beehiiv/v2/{resource}



出版物

列出出版物

bash
GET /beehiiv/v2/publications

查询参数:

参数描述
limit每页结果数(1-100,默认:10)
page
页码(默认:1) |
| expand[] | 展开内容:stats、statactivesubscriptions、stataverageopen_rate 等 |
| order_by | 排序依据:created 或 name |
| direction | 排序方向:asc 或 desc |

响应:
json
{
data: [
{
id: pub_c6c521e4-91ac-4c14-8a52-06987b7e32f2,
name: 我的新闻通讯,
organization_name: 我的组织,
referralprogramenabled: true,
created: 1770767522
}
],
page: 1,
limit: 10,
total_results: 1,
total_pages: 1
}

获取出版物

bash
GET /beehiiv/v2/publications/{publication_id}



订阅

列出订阅

bash
GET /beehiiv/v2/publications/{publication_id}/subscriptions

查询参数:

参数描述
limit每页结果数(1-100,默认:10)
cursor
分页游标(推荐) |
| page | 页码(已弃用,最多 100 页) |
| email | 按精确邮箱过滤(不区分大小写) |
| status | 过滤:validating、invalid、pending、active、inactive、all |
| tier | 过滤:free、premium、all |
| expand[] | 展开内容:stats、custom_fields、referrals |
| order_by | 排序字段(默认:created) |
| direction | 排序方向:asc 或 desc |

响应:
json
{
data: [
{
id: sub_c27d9640-f418-43a8-a0f9-528c20a05002,
email: subscriber@example.com,
status: active,
created: 1770767524,
subscription_tier: free,
subscriptionpremiumtier_names: [],
utm_source: direct,
utm_medium: ,
utm_channel: website,
utm_campaign: ,
referring_site: ,
referral_code: gBZbSVal1X,
stripecustomerid:
}
],
limit: 10,
has_more: false,
next_cursor: null
}

按 ID 获取订阅

bash
GET /beehiiv/v2/publications/{publicationid}/subscriptions/{subscriptionid}

查询参数:

参数描述
expand[]展开内容:stats、custom_fields、referrals、tags

按邮箱获取订阅

bash
GET /beehiiv/v2/publications/{publicationid}/subscriptions/byemail/{email}

创建订阅

bash
POST /beehiiv/v2/publications/{publication_id}/subscriptions
Content-Type: application/json

{
email: newsubscriber@example.com,
utm_source: api,
sendwelcomeemail: false,
reactivate_existing: false
}

请求体:

字段类型必填描述
emailstring订阅者邮箱地址
reactivate_existing
boolean | 否 |

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 beehiiv-1776419956 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 beehiiv-1776419956 技能

通过命令行安装

skillhub install beehiiv-1776419956

下载

⬇ 下载 beehiiv v1.0.0(免费)

文件大小: 5.34 KB | 发布时间: 2026-4-17 19:56

v1.0.0 最新 2026-4-17 19:56
beehiiv skill 1.0.0 – Initial release

- Integrates with beehiiv's API for managing publications, subscriptions, posts, custom fields, segments, and automations.
- Provides managed OAuth authentication and connection management via Maton.
- Includes documentation for making API calls, managing OAuth connections, and using Maton API keys.
- Supports newsletter subscriber management, post creation, segment organization, and more.
- Offers usage samples in Python for common connection and API operations.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部