SMSAny API documentation
Quick start
Create a key → buy numbers → read SMS. Orders and wallet are shared with the website. Funds are held on purchase and charged once on the first valid SMS.
Prepare your key and balance
Sign in, create an API key and fund your wallet. Send X-API-Key in every request header. Enter parameters in URL Params and leave Body empty.
Manage API keysBuy numbers
Set service (service code), country (country code) and maxPrice (maximum USD price per number). count defaults to 1, up to 20, subject to the server limit.
Omit line for automatic selection, or set it to a line code such as line-01. Alternatively select by routeId alone; do not combine it with service, country or line.
Find services, countries and linesSave order numbers and read SMS
Each number has its own order. Check each data.items status: SUCCESS has a number; FAILED includes error; RESULT_UNKNOWN requires checking the original order, not repurchasing. Save orderNumber; separate multiple order numbers with commas when querying SMS.
Empty items means no messages on this page. Read subsequent pages using nextCursor before starting a fresh poll; deduplicate by messageId. Each SMS identifies its order and phone number. Check order status for expiry.
Read SMS reference
Purchases wait up to 10 seconds (the server may shorten this). Check each batch result. After a timeout or lost response, check orders first; see Retries & order states