One key. REST and MCP.
Order disposable numbers and read SMS / OTP codes from your code, or let an AI agent do it over the Model Context Protocol. Same Bearer key, pay per code, automatic refund if a code never lands.
Authentication
Generate a key in your dashboard and send it as a Bearer token on every request. The same key authenticates both the REST API and the MCP server.
Authorization: Bearer $ASMS_KEYREST API
Base URL https://asms.ai. All responses are JSON.
/api/v1/balanceCurrent wallet balance.
{ "balance": 12.50, "currency": "USD" }/api/v1/otp/services?country=usAvailable services for a country, with live stock and retail price.
{ "country": "us",
"services": [ { "service": "telegram", "price": 0.50, "stock": 240 } ] }/api/v1/otp/orderAllocate a number and debit the wallet. Body: { country, service }.
{ "activationId": "12345",
"phoneNumber": "+1•••••••",
"price": 0.50, "balance": 12.00 }/api/v1/otp/sms?id=12345Poll for the code. Returns null until the SMS arrives.
{ "sms": { "code": "504913",
"text": "Your code is 504913" } }# order a US number for telegram
curl -X POST https://asms.ai/api/v1/otp/order \
-H "Authorization: Bearer $ASMS_KEY" \
-d '{"service":"telegram","country":"us"}'
# poll until the code lands (id from the order above)
curl "https://asms.ai/api/v1/otp/sms?id=12345" \
-H "Authorization: Bearer $ASMS_KEY"MCP server
ASMS ships a native Model Context Protocol server so Claude and other agents can verify accounts on their own: get pricing, order a number, and read the code, all from the wallet you fund. Streamable HTTP, stateless, authenticated with your Bearer key.
{ "mcpServers": {
"asms": {
"url": "https://asms.ai/mcp",
"headers": { "Authorization": "Bearer $ASMS_KEY" }
} } }Tools
| Tool | Description |
|---|---|
get_balance | Get the current wallet balance for the authenticated account. |
get_pricing | Get the retail price per OTP activation for a service in a country. Omit `service` to list prices for every available service. |
get_inventory | Get how many numbers are in stock for a service in a country. Omit `service` to list stock for every available service. |
create_otp_order | Buy a number to receive an OTP. Allocates a number, debits the wallet, and returns an orderId + phoneNumber. Then poll with poll_sms. WARNING: this spends real wallet balance. |
poll_sms | Check for the SMS / OTP code on an order. Returns the code once it has arrived, otherwise an empty result — poll again after a few seconds. |
list_active_orders | List recent OTP orders for the account (awaiting a code or already received). |
cancel_order | Cancel an OTP order that is still awaiting a code and refund its cost to the wallet. |
Start receiving codes
Top up a wallet, generate a key, and you are live. No subscription, refund on any code that does not arrive.
Last updated June 28, 2026