Send and receive SMS with a clean, simple API

Textbelt is a no-nonsense SMS API built for developers who just want to send SMS. Thousands of customers prefer Textbelt over other SMS providers for our ease of setup, simple, predictable pricing packages, and personal support.

Create an API key   Start developing

No recurring billing, unnecessary add-ons, or client libraries.

$ curl -X POST \
--data-urlencode phone='5555555555' \
--data-urlencode message='Hello world' \
-d key=textbelt
Using the popular requests library:
import requests
resp ='', {
'phone': '5555555555',
'message': 'Hello world',
'key': 'textbelt',
require 'net/http'
require 'uri'

uri = URI.parse("")
Net::HTTP.post_form(uri, {
:phone => '5555555555',
:message => 'Hello world',
:key => 'textbelt',
Using the popular request or axios libraries:
// Using request
const request = require('request');'', {
form: {
phone: '5555555555',
message: 'Hello world',
key: 'textbelt',
}, (err, httpResponse, body) => {

// Using axios
const axios = require('axios');'', {
phone: '5555555555',
message: 'Hello world',
key: 'textbelt',
}).then(response => {
Using the browser Fetch API and a CORS request:
fetch('', {
method: 'post',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
phone: '5555555555',
message: 'Hello world',
key: 'textbelt',
}).then(response => {
return response.json();
}).then(data => {
using System;
using System.Collections.Specialized;
using System.Net;

using (WebClient client = new WebClient())
byte[] response = client.UploadValues("", new NameValueCollection() {
{ "phone", "5555555555" },
{ "message", "Hello world" },
{ "key", "textbelt" },

string result = System.Text.Encoding.UTF8.GetString(response);
$ch = curl_init('');
$data = array(
'phone' => '5555555555',
'message' => 'Hello world',
'key' => 'textbelt',

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
Using the popular Apache HttpComponents library:
final NameValuePair[] data = {
new BasicNameValuePair("phone", "5555555555"),
new BasicNameValuePair("message", "Hello world"),
new BasicNameValuePair("key", "textbelt")
HttpClient httpClient = HttpClients.createMinimal();
HttpPost httpPost = new HttpPost("");
httpPost.setEntity(new UrlEncodedFormEntity(Arrays.asList(data)));
HttpResponse httpResponse = httpClient.execute(httpPost);

String responseString = EntityUtils.toString(httpResponse.getEntity());
JSONObject response = new JSONObject(responseString);
$body = @{
"message"="Hello World"
$submit = Invoke-WebRequest -Uri -Body $body -Method Post
import (

func main() {
values := url.Values{
"phone": {"5555555555"},
"message": {"Hello world"},
"key": {"textbelt"},

http.PostForm("", values)

Try it now: use key=textbelt to send 1 free text per day. Create your own key to send more messages afterwards.

Textbelt offers open-source and paid versions:

Using the Textbelt API

Textbelt is a simple API. The best way to get started is to try it yourself, or view the documentation here.

Here's an example success response after sending an SMS:

{"success": true, "quotaRemaining": 40, "textId": 12345}

Example out-of-quota or invalid key response:

{"success": false, "quotaRemaining": 0, "error": "Out of quota"}

Example response to request with phone, message, or key missing:

{"success": false, "error": "Incomplete request"}

Look up text delivery status

Using the textId given by a successful sent text, load /status/<textId>. For example, if your textId is 12345:

$ curl

{"status": "DELIVERED"}

Possible return values include DELIVERED (carrier has confirmed sending), SENT (sent to carrier but confirmation receipt not available), SENDING (queued or dispatched to carrier), FAILED (not received), and UNKNOWN (could not determine status).

Delivery statuses are not standardized between mobile carriers. For example, some carriers will report SMS as "delivered" when they attempt transmission to the handset while other carriers actually report delivery receipts from the handsets.

Receiving SMS replies

U.S. phone numbers only: Textbelt lets you receive replies after you've sent an SMS. Replies are sent by webhook, meaning you will have to set up an HTTP or HTTPS route on your website that will process inbound SMS.

Add a replyWebhookUrl parameter to your HTTP request. For example:

$ curl -X POST \
--data-urlencode phone='5555555555' \
--data-urlencode message='Hello?' \
-d replyWebhookUrl='' \
-d key=textbelt

Textbelt will POST the following JSON to your endpoint (in this case

"fromNumber": "+1555123456",
"text": "Here is my reply"

Read more for another example.

Checking your quota

Use /quota/<key> to view remaining quota. For example, if your key is abc123:

$ curl

{"success": true, "quotaRemaining": 98}

Testing your key

If you want to validate your key without actually using your text quota, append "_test" to your key and you will receive a response from the /text endpoint confirming that a text would send, but it will not consume your credits.

Get started

Create an API key to start sending and receiving SMS.

Generate an API key View documentation

Get in touch

Any questions? Email or read the FAQ.