SDKs & Libraries
Drop MojaWave into your stack in minutes. The official Python and Node.js SDKs are available now — fully typed, thoroughly documented, and production-ready. PHP and Go are coming soon.
Coverage
- ✓client.sms — Single, bulk & OTP
- ✓client.credits — Balance & alerts
- ✓webhooks — Verify & parse
- ✓Typed dataclass models
- ✓Automatic retries & backoff
quickstart.py
from mojawave import MojaWave, construct_event # Initialize with your API key (or set MOJAWAVE_API_KEY) client = MojaWave(api_key="sk_live_mw_8472910") # ── Send an SMS ────────────────────────── sms = client.sms.send( to="+255755123456", sender="MojaWave", message="Your OTP is 4821. Valid for 5 min.", ) print(sms.id, sms.status, sms.credits_cost) # → 89b82624… sent 1 # ── Bulk send with personalization ─────── job = client.sms.bulk( sender="MojaWave", message="Hi {name}, your code is {code}", recipients=[ {"to": "+255755123456", "personalization": {"name": "Asha", "code": "4821"}}, ], ) print(job.id, job.status, job.total_recipients) # ── Check your credit balance ──────────── print(client.credits.balance().sms.balance) # ── Verify a webhook signature ─────────── event = construct_event( request.get_data(), request.headers["X-MojaWave-Signature"], "whsec_...", ) if event.type == "message.delivered": mark_delivered(event.data)
Install
npm / yarn / pnpm
$ npm install mojawave
$ yarn add mojawave
$ pnpm add mojawave
Versionv1.0.0
Node≥ 18.x
TypeScriptIncluded
LicenseMIT
Coverage
- ✓Full TypeScript types
- ✓Promise & async/await
- ✓ESM & CommonJS builds
- ✓Webhook signature verification
- ✓Automatic retries & zero deps
quickstart.ts
import { MojaWave, constructEvent } from 'mojawave'; // Initialize the client (or set MOJAWAVE_API_KEY) const client = new MojaWave({ apiKey: 'sk_live_mw_8472910', environment: 'live', // or 'sandbox' }); // ── Send an SMS ────────────────────────── const sms = await client.sms.send({ to: '+255755123456', sender: 'MojaWave', message: 'Your OTP is 4821. Valid for 5 min.', }); console.log(sms.id, sms.status, sms.credits_cost); // → 89b82624… sent 1 // ── Bulk send with personalization ─────── const job = await client.sms.bulk({ sender: 'MojaWave', message: 'Hi {name}, your code is {code}', recipients: [ { to: '+255755123456', personalization: { name: 'Asha', code: '4821' } }, ], }); console.log(job.id, job.status, job.total_recipients); // ── Verify a webhook (Express, raw body) ── app.post('/webhooks', express.raw({ type: 'application/json' }), (req, res) => { const event = constructEvent( req.body, req.header('X-MojaWave-Signature'), 'whsec_...', ); if (event.type === 'message.delivered') markDelivered(event.data); res.sendStatus(204); });
PHP SDK
A Composer-installable, Laravel-ready PHP SDK is in the works — with the same SMS, credits, and webhook coverage as our Python and Node.js libraries.
Get notified on releaseGo SDK
An idiomatic, zero-dependency Go SDK with context.Context support is on the roadmap — covering SMS, credits, and webhook verification.
Get notified on releaseInstall
pip
pip install mojawave-mcp
Claude Desktop config (claude_desktop_config.json)
{
"mcpServers": {
"mojawave": {
"command": "mojawave-mcp",
"env": {
"MOJAWAVE_API_KEY": "sk_live_mw_..."
}
}
}
}
Claude Code (.claude/mcp.json)
claude mcp add mojawave -- mojawave-mcp
Ready to integrate?
Request sandbox API keys and start building today — no credit card required.