SMSOnline API Doc
  1. Order API
SMSOnline API Doc
  • Preparation
  • FAQ
  • V3
    • Customer API
      • Payments
        • Cryptocurrency via Cryptomus
          • Create new payment
          • Get direct wallet
          • Get transaction status
        • Credit Card via Pay4bit
          • Create new payment
      • Favourites
        • Get favourite services
        • Toggle favourite status
      • Get Account Balance
      • Get invoices
      • Get Coupons
    • Phones API
      • Lookup API
        • Get service list by country and carrier
        • Get service detail by country and carrier
      • Inventory API
        • Get inventory
      • Order API
        • Order a number
          PUT
        • Get order data
          GET
        • Change order status
          PATCH
      • Get Popular list
        GET
      • Get all available countries/carriers
        GET
    • Statistics API
      • Get statistics
  • V2(Deprecated)
    • Warning: V2 API is deprecated
    • Account
      • Get Balance
      • Make a top-up with crypto
      • (Get direct wallet address) Make a top-up with crypto
    • Lookup
      • Get Available Countries
      • Get Available Services
      • Get Service Details
      • Get the country stats with success rates
    • Manage phone numbers
      • Purchase Number
      • Return Number
      • Request Another SMS
      • Get Status of A Single Number
      • Get Bulk Status of Numbers With Conditions
  1. Order API

Order a number

Developing
PUT
https://api-x.smsonline.cloud/v3/numbers/{userId}/order
Purchase a telephone number by specifying the country, service and carrier.

Request

Path Params
userId
string 
required
Body Params application/json
apiKey
string 
required
country
string 
required
Internal country code
service
string 
required
Internal service name
carrier
string 
required
carrier name
maximumPrice
string 
required
Prices provided by the Lookup API.
m
string 
required
Hash(m) provided by the Lookup API.
n
string 
required
Hash(n) provided by the Lookup API.
failover
boolean 
optional
If the parameter is set to true and the purchase attempt fails, the system will automatically try accessing a different provider within the same request. This increases the likelihood of successfully acquiring a phone number with fewer purchase attempts, but it may result in a slower response time.
If not specified, it will be interpreted as true.
Example
{
    "apiKey":"",
    "country":"",
    "service":"",
    "carrier":"",
    "maximumPrice":"",
    "m":"",
    "n":""
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api-x.smsonline.cloud/v3/numbers//order' \
--header 'Content-Type: application/json' \
--data-raw '{
    "apiKey":"",
    "country":"",
    "service":"",
    "carrier":"",
    "maximumPrice":"",
    "m":"",
    "n":""
}'

Responses

🟢200Success
application/json
Body
ok
boolean 
required
body
object 
required
orderId
string 
required
Order Id
phoneNumber
string 
required
Assigned telephone number (E.164)
expiredAtUTC
string 
required
Estimated expiration date
purchasePrice
integer 
required
Actual cost of the purchase
Example
{
    "ok": true,
    "body": {
        "orderId": "1",
        "phoneNumber": "86123456789",
        "expiredAtUTC": "2025-05-17 06:07:13",
        "purchasePrice": 16
    }
}
🟢222Additional action required
Modified at 2025-06-10 13:35:38
Previous
Get inventory
Next
Get order data
Built with