Renting a number
Rent a number for days or weeks — general, or reserved for one platform — choose the exact offer, read every message, and renew, reset or return it.
A rental keeps one number for a fixed term and receives every message sent to it, for as long as the term lasts. Two kinds:
General — receives from any sender.
Reserved for a platform — a number set aside for one platform (WhatsApp, say), for when a platform will only accept its own.
Find what you can rent
These three calls are public: no API key needed. Without one they show public list prices; send your key to see your account's own prices, which is what a rental will charge you. A wrong key is refused with 403. See Authentication.
- Countries
curl https://numestri.com/api/v1/rental/retrieve_all{ "success": 1, "data": [ { "id": "US", "name": "United States" } ] } - Platforms with reserved numbers (optional)
curl "https://numestri.com/api/v1/rental/retrieve_platforms?id=US"{ "success": 1, "country": "US", "data": [ { "id": "whatsapp", "name": "WhatsApp", "from_price": "3.90", "from_price_cents": 390 } ] } - Terms, prices and options
Add
servicefor a reserved number; leave it out for a general one.curl "https://numestri.com/api/v1/rental/retrieve_pricing?id=US&service=whatsapp"{ "success": 1, "country": "US", "service": { "id": "whatsapp", "name": "WhatsApp" }, "pricing": { "7": "4.94", "30": "12.35" }, "plans": [ { "days": 7, "cost": "4.94", "cost_in_cents": 494, "quality": null, "in_stock": true, "renewable": true, "options": [ { "option": "Qm3tV8xLs0PaWd2E", "provider": "prv_k3Jd9QmXa2", "rank": 1, "cost": "4.94", "in_stock": true, "renewable": true } ] } ] }renewablesays whether the term can be extended on the same number later. Check it before you rent a number you mean to keep.extend(the same map aspricing) is what another term costs.A country with nothing to rent — or nothing reserved for that platform there — is a
404withparam: "id", pointing you back toretrieve_allorretrieve_platforms. An unknownserviceid is a400.
Rent it
Renting, and everything after it, needs an API key.
curl https://numestri.com/api/v1/purchase/rental -H "Authorization: Bearer $NUMESTRI_KEY" \
-d id=US -d days=7 -d service=whatsappParameter | Required | Meaning |
|---|---|---|
| yes | Country code, e.g. |
| yes | A term from |
| no | Platform id for a reserved number. Leave out for a general one. |
| no | An option id from that term: that offer at its price, or |
| no | A provider id: that provider only, its cheapest offer for the term. |
| no | Refuse above this price, in dollars ( |
| no | Header (or |
{
"success": 1,
"rental_code": "SNBW9MPY",
"phonenumber": "15550109876",
"service_id": "whatsapp",
"days": 7,
"expiration_date": 1792736400,
"renewable": true,
"can_extend": true,
"can_reset": true
}Read its messages
curl "https://numestri.com/api/v1/rental/retrieve_messages?rental_code=SNBW9MPY" -H "Authorization: Bearer $NUMESTRI_KEY"{
"success": 1,
"messages": [
{
"sender": "WhatsApp",
"message": "Your code is 553-311",
"code": "553311"
}
]
}Rentals receive whole messages; code is the verification code we found in it. For hands-off delivery, add a webhook — every message fires rental.received.
Keep, fix or return it
Endpoint | Does |
|---|---|
| Buys another term on the same number. Only when |
| Reloads a number that has stopped receiving. Only when |
| Gives the number back. Possible only within a short window and before any message arrives; the response says exactly what was credited. |
| Every rental still inside its term. |