API de pasarela SMS para vibe coders
SMS8 es una pasarela SMS pensada para desarrolladores y construida sobre tu propio Android. Envía SMS, MMS, OTPs y USSD desde Claude Code, Cursor, Windsurf o curl. Una clave, una URL base y JSON en ambos sentidos.
Probador en vivo
Try the SMS gateway right here. Paste your API key, fill in a phone and message, hit Send. We will POST to /services/send.php on your behalf and show the real JSON response, then switch tabs to grab the exact request as curl, PHP, JavaScript, Python or as a Claude Code / Cursor prompt.
Probar y copiar
Sends one real SMS. Uses 1 credit. Your API key never leaves your browser. The request goes directly to app.sms8.io.
Overview
The SMS8 SMS gateway exposes a single host with one endpoint per capability. There are no path parameters and no nested resources. Every action is a flat POST with form-encoded fields.
- Base URL:
https://app.sms8.io/services/ - Method:
POSTon every endpoint - Body:
application/x-www-form-urlencoded - Response:
application/json - Auth:
key=YOUR_SMS8_API_KEYin the body
mcp.sms8.io so your AI assistant calls these endpoints for you. See AI tools.
Authentication
Every request sends the API key in the POST body. The key is per-account and authorises every endpoint. Grab it from the API page of your dashboard at app.sms8.io/api.php and regenerate any time. Old keys are invalidated immediately.
# every request
key=YOUR_SMS8_API_KEY
mcp.sms8.io accepts the same key as a Bearer header (Authorization: Bearer YOUR_SMS8_API_KEY). Useful when the tool only supports header-based auth.
Your first SMS
Send a message to one number from a paired Android using the primary device. Replace YOUR_SMS8_API_KEY and the destination number.
curl https://app.sms8.io/services/send.php \ -d "key=YOUR_SMS8_API_KEY" \ -d "number=+11234567890" \ -d "message=Hello from SMS8"
Response shape
Every endpoint wraps its payload in a success envelope.
{
"success": true,
"data": {
"messages": [
{
"ID": "1",
"number": "+11234567890",
"message": "Hello from SMS8",
"deviceID": "1",
"simSlot": "0",
"status": "Pending",
"type": "sms",
"sentDate": "2026-05-24T10:30:00+00:00",
"deliveredDate": null,
"groupID": "…"
}
]
}
}
Errors
On failure, success is false and the body carries a structured error:
{
"success": false,
"error": {
"code": 401,
"message": "Invalid API key"
}
}
| Code | Meaning |
|---|---|
| 400 | Missing or malformed parameters |
| 401 | Missing or invalid API key |
| 402 | Out of message credits |
| 403 | Action not allowed for this account or plan |
| 404 | Resource not found (e.g. unknown message ID) |
| 429 | Rate limit hit, slow down and retry |
| 500 | Server error, please retry |
Enviar SMS & MMS
/services/send.php
single, batch, list broadcast, MMS
One endpoint covers four send modes: single message, batch (different message per number), broadcast to a contacts list, and MMS with attachments. Pick the mode by which fields you send.
| Field | Type | Notes |
|---|---|---|
| key | string | API key, required |
| number | string | E.164 phone, or comma-separated list, for the single/blast mode |
| message | string | Message body, required with number or listID |
| messages | JSON | Array of {number, message, type, attachments} for true batch mode |
| listID | int | Send to every contact in this list |
| devices | JSON|int | Single ID, JSON array, or SIM-qualified form "2|0" |
| option | 0|1|2 | See routing: specified, all devices, or all SIMs |
| useRandomDevice | 0|1 | Pick one device at random from the selection |
| prioritize | 0|1 | Jump the queue (OTPs, replies) |
| type | sms|mms | Defaults to sms |
| attachments | string | Comma-separated image URLs (MMS only) |
| schedule | unix ts | Send at this future timestamp |
Send a batch with one call
curl https://app.sms8.io/services/send.php \ -d "key=YOUR_SMS8_API_KEY" \ -d 'messages=[{"number":"+1...","message":"hi 1"},{"number":"+1...","message":"hi 2"}]' \ -d "option=2"
Broadcast to a contacts list
curl https://app.sms8.io/services/send.php \ -d "key=YOUR_SMS8_API_KEY" \ -d "listID=1" \ -d "message=Sale ends tonight"
Leer mensajes
/services/read-messages.php
by ID, group, status, device, time
| Field | Type | Notes |
|---|---|---|
| key | string | API key, required |
| id | int | Get one message by ID |
| groupId | string | Group ID returned at send time, useful for batches |
| status | string | Received, Sent, Pending, Failed |
| deviceID | int | Filter by device |
| simSlot | int | 0 for first SIM, 1 for second |
| startTimestamp | unix ts | Inclusive lower bound |
| endTimestamp | unix ts | Inclusive upper bound |
# last 24h of received SMS on SIM 0 of device 8 curl https://app.sms8.io/services/read-messages.php \ -d "key=YOUR_SMS8_API_KEY" \ -d "status=Received" \ -d "deviceID=8" \ -d "simSlot=0" \ -d "startTimestamp=$(( $(date +%s) - 86400 ))"
Resend
/services/resend.php
retry by ID, group, status
Same filter shape as read-messages. Retry one ID, every message in a group, or every message of a given status in a time window.
Contacts
/services/manage-contacts.php
add, resubscribe, unsubscribe
| Field | Type | Notes |
|---|---|---|
| key | string | API key, required |
| listID | int | Target contacts list, required |
| number | string | Contact phone, required |
| name | string | Friendly name (add only) |
| resubscribe | 0|1 | Resubscribe if previously unsubscribed |
| unsubscribe | 0|1 | Remove from list |
Devices
/services/get-devices.php
list paired Android devices
Returns every enabled device with model, SIM slots and primary flag. Useful before constructing devices on a send call.
USSD
/services/send-ussd-request.php
e.g. *150# to check balance
/services/read-ussd-requests.php
look up sent USSD requests
Run a carrier USSD code on a paired device and read back the response. Handy for prepaid balance checks and operator menus.
Inbound webhooks
Set a webhook URL on the API page of your dashboard. SMS8 will POST every received SMS to that URL with an HMAC-SHA256 signature, so your receiver can verify the payload came from SMS8 and was not tampered with.
From AI tools, register the webhook via the MCP create_webhook tool. It validates the URL against an SSRF block-list before saving.
Device & SIM routing
Every send endpoint takes the same routing controls. Mix them to load-balance across phones and SIMs.
| option | Behaviour |
|---|---|
| 0 | Use exactly the IDs in devices. SIM slots use the form "2|0" (device 2, SIM 0). |
| 1 | Use every enabled device, default SIM each. Batch is split across them. |
| 2 | Use every enabled device and every SIM. Maximum throughput on dual-SIM phones. |
Set useRandomDevice=1 to pick exactly one sender from the selection at random, useful for OTPs.
Scheduling
Pass schedule as a unix timestamp to defer a send. Schedule the same message to many numbers, or send a batch on a future date. Both work.
Credit balance
Call /services/send.php with only the key field. The response's credits field returns the remaining credits or "Unlimited".
Use it from Claude Code, Cursor & Windsurf
SMS8 ships an MCP server at mcp.sms8.io that wraps every REST endpoint above in a JSON-RPC tool. Same API key, no separate account.
// ~/.config/claude/mcp-servers.json (Claude Code) // ~/.cursor/mcp.json (Cursor) // ~/.codeium/windsurf/mcp_config.json (Windsurf) { "mcpServers": { "sms8": { "url": "https://mcp.sms8.io", "transport": "http", "headers": { "Authorization": "Bearer YOUR_SMS8_API_KEY" } } } }
| MCP tool | Wraps |
|---|---|
| send_sms | /services/send.php |
| send_otp | OTP store + /services/send.php |
| verify_otp | OTP store, constant-time compare |
| get_messages | /services/read-messages.php |
| list_devices | /services/get-devices.php |
| create_webhook | user webhook URL (SSRF-checked) |
| setup_sms8 | account + devices handshake |
PHP SDK
The dashboard at app.sms8.io/api.php renders a complete PHP class with your API key prefilled. It includes sendSingleMessage, sendMessages, sendMessageToContactsList, getMessageByID, getMessagesByStatus, resendMessageByID, addContact, unsubscribeContact, getBalance, sendUssdRequest, getDevices.
$msg = sendSingleMessage("+11234567890", "Hello from SMS8"); $msg = sendSingleMessage("+11234567890", "From device 1", 1); $msg = sendSingleMessage("+11234567890", "From SIM 0", "1|0"); $msg = sendSingleMessage("+11234567890", "In 2 min", null, strtotime("+2 minutes"));
C# SDK
A complete C# API class is also prefilled on the dashboard. Same surface as the PHP SDK, ready for .NET / Unity / Xamarin projects.
SMS.API.SendSingleMessage("+11234567890", "Hello from SMS8"); var msg = SMS.API.SendSingleMessage("+11234567890", "From device 1", "1"); var msgs = SMS.API.SendMessages(messages, SMS.API.Option.USE_ALL_SIMS);
curl recipes
# Send and prioritize an OTP-style message curl https://app.sms8.io/services/send.php \ -d "key=YOUR_SMS8_API_KEY" \ -d "number=+11234567890" \ -d "message=Your code is 482910" \ -d "prioritize=1" \ -d "devices=1" # Get message credits curl https://app.sms8.io/services/send.php \ -d "key=YOUR_SMS8_API_KEY" # Add a contact and resubscribe if they exist curl https://app.sms8.io/services/manage-contacts.php \ -d "key=YOUR_SMS8_API_KEY" \ -d "listID=1" \ -d "number=+11234567890" \ -d "name=Alex" \ -d "resubscribe=1"
Preguntas frecuentes
What is the SMS8 SMS gateway API?
An HTTP API that sends SMS and MMS, manages contacts, runs USSD, and reads your inbox. Every endpoint is a POST under https://app.sms8.io/services/ authenticated with a key parameter. Messages route through a paired Android phone so there is no A2P 10DLC and no per-message fee.
How do I use this from Claude Code, Cursor or Windsurf?
Add the MCP server at mcp.sms8.io to your AI tool with your SMS8 API key as a Bearer token. The MCP wraps the same REST endpoints in JSON-RPC tools like send_sms, send_otp and verify_otp. See the AI tools section.
Can I send without a Twilio number?
Yes. SMS8 uses your own Android phone and SIM card as the gateway. No Twilio number, no A2P 10DLC registration, no per-message carrier fees.
How do I receive inbound SMS?
Set a webhook URL on the API page of your dashboard. SMS8 POSTs every received SMS to that URL with an HMAC signature so you can verify the payload.
What rate limits apply?
SMS throughput is bounded by the speed of your paired devices and your plan's monthly volume. The OTP flow adds a hard cap of 5 codes per phone per 24h plus a configurable resend cooldown.
How do I rotate the API key?
Regenerate it from the dashboard at app.sms8.io/api.php. The old key is invalidated immediately.
Build your first integration
Sign up free, pair your Android, grab your key, ship.
Crear cuenta gratis Read OTP docs