闲社服务运行正常AI智能体自动化平台
s

发送短信

技能标识:sending-sms

Sends SMS messages via the Sendly API with the Node.js SDK or REST API. Handles single messages, batch sends, scheduling, conversations, and sandbox testing. Applies when sending text messages, notifications, alerts, or reminders via SMS.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

发送短信

使用Sendly发送短信

快速开始

typescript
import Sendly from @sendly/node;

const sendly = new Sendly(process.env.SENDLYAPIKEY!);

const message = await sendly.messages.send({
to: +15551234567,
text: 您的订单已发货!,
messageType: transactional,
});

身份验证

所有请求都需要Bearer令牌。将API密钥存储在SENDLYAPIKEY环境变量中。

  • - sktest密钥 → 沙盒模式(不发送真实短信,不扣除积分)
  • sklive密钥 → 生产环境(向已验证号码发送真实短信)

REST API

基础URL: https://sendly.live/api/v1

发送消息

bash
curl -X POST https://sendly.live/api/v1/messages \
-H Authorization: Bearer $SENDLYAPIKEY \
-H Content-Type: application/json \
-d {to: +15551234567, text: 你好!, messageType: transactional}

必填字段: to(E.164格式)、text、messageType(transactional或marketing)

可选字段: metadata(对象,最大4KB)、from(发送者ID)

响应格式

json
{
id: msg_abc123,
to: +15551234567,
text: 你好!,
status: sent,
segments: 1,
creditsUsed: 2,
createdAt: 2026-03-31T10:00:00Z
}

定时发送消息

bash
curl -X POST https://sendly.live/api/v1/messages/schedule \
-H Authorization: Bearer $SENDLYAPIKEY \
-H Content-Type: application/json \
-d {to: +15551234567, text: 提醒!, messageType: transactional, scheduledAt: 2026-04-01T14:00:00Z}

定时窗口:未来5分钟到5天之间。

批量发送

bash
curl -X POST https://sendly.live/api/v1/messages/batch \
-H Authorization: Bearer $SENDLYAPIKEY \
-H Content-Type: application/json \
-d {messages: [{to: +15551234567, text: 你好}, {to: +15559876543, text: 嗨}], messageType: transactional}

每批次最多10,000个收件人。

列出消息

bash
curl https://sendly.live/api/v1/messages?limit=50 \
-H Authorization: Bearer $SENDLYAPIKEY

支持limit、offset、status、q(全文搜索)。

Node.js SDK

bash
npm install @sendly/node

typescript
import Sendly from @sendly/node;

const sendly = new Sendly(process.env.SENDLYAPIKEY!);

const msg = await sendly.messages.send({ to: +15551234567, text: 你好!, messageType: transactional });
const scheduled = await sendly.messages.schedule({ to: +15551234567, text: 稍后!, messageType: transactional, scheduledAt: 2026-04-01T14:00:00Z });
const batch = await sendly.messages.batch({ messages: [{to: +15551234567, text: 嗨}], messageType: transactional });
const list = await sendly.messages.list({ limit: 50 });
const single = await sendly.messages.get(msg_abc123);

消息类型

  • - transactional:OTP验证码、订单确认、预约提醒、账户通知。全天候允许发送。
  • marketing:促销活动、打折信息、新闻通讯。受静默时段限制(收件人当地时间晚上9点至早上8点)。

将营销消息错误归类为事务性消息违反TCPA规定。

沙盒测试

使用sktest*密钥配合魔法电话号码:

号码行为
+15005550000始终成功
+15005550001
无效号码错误 |
| +15005550002 | 无法路由错误 |
| +15005550006 | 运营商拒绝 |

积分费用

  • - 美国/加拿大:每条短信2积分($0.02)
  • 国际:因国家而异(2–48积分)
  • 1积分 = $0.01

对话API

消息会自动归入对话线程。使用对话API进行双向消息传递:

typescript
const convos = await sendly.conversations.list({ status: active, limit: 20 });
const replies = await sendly.conversations.suggestReplies(conv_abc123);

完整参考

  • - API文档:https://sendly.live/docs/sms
  • SDK文档:https://sendly.live/docs/sdks
  • OpenAPI规范:https://sendly.live/openapi.yaml
  • 沙盒文档:https://sendly.live/docs/sandbox

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 sending-sms-1775881501 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 sending-sms-1775881501 技能

通过命令行安装

skillhub install sending-sms-1775881501

下载

⬇ 下载 sending-sms v1.0.0(免费)

文件大小: 2.2 KB | 发布时间: 2026-4-12 11:19

v1.0.0 最新 2026-4-12 11:19
- Initial release of the sending-sms skill.
- Send SMS messages using the Sendly API via Node.js SDK or REST API.
- Supports single messages, batch sending (up to 10,000 recipients), message scheduling, and SMS conversations.
- Includes sandbox testing with test API keys and magic phone numbers.
- Handles both transactional and marketing message types, with compliance notes.
- Full documentation and API references linked.
返回顶部