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.

REST · form-urlencoded JSON response MCP-ready No A2P 10DLC No Twilio

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.

From app.sms8.io/api.php · stays in your browser

Leave blank for primary. Use 2|0 for device 2, SIM slot 0.

Ready

          

          

          

          

          

          

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: POST on every endpoint
  • Body: application/x-www-form-urlencoded
  • Response: application/json
  • Auth: key=YOUR_SMS8_API_KEY in the body
Vibe coding shortcut. If you live in Claude Code, Cursor or Windsurf, skip the curl and add the MCP server at 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
Tip. The MCP server at 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"
  }
}
CodeMeaning
400Missing or malformed parameters
401Missing or invalid API key
402Out of message credits
403Action not allowed for this account or plan
404Resource not found (e.g. unknown message ID)
429Rate limit hit, slow down and retry
500Server error, please retry

Enviar SMS & MMS

POST /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.

FieldTypeNotes
keystringAPI key, required
numberstringE.164 phone, or comma-separated list, for the single/blast mode
messagestringMessage body, required with number or listID
messagesJSONArray of {number, message, type, attachments} for true batch mode
listIDintSend to every contact in this list
devicesJSON|intSingle ID, JSON array, or SIM-qualified form "2|0"
option0|1|2See routing: specified, all devices, or all SIMs
useRandomDevice0|1Pick one device at random from the selection
prioritize0|1Jump the queue (OTPs, replies)
typesms|mmsDefaults to sms
attachmentsstringComma-separated image URLs (MMS only)
scheduleunix tsSend 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

POST /services/read-messages.php by ID, group, status, device, time
FieldTypeNotes
keystringAPI key, required
idintGet one message by ID
groupIdstringGroup ID returned at send time, useful for batches
statusstringReceived, Sent, Pending, Failed
deviceIDintFilter by device
simSlotint0 for first SIM, 1 for second
startTimestampunix tsInclusive lower bound
endTimestampunix tsInclusive 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

POST /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

POST /services/manage-contacts.php add, resubscribe, unsubscribe
FieldTypeNotes
keystringAPI key, required
listIDintTarget contacts list, required
numberstringContact phone, required
namestringFriendly name (add only)
resubscribe0|1Resubscribe if previously unsubscribed
unsubscribe0|1Remove from list

Devices

POST /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

POST /services/send-ussd-request.php e.g. *150# to check balance
POST /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.

optionBehaviour
0Use exactly the IDs in devices. SIM slots use the form "2|0" (device 2, SIM 0).
1Use every enabled device, default SIM each. Batch is split across them.
2Use 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 toolWraps
send_sms/services/send.php
send_otpOTP store + /services/send.php
verify_otpOTP store, constant-time compare
get_messages/services/read-messages.php
list_devices/services/get-devices.php
create_webhookuser webhook URL (SSRF-checked)
setup_sms8account + 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