sms4sats API Documentation
Send or Receive SMS programmatically, pay with Lightning.
Last updated
Send or Receive SMS programmatically, pay with Lightning.
Last updated
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
Telegram: pseudozach or https://t.me/sms4sats
Email: [email protected]
Twitter: https://twitter.com/sms4sats
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.
You can easily run the API in postman to understand the parameters and responses by clicking below.
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".
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
Note that at the moment, receive and send prices are static but this may change in the future. Rent price will vary based on country.
country
Number
service
String
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 an array of available services that can be ordered for a country.
country*
Number
Country Code (e.g. 187 for USA)
Use this endpoint to create a receive SMS order for a specific country and service.
POST
https://api2.sms4sats.com/createorder
Create an sms4sats order to be fulfilled.
country*
Number
Country Code (e.g. 187 for USA)
service*
String
Short Code (e.g. vk for vk.com)
isRental
Boolean
set to true if this is for a phone number rental order
realphone
Boolean
set to true if this is for a real phone number that is part of sms4sats network
ref
String
immediate
Boolean
Set to true if you want to deduct the cost of receive from your API Key balance.
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.
Use this endpoint to check the status of an order
GET
https://api2.sms4sats.com/orderstatus
Check an sms4sats order status.
orderId*
String
Order ID returned by the `/createorder` or `/createsendorder` endpoint
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 an sms4sats order and the hold invoice related to it.
orderId*
String
Order ID returned by the `/createorder` endpoint
Use this endpoint to create a send SMS order for a phone number and message.
POST
https://api2.sms4sats.com/createsendorder
Create an sms4sats order to send an SMS message to a phone number.
X-API-Key
String
Optional API Key to use if you want to use a pre-funded account to immediately send the SMS.
message*
String
Message text that you want to send to the phone number.
Max 140 characters.
phone*
String
immediate
Boolean
Set to true if you want to immediately send the SMS and deduct the cost from your API Key balance.
webhookUrl
String
Webhook URL where you want to receive order updates.
Same data as /orderstatus will be sent as POST to this URL.
Use this endpoint to create a send Email order for an email address and message.
POST
https://api2.sms4sats.com/createemailsendorder
Create an sms4sats order to send an Email message to an email address.
X-API-Key
String
Optional API Key to use if you want to use a pre-funded account to immediately send the SMS.
message*
String
Message text that you want to send to the phone number.
Max 140 characters.
immediate
Boolean
Set to true if you want to immediately send the SMS and deduct the cost from your API Key balance.
webhookUrl
String
Webhook URL where you want to receive order updates.
Same data as /orderstatus will be sent as POST to this URL.
If you have an API Key, you can fund your prepaid balance using this endpoint.