What Is an SMS API and How to Use One
An SMS API lets your code send and receive text messages through a simple HTTPS call instead of a phone in your hand. With SMSNET, one POST sends a message from your own Android number, and replies arrive by polling or webhook. This guide covers the core endpoints, a working example, and the free plan limits.
How does the SMSNET SMS API work?
It is a REST API over HTTPS at https://smsnet.net/api/v1. You authenticate with an API key in the X-API-Key header and send JSON. A POST queues the message, your connected Android phone sends it from your own number, and replies come back through polling or a webhook. If you would rather have an AI agent do the calling, the MCP server guide exposes the same operations as 41 MCP tools.
From POST to handset and back: the four stages of one API message.
What do I need before the first call?
Two things: a connected phone and an API key. Install the SMSNET Gateway app on an Android phone, sign in, and copy the key from the last setup screen into an environment variable. The Android gateway guide walks through each screen, and Get the app has the download. Numbers go in E.164 format (+15551234567), and the recipient should have agreed to hear from you.
How do I send my first SMS?
One POST is the whole send path:
curl -X POST https://smsnet.net/api/v1/messages/send \
-H "X-API-Key: $SMSNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+15551234567", "body": "Your table is ready. Reply STOP to opt out."}'
A successful response returns the message id and your remaining quota:
{
"ok": true,
"message_id": "msg_01j9x8k2...",
"conversation_id": "conv_01j9x8k2...",
"device_id": "dev_01j9x8k2...",
"quota": {
"month": { "used": 13, "limit": 300 },
"day": { "used": 4, "limit": 20 }
}
}
Add "transactional": true to the body only for a message the recipient is waiting on right now, such as a login code. It skips the pacing gap and quiet hours and typically reaches the handset in about a second. Language specific versions of this call are in Send an SMS from Python, Send an SMS from Node.js, and Send an SMS with curl.
What endpoints does the API offer?
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/v1/messages/send | Send one SMS with to, body, and optional transactional |
| GET | /api/v1/messages | List messages; filter with direction=inbound and page with the since cursor |
| GET | /api/v1/conversations | List message threads across your lines |
| GET | /api/v1/contacts | Look up people by phone, as in /api/v1/contacts?phone=+15551234567 |
| GET | /api/v1/campaigns | List bulk sends and their progress |
| GET | /api/v1/webhooks | Show the registered webhook URL and the event types it receives |
| PUT | /api/v1/webhooks | Register or change the webhook URL that receives events |
| POST | /api/v1/webhooks/test | Send a test event to the registered URL before real traffic exists |
How do I receive replies?
Two options. Polling needs no public URL and suits a script: call GET /api/v1/messages?direction=inbound and pass back the next_cursor from each response as since on the next call, so nothing is missed or repeated. A webhook suits a server: register your HTTPS endpoint once with PUT /api/v1/webhooks, keep the secret from the response, and verify the HMAC-SHA256 signature on every delivery. Send a test event with POST /api/v1/webhooks/test first. Working code for both paths is in the Python, Node.js, and curl guides.
What does it cost to start?
The free plan covers 300 messages a month with a daily ceiling of 20, and replies are never counted. When you need more headroom, a 14 day Growth trial raises the ceiling while you measure real volume. Current numbers are on Pricing, and setup starts at Get the app.
FAQ
What is an SMS API?
An SMS API is an HTTPS interface that lets code send and receive text messages without a handset attached to the server. With SMSNET, your program calls the REST API and a connected Android phone does the sending from your own number, so there is no carrier account and no rented number.
How do I send an SMS with the SMSNET API?
POST JSON with to and body to https://smsnet.net/api/v1/messages/send, with your key in the X-API-Key header. The response returns a message_id, the conversation it belongs to, and your remaining quota. Language specific versions are in the Python, Node.js, and curl guides.
How do I receive SMS replies?
Either poll GET /api/v1/messages?direction=inbound with the next_cursor from the previous call, or register an HTTPS endpoint with PUT /api/v1/webhooks and receive message.received events. Webhook requests are signed with HMAC-SHA256 over the timestamp and raw body, and test events are available through POST /api/v1/webhooks/test.
What are the free plan limits?
The free plan covers 300 messages a month with a daily ceiling of 20, and replies are never counted. A 14 day Growth trial is available when you need more headroom. Current prices are on the pricing page.
Do I need a carrier account or a rented number?
No. The sender is an Android phone and SIM you already own, so you text from your own number on your own plan. The API only needs a connected phone and an API key.
Can an AI agent send SMS through the API?
Yes. The MCP server exposes the same send, read, and webhook operations to assistants, so an agent can text, read replies, and manage threads with your approval. Setup is in the MCP server guide.
Related guides
This is the pillar of Cluster 1. Spokes: Send an SMS from Python, Send an SMS from Node.js, Send an SMS with curl, How to Build an SMS OTP Verification Flow, and Best Way to Add SMS to Your App. The phone side is Turn Your Android Phone into an SMS Gateway; the agent route is What Is an MCP Server for SMS?. Comparing costs? SMSNET vs Twilio, SMSNET vs Plivo and SMSNET vs ClickSend. Sending from several phones as one sender is SMS Number Pool.
In other languages: PHP, Java, C#, Go, Ruby and Google Sheets. Before the first send, the free SMS segment counter shows how long a text really is and the E.164 formatter fixes the number format.
Send your first message today
Free plan, no card: 400 messages a month from your own number, with the API, webhooks and MCP included.
Get the app See pricing