Send SMS through your Android devices
A production-grade REST & WebSocket API that turns any Android phone into a programmable SMS gateway. Send messages, generate OTPs, receive inbound texts, and orchestrate fleets of devices in real time.
https://<your-host>/api/v1
Capabilities
Everything you need to route SMS at scale
From a single device to a distributed fleet — message queuing, delivery tracking, and OTP workflows are built in.
Send SMS
Queue outbound messages and let the gateway fleet deliver them. Automatic retries with exponential backoff.
Receive SMS
Inbound messages land in your inbox instantly and fire webhooks so your app reacts in real time.
OTP Generation
Six-digit codes with 5-minute expiry, 3-attempt limits, and 3-per-hour rate caps per phone number.
Webhooks
HMAC-signed event payloads for sms_received, sms_sent and sms_failed with configurable retries.
Realtime WebSocket
Bidirectional Action Cable channel keeps every gateway in sync — heartbeats, delivery reports, and commands.
Gateway Fleet
Register unlimited Android devices. Priority-based routing, health checks, and live status monitoring.
Architecture
How messages flow
A clean, asynchronous pipeline keeps the API fast and delivery resilient.
Client calls API
POST /api/v1/sms/send with a Bearer API key. Phone numbers are validated with Phonelib.
Message queued
SmsMessage is persisted and SendSmsJob is enqueued via Sidekiq. The API returns instantly with a message_id.
Gateway selected
SendSmsJob picks the highest-priority online, active gateway and broadcasts over Action Cable.
Android delivers
The gateway device sends the SMS via its native radio and reports back a delivery status.
Status & webhooks
Delivery/failed status is recorded; webhooks fire for subscribed events. Failed messages auto-retry up to 3×.
Quick Start
Send your first message
Register a gateway device
No auth required — receive a gateway API key back.
curl -X POST https://your-host/api/v1/gateway/register \
-H "Content-Type: application/json" \
-d '{"device_id":"pixel-001","name":"Office Phone"}'
Connect via WebSocket
Keep the device online and ready to receive commands.
wscat -c "ws://your-host:3000/cable?api_key=gw_live_..."
Send an SMS
Use a client API key (api_live_…) in the Authorization header.
-H "Authorization: Bearer api_live_..." \
-H "Content-Type: application/json" \
-d '{"to":"+14155551234","message":"Hello from MySMSAPio!"}'
{
"success": true,
"message_id": "msg_3f8a9c1b2e7d4f60",
"status": "queued"
}
Built on a modern stack
Production-ready by default
Ready to send your first SMS?
Dive into the complete API reference or jump straight into the admin console to manage your gateways.