Create Send Order
Create an order to send an SMS message to a phone number.
POST https://api2.sms4sats.com/createsendorder
Creates an order to send an SMS message to any E.164 phone number. Returns a Lightning invoice to pay, or immediately sends the SMS if using a pre-funded API Key.
Headers
X-API-Key
String
No
API Key for pre-funded account. Required if immediate: true.
Request Body
message
String
Yes
Message text to send. Maximum 140 characters.
immediate
Boolean
No
Set to true to send immediately and deduct cost from your API Key balance.
{
status: 'OK',
orderId: '7dc6e6b61d8c54dff6b8d6ea2e3f08b018e57963df81d493a6f9728c4dc83318',
payreq: 'lnbc30u1p34yef6pp5... | paid'
}{
status: 'error',
reason: 'backend error'
}Response Fields
status
String
OK on success
payreq
String
BOLT11 Lightning invoice, or "paid" if immediate: true and payment was deducted from balance
Checking Delivery Status
Use Get Order Status with the returned orderId to monitor send progress. The smsStatus field will reflect created → sent → delivered (or failed).
For send orders, the hold invoice is only settled once the SMS status is sent or delivered. If delivery fails, the invoice is canceled and funds returned.
Last updated