SMSPVAdevelopers
Rental API
SMSPVA / DOCUMENTATION

Rental countries

GET /api/rent.php?method=getcountries

SMSPVA API
GEThttps://smspva.com/api/rent.php?method=getcountries

Send a GET request and check status in the JSON response: 1 means success and 0 means failure, even with HTTP 200. If it fails, read msg for the reason.

Authentication

You can call this method without an API key.

Parameters

NameLocationTypeRequiredExampleDescription
methodquerystringYes"getcountries"Method name

How to use this method

Find the countries currently available for number rental. Use a returned code with Rental data or Data by provider to check services, prices and stock.

Request examples

Environment and dependencies. Each example encodes query values and allows 30 seconds for the request. Check HTTP and JSON status before using data. cURL prints the response for you to check; Java uses Jackson to read the JSON.

curl --get --fail-with-body --max-time 30 "https://smspva.com/api/rent.php" \
  --data-urlencode "method=getcountries"

Responses

Check the response that matches your request. Example values and dates are illustrative. Optional fields can depend on the outcome or the response format you selected.

HTTP 200

Success

application/json

Illustrative response

{
  "status": 1,
  "data": [
    {
      "name": "United States",
      "code": "US",
      "url_country_name": "united-states",
      "rent_switch_type": "FAST",
      "rent_avail_prolong": "1"
    }
  ]
}
NameTypeDescription
statusinteger
dataarray<object>
data[].namestringCountry name
data[].codestringCountry code of number Countries list
data[].url_country_namestringCountry slug used in public URLs.
data[].rent_switch_typestringRental availability mode for the country.
data[].rent_avail_prolongstringIndicates whether rental prolongation is available for the country.

On this page