返回顶部
b

beehiiv蜂巢平台

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,972
下载量
免费
免费
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 | 否 | 如果之前退订则重新激活 |
| sendwelcomeemail | boolean | 否 | 发送欢迎邮件 |
|

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 beehiiv-1776083462 技能

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

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

通过命令行安装

skillhub install beehiiv-1776083462

下载

⬇ 下载 beehiiv v1.0.0(免费)

文件大小: 5.37 KB | 发布时间: 2026-4-15 11:52

v1.0.0 最新 2026-4-15 11:52
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
返回顶部