sendblue-api
できること
このツールを使うと、プログラムから電話番号を使ってテキストメッセージ(SMS、iMessage、RCS)を送受信できます。個別メッセージやグループメッセージを送れるほか、特殊効果やリアクションを追加したり、相手が入力中かどうかを知ったりすることもできます。
使う場面
- ✓アプリケーションからSMS通知を送る必要があるとき。
- ✓テキストメッセージに応答するチャットボットを作りたいとき。
- ✓メッセージ送信を、より大きなシステムに組み込みたいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/sendblue/sendblue-api/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“友人に、特殊効果付きのテキストメッセージを送ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
プログラムが、送信先や本文などのメッセージの内容を含むリクエストを、Sendblue APIに送ります。Sendblueが、設定された電話番号を使ってメッセージの送信を処理します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Sendblue API
Overview
Sendblue is a REST API that sends iMessage (blue bubbles), SMS, and RCS from a provisioned phone number. Everything is plain JSON over HTTPS — no SDK is required. The API covers outbound 1:1 and group sends, iMessage effects, reactions, typing indicators, status callbacks, and inbound webhooks.
When to Use This Skill
- Use when writing application code (server, worker, function) that sends Sendblue messages as part of a long-running service.
- Use when receiving inbound messages via webhooks.
- Use when you need features the CLI does not expose: send styles, reactions, group messages, typing indicators, status callbacks, media uploads, or the contacts API beyond basic CRUD.
- Reach for [[sendblue-cli]] instead for shell-context outbound: one-shot scripts, cron jobs, agent hooks, "ping me when X" workflows.
How It Works
Step 1: Authenticate
https://api.sendblue.com
Every request needs two headers:
sb-api-key-id: <YOUR_API_KEY_ID>
sb-api-secret-key: <YOUR_API_SECRET>
Content-Type: application/json
Keep both values server-side — never ship them to a browser or mobile client.
Step 2: Send a message
curl -X POST https://api.sendblue.com/api/send-message \
-H "sb-api-key-id: $KEY_ID" \
-H "sb-api-secret-key: $SECRET" \
-H 'Content-Type: application/json' \
-d '{
"number": "+15551234567",
"from_number": "+1YOUR_SENDBLUE_NUMBER",
"content": "Hello from the API!"
}'
Phone numbers must be E.164. from_number must be a line you own — list yours with GET /api/lines.
Step 3: Track delivery
The synchronous response includes a message_handle (Apple GUID — persist this; you need it for reactions and replies) and a status from REGISTERED, PENDING, QUEUED, ACCEPTED, SENT, DELIVERED, DECLINED, ERROR. Only DELIVERED means it landed. Use status_callback instead of polling /api/status.
Step 4: Receive inbound
Configure webhook URLs in the dashboard or via POST /api/account/webhooks. Sendblue POSTs JSON to your endpoint. Respond with 2xx promptly — non-2xx triggers retries and duplicate deliveries. Event types: receive, outbound, typing_indicator, call_log, line_blocked, line_assigned, contact_created.
Core Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /api/send-message |
Send a 1:1 message (text and/or media) |
| POST | /api/send-group-message |
Send to multiple recipients |
| POST | /api/create-group |
Create a named group thread |
| POST | /api/send-reaction |
Send a tapback (love/like/dislike/laugh/emphasize/question) |
| POST | /api/send-typing-indicator |
Show "typing…" in the recipient's thread |
| POST | /api/mark-read |
Send a read receipt |
| POST | /api/upload-file / /api/upload-media-object |
Upload media (direct or from URL) |
| GET | /api/status |
Poll a message's delivery status |
| GET | /api/evaluate-service |
Check whether a number is on iMessage |
| GET | /api/v2/messages / /api/v2/messages/:id |
Read message history |
| GET / POST / PUT / DELETE | /api/v2/contacts[...] |
Manage contacts |
| GET | /api/lines |
List your Sendblue phone numbers |
| POST | /api/account/webhooks |
CRUD webhook subscriptions |
Examples
Example 1: Send with media, effects, and a status callback
POST /api/send-message
{
"number": "+15551234567",
"from_number": "+1YOUR_SENDBLUE_NUMBER",
"content": "Optional text",
"media_url": "https://example.com/img.jpg",
"send_style": "celebration",
"status_callback": "https://yourapp.com/sendblue/status"
}
content and/or media_url is required. send_style is iMessage-only — valid values: celebration, shooting_star, fireworks, lasers, love, confetti, balloons, spotlight, echo, invisible, gentle, loud, slam. Ignored on SMS. Text up to 18,996 chars; media up to 100 MB on iMessage, 5 MB on SMS.
Example 2: Group message
POST /api/send-group-message
{
"numbers": ["+15551234567", "+15557654321"],
"from_number": "+1YOUR_SENDBLUE_NUMBER",
"content": "Hey team"
}
The response returns a group_id — persist it to send follow-ups into the same thread instead of creating a new one each time.
Example 3: React to a message
POST /api/send-reaction
{
"from_number": "+1YOUR_SENDBLUE_NUMBER",
"message_handle": "<message_handle from prior send>",
"reaction": "love"
}
…
よくある質問
iMessage、SMS、RCSとは何ですか?
メッセージを送る方法の違いです。iMessageはAppleのサービス(青い吹き出し)、SMSは従来型のテキストメッセージ、RCSはSMSをより新しくした方式です。
「webhook」とは何ですか?
新しいメッセージが届いたときや、送信したメッセージが届いたときに、Sendblueからプログラムへ送られる「通知」のようなものです。
写真や動画も送れますか?
はい、写真や動画などのメディアを送れます。ただし、iMessageかSMSかによって、サイズの上限が異なります。
詳細
作者による元の説明
Send and receive iMessage, SMS, and RCS from application code via the Sendblue HTTP API — text, media, group messages, send styles, reactions, typing indicators, status callbacks, and inbound webhooks.
人気
- GitHubのスター
- 48k
- ランキング
- #6293
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。