Phone number rental API
Rent numbers, read incoming SMS, extend and cancel from your own code. JSON over HTTPS with one API key from the console.
- Base URL
- https://snsnumber.com/api/v1
- Authentication
- Authorization: Bearer snk_...
- Rate limit
- 300 requests per minute per key
Create the key in the console under API. Prices are in US dollars as strings with two decimals. Times are ISO 8601 in UTC.
Endpoints
GET
/balanceYour credit in US dollars.{ "balance": "120.00", "currency": "USD" }GET
/prices?country=usCountries, periods and prices. Leave out country for all.{ "currency": "USD", "countries": [ { "country": "us", "name": "United States", "dial": "+1",
"periods": [ { "days": 15, "price": "36.00" }, { "days": 30, "price": "54.00" } ] } ] }POST
/rentalsRent a number. Body: country and days.curl -X POST https://snsnumber.com/api/v1/rentals -H "Authorization: Bearer snk_..." \
-H "Content-Type: application/json" -d '{"country":"us","days":30}'
{ "rental": { "id": "RN-7KQ2M9XWD4", "country": "us", "phone": "+14155550123", "state": "active",
"days": 30, "ends_at": "2026-12-03T10:00:00.000Z", "can_cancel": true, "messages": [] } }GET
/rentals?state=activeYour rentals, newest first (state: active, expired, canceled).{ "rentals": [ { "id": "RN-7KQ2M9XWD4", "phone": "+14155550123", "state": "active", "message_count": 2 } ] }GET
/rentals/{id}One rental with its inbox.{ "rental": { "id": "RN-7KQ2M9XWD4", "messages": [ { "id": 18, "sender": "Verify",
"text": "Your verification code is 482913.", "code": "482913", "received_at": "2026-11-03T10:01:12.000Z" } ] } }POST
/rentals/{id}/extendAdd a period to an active rental. Body: days.{"days":15} -> { "rental": { "id": "RN-7KQ2M9XWD4", "extensions": 1, "ends_at": "2026-12-18T10:00:00.000Z" } }POST
/rentals/{id}/cancelFull refund within 20 minutes while no SMS has arrived.{ "rental": { "id": "RN-7KQ2M9XWD4", "state": "canceled" } }Errors
Errors return an HTTP status and { "error": { "code", "message" } }.
| Status | Code | Meaning |
|---|---|---|
| 401 | no_key, bad_key | Missing or wrong API key |
| 402 | no_balance | Not enough credit |
| 404 | not_found | Rental not found |
| 409 | ended, cancel_denied | Rental ended, or the cancel window has passed |
| 429 | rate_limited, too_many_active | 300 requests per minute, or 20 active numbers |
| 503 | network_error | Try again in a moment |