Send and receive SMS with a simple, clean API

Textbelt is a no-nonsense SMS API built for developers who just want to send and receive SMS.

Thousands of clients prefer Textbelt over other SMS providers for our ease of setup, simple, predictable pricing packages, and personal support.

Create an API key   View pricing

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

$ curl -X POST https://textbelt.com/text \
--data-urlencode phone='5555555555' \
--data-urlencode message='Hello world' \
-d key=textbelt
Using the popular requests library:
import requests
resp = requests.post('https://textbelt.com/text', {
'phone': '5555555555',
'message': 'Hello world',
'key': 'textbelt',
})
print(resp.json())
require 'net/http'
require 'uri'

uri = URI.parse("https://textbelt.com/text")
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');
request.post('https://textbelt.com/text', {
form: {
phone: '5555555555',
message: 'Hello world',
key: 'textbelt',
},
}, (err, httpResponse, body) => {
console.log(JSON.parse(body));
});

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

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

string result = System.Text.Encoding.UTF8.GetString(response);
}
$ch = curl_init('https://textbelt.com/text');
$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);
curl_close($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("https://textbelt.com/text");
httpPost.setEntity(new UrlEncodedFormEntity(Arrays.asList(data)));
HttpResponse httpResponse = httpClient.execute(httpPost);

String responseString = EntityUtils.toString(httpResponse.getEntity());
JSONObject response = new JSONObject(responseString);
$body = @{
"phone"="5555555555"
"message"="Hello World"
"key"="textbelt"
}
$submit = Invoke-WebRequest -Uri https://textbelt.com/text -Body $body -Method Post
import (
"net/http"
"net/url"
)

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

http.PostForm("https://textbelt.com/text", values)
}

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

Simple, transparent pricing

No extra subscriptions or gotchas such as phone number fees, minimum spend requirements, and charges for special use cases.

One flat rate per continent

No phone number management

No recurring billing

Reliable everywhere

Textbelt chooses the best network routes to ensure delivery, even when it costs us more.

We're experts at negotiating headaches like carrier filtering and rerouting.

Who we are

We believe in offering a quality service with skilled, transparent support that can communicate at your desired level of technical detail. Textbelt is based in San Mateo, California. Learn more about us.

Textbelt's roots are in free software and open source. We began in 2012 as a free, open source library for sending SMS. We continue to maintain an open-source SMS gateway while offering a reliable and hands-off commercial option.

Our open-source and commercial products have delivered hundreds of millions of SMS on behalf of over ten thousand customers, ranging from developer to small businesses to enterprises.

Get started

Create an API key to start sending and receiving SMS, or view the documentation to see the full API. Any questions? Email support@textbelt.com, text +1 (650) 332-4607, or read the FAQ.

Get a Textbelt API key View documentation