Comment on page

sms4sats API Documentation

Send or Receive SMS programmatically, pay with Lightning.
Instructions on how to use sms4sats.com API to generate sms activation code orders from anywhere, pay with Lightning Bitcoin and receive the activation codes.
Contact

Node Info

Feel free to open a direct channel to our node if you have trouble with routing or let us know and we're happy to open balanced channels to high volume partners.

Postman

You can easily run the API in postman to understand the parameters and responses by clicking below.
Run in Postman

API info

API root is at: https://api2.sms4sats.com. You can also use this endpoint to check for availability.
You may need to use below country code list to map country names into country codes and send this code in certain queries. Normally, API should work with inputs such as country="germany".
Country Code List
const countrymap = [
{
"cc": 999,
"country": "Auto-Select"
},
{
"cc": 0,
"country": "Russia"
},
{
"cc": 0,
"country": "Russian"
},
{
"cc": 1,
"country": "Ukraine"
},
{
"cc": 2,
"country": "Kazakhstan"
},
{
"cc": 3,
"country": "China"
},
{
"cc": 4,
"country": "Philippines"
},
{
"cc": 5,
"country": "Myanmar"
},
{
"cc": 6,
"country": "Indonesia"
},
{
"cc": 7,
"country": "Malaysia"
},
{
"cc": 8,
"country": "Kenya"
},
{
"cc": 9,
"country": "Tanzania"
},
{
"cc": 10,
"country": "Vietnam"
},
{
"cc": 11,
"country": "Kyrgyzstan"
},
{
"cc": 12,
"country": "USA (virtual)"
},
{
"cc": 13,
"country": "Israel"
},
{
"cc": 14,
"country": "HongKong"
},
{
"cc": 15,
"country": "Poland"
},
{
"cc": 16,
"country": "England"
},
{
"cc": 16,
"country": "United Kingdom"
},
{
"cc": 18,
"country": "DCongo"
},
{
"cc": 19,
"country": "Nigeria"
},
{
"cc": 20,
"country": "Macao"
},
{
"cc": 21,
"country": "Egypt"
},
{
"cc": 22,
"country": "India"
},
{
"cc": 23,
"country": "Ireland"
},
{
"cc": 24,
"country": "Cambodia"
},
{
"cc": 25,
"country": "Laos"
},
{
"cc": 26,
"country": "Haiti"
},
{
"cc": 27,
"country": "Ivory"
},
{
"cc": 28,
"country": "Gambia"
},
{
"cc": 29,
"country": "Serbia"
},
{
"cc": 30,
"country": "Yemen"
},
{
"cc": 31,
"country": "Southafrica"
},
{
"cc": 32,
"country": "Romania"
},
{
"cc": 33,
"country": "Colombia"
},
{
"cc": 34,
"country": "Estonia"
},
{
"cc": 36,
"country": "Canada"
},
{
"cc": 37,
"country": "Morocco"
},
{
"cc": 38,
"country": "Ghana"
},
{
"cc": 39,
"country": "Argentina"
},
{
"cc": 40,
"country": "Uzbekistan"
},
{
"cc": 41,
"country": "Cameroon"
},
{
"cc": 42,
"country": "Chad"
},
{
"cc": 43,
"country": "Germany"
},
{
"cc": 44,
"country": "Lithuania"
},
{
"cc": 45,
"country": "Croatia"
},
{
"cc": 46,
"country": "Sweden"
},
{
"cc": 47,
"country": "Iraq"
},
{
"cc": 48,
"country": "Netherlands"
},
{
"cc": 49,
"country": "Latvia"
},
{
"cc": 50,
"country": "Austria"
},
{
"cc": 51,
"country": "Belarus"
},
{
"cc": 52,
"country": "Thailand"
},
{
"cc": 53,
"country": "Saudiarabia"
},
{
"cc": 54,
"country": "Mexico"
},
{
"cc": 55,
"country": "Taiwan"
},
{
"cc": 56,
"country": "Spain"
},
{
"cc": 58,
"country": "Algeria"
},
{
"cc": 59,
"country": "Slovenia"
},
{
"cc": 60,
"country": "Bangladesh"
},
{
"cc": 61,
"country": "Senegal"
},
{
"cc": 62,
"country": "Turkey"
},
{
"cc": 63,
"country": "Czech"
},
{
"cc": 64,
"country": "Srilanka"
},
{
"cc": 65,
"country": "Peru"
},
{
"cc": 66,
"country": "Pakistan"
},
{
"cc": 67,
"country": "Newzealand"
},
{
"cc": 68,
"country": "Guinea"
},
{
"cc": 69,
"country": "Mali"
},
{
"cc": 70,
"country": "Venezuela"
},
{
"cc": 71,
"country": "Ethiopia"
},
{
"cc": 72,
"country": "Mongolia"
},
{
"cc": 73,
"country": "Brazil"
},
{
"cc": 74,
"country": "Afghanistan"
},
{
"cc": 75,
"country": "Uganda"
},
{
"cc": 76,
"country": "Angola"
},
{
"cc": 77,
"country": "Cyprus"
},
{
"cc": 78,
"country": "France"
},
{
"cc": 79,
"country": "Papua"
},
{
"cc": 80,
"country": "Mozambique"
},
{
"cc": 81,
"country": "Nepal"
},
{
"cc": 82,
"country": "Belgium"
},
{
"cc": 83,
"country": "Bulgaria"
},
{
"cc": 84,
"country": "Hungary"
},
{
"cc": 85,
"country": "Moldova"
},
{
"cc": 86,
"country": "Italy"
},
{
"cc": 87,
"country": "Paraguay"
},
{
"cc": 88,
"country": "Honduras"
},
{
"cc": 89,
"country": "Tunisia"
},
{
"cc": 90,
"country": "Nicaragua"
},
{
"cc": 91,
"country": "Timorleste"
},
{
"cc": 92,
"country": "Bolivia"
},
{
"cc": 93,
"country": "Costarica"
},
{
"cc": 94,
"country": "Guatemala"
},
{
"cc": 95,
"country": "Uae"
},
{
"cc": 96,
"country": "Zimbabwe"
},
{
"cc": 97,
"country": "Puertorico"
},
{
"cc": 99,
"country": "Togo"
},
{
"cc": 100,
"country": "Kuwait"
},
{
"cc": 101,
"country": "Salvador"
},
{
"cc": 102,
"country": "Libyan"
},
{
"cc": 103,
"country": "Jamaica"
},
{
"cc": 104,
"country": "Trinidad"
},
{
"cc": 105,
"country": "Ecuador"
},
{
"cc": 106,
"country": "Swaziland"
},
{
"cc": 107,
"country": "Oman"
},
{
"cc": 108,
"country": "Bosnia"
},
{
"cc": 109,
"country": "Dominican"
},
{
"cc": 111,
"country": "Qatar"
},
{
"cc": 112,
"country": "Panama"
},
{
"cc": 114,
"country": "Mauritania"
},
{
"cc": 115,
"country": "Sierraleone"
},
{
"cc": 116,
"country": "Jordan"
},
{
"cc": 117,
"country": "Portugal"
},
{
"cc": 118,
"country": "Barbados"
},
{
"cc": 119,
"country": "Burundi"
},
{
"cc": 120,
"country": "Benin"
},
{
"cc": 121,
"country": "Brunei"
},
{
"cc": 122,
"country": "Bahamas"
},
{
"cc": 123,
"country": "Botswana"
},
{
"cc": 124,
"country": "Belize"
},
{
"cc": 125,
"country": "Caf"
},
{
"cc": 126,
"country": "Dominica"
},
{
"cc": 127,
"country": "Grenada"
},
{
"cc": 128,
"country": "Georgia"
},
{
"cc": 129,
"country": "Greece"
},
{
"cc": 130,
"country": "Guineabissau"
},
{
"cc": 131,
"country": "Guyana"
},
{
"cc": 132,
"country": "Iceland"
},
{
"cc": 133,
"country": "Comoros"
},
{
"cc": 134,
"country": "Saintkitts"
},
{
"cc": 135,
"country": "Liberia"
},
{
"cc": 136,
"country": "Lesotho"
},
{
"cc": 137,
"country": "Malawi"
},
{
"cc": 138,
"country": "Namibia"
},
{
"cc": 139,
"country": "Niger"
},
{
"cc": 140,
"country": "Rwanda"
},
{
"cc": 141,
"country": "Slovakia"
},
{
"cc": 142,
"country": "Suriname"
},
{
"cc": 143,
"country": "Tajikistan"
},
{
"cc": 144,
"country": "Monaco"
},
{
"cc": 145,
"country": "Bahrain"
},
{
"cc": 146,
"country": "Reunion"
},
{
"cc": 147,
"country": "Zambia"
},
{
"cc": 148,
"country": "Armenia"
},
{
"cc": 149,
"country": "Somalia"
},
{
"cc": 150,
"country": "Congo"
},
{
"cc": 151,
"country": "Chile"
},
{
"cc": 152,
"country": "Furkinafaso"
},
{
"cc": 153,
"country": "Lebanon"
},
{
"cc": 154,
"country": "Gabon"
},
{
"cc": 155,
"country": "Albania"
},
{
"cc": 156,
"country": "Uruguay"
},
{
"cc": 157,
"country": "Mauritius"
},
{
"cc": 158,
"country": "Bhutan"
},
{
"cc": 159,
"country": "Maldives"
},
{
"cc": 160,
"country": "Guadeloupe"
},
{
"cc": 161,
"country": "Turkmenistan"
},
{
"cc": 162,
"country": "Frenchguiana"
},
{
"cc": 163,
"country": "Finland"
},
{
"cc": 164,
"country": "Saintlucia"
},
{
"cc": 165,
"country": "Luxembourg"
},
{
"cc": 166,
"country": "Saintvincentgrenadines"
},
{
"cc": 167,
"country": "Equatorialguinea"
},
{
"cc": 168,
"country": "Djibouti"
},
{
"cc": 169,
"country": "Antiguabarbuda"
},
{
"cc": 170,
"country": "Caymanislands"
},
{
"cc": 171,
"country": "Montenegro"
},
{
"cc": 173,
"country": "Switzerland"
},
{
"cc": 174,
"country": "Norway"
},
{
"cc": 175,
"country": "Australia"
},
{
"cc": 176,
"country": "Eritrea"
},
{
"cc": 177,
"country": "Southsudan"
},
{
"cc": 178,
"country": "Saotomeandprincipe"
},
{
"cc": 179,
"country": "Aruba"
},
{
"cc": 180,
"country": "Montserrat"
},
{
"cc": 181,
"country": "Anguilla"
},
{
"cc": 183,
"country": "Northmacedonia"
},
{
"cc": 184,
"country": "Seychelles"
},
{
"cc": 185,
"country": "Newcaledonia"
},
{
"cc": 186,
"country": "Capeverde"
},
{
"cc": 187,
"country": "USA"
},
{
"cc": 187,
"country": "United States"
},
{
"cc": 187,
"country": "United States of America"
},
{
"cc": 189,
"country": "Fiji"
},
{
"cc": 190,
"country": "Southkorea"
},
{
"cc": 195,
"country": "Bermuda"
},
{
"cc": 196,
"country": "Singapore"
}
];

Getting Prices

Use this endpoint to check the price (in satoshis) that user will need to pay to use services offered by this API.
get
https://api2.sms4sats.com
/price
Get Receive/Send/Rent Price (in satoshis)

Getting Available Services

Use this endpoint to check for available numbers to receive activation codes for each offered service for a specific country.
get
https://api2.sms4sats.com
/getnumbersstatus
Get Available Services

Creating a Receive Order

Use this endpoint to create a receive SMS order for a specific country and service.
post
https://api2.sms4sats.com
/createorder
Create Receive Order
sms4sats uses hold invoices for payment, this means:
  • When invoice is paid by the user, it's not finalized but HELD by the sms4sats Lightning Node.
  • For receive orders, Only when an activation code is successfully received the invoice is SETTLED.
  • For send orders, Only when SMS status is "sent or delivered" the invoice is SETTLED.
  • If no code is received within 20 minutes, invoice will be CANCELED and funds will automatically return to user's wallet.

Getting Order Status

Use this endpoint to check the status of an order
get
https://api2.sms4sats.com
/orderstatus
Get Order Status

Canceling a Receive Order

Use this endpoint to cancel a receive order after 2 minutes in case no sms is received.
Note: all orders without a code will be automatically canceled after 21 minutes.
get
https://api2.sms4sats.com
/cancelorder
Cancel Order

Creating a Send Order

Use this endpoint to create a send SMS order for a phone number and message.
post
https://api2.sms4sats.com
/createsendorder
Create Send Order

Funding an Account

If you have an API Key, you can fund your prepaid balance using this endpoint.
post
https://api2.sms4sats.com
/fund
Create Fund Order

Getting Account Balance

Use this endpoint to check the balance of an account
get
https://api2.sms4sats.com
/balance
Get Balance

Getting Account History

Use this endpoint to check the funding history of an account
get
https://api2.sms4sats.com
/history
Get History
Get in touch for volume discounts: [email protected].
Last modified 8mo ago