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

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

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

Curl

Python

Ruby

Node.js

Javascript

PHP

C#

Java

Powershell

Go

$ curl -X POST https://textbelt.com/text \

--data-urlencode phone = '5555555555' \

--data-urlencode message = 'Hello world' \

-d key = textbelt

import requests

resp = requests . post ( 'https://textbelt.com/text' , {

'phone' : '5555555555' ,

'message' : 'Hello world' ,

'key' : 'textbelt' ,

} )

print ( resp . json ( ) ) Using the popular requests library:

require 'net/http'

require 'uri'



uri = URI . parse ( "https://textbelt.com/text" )

Net : : HTTP . post_form ( uri , {

:phone = > '5555555555' ,

:message = > 'Hello world' ,

:key = > 'textbelt' ,

} )



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 ) ) ;

} ) ;





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 popular request or axios libraries:

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 the browser Fetch API and a CORS request:

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 ) ;

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 ) ; Using the popular Apache HttpComponents library:

$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.