SMSPVAdevelopers
Rental API
SMSPVA / DOCUMENTATION

Default services

GET /api/rent.php?method=get_default_services

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

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"get_default_services"Method name

How to use this method

Get the rental API’s default service list. For prices and available numbers in a particular country, use Rental data or Data by provider.

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=get_default_services"

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": "WhatsApp",
      "service": "opt20",
      "priceForDay": "0.20",
      "img": "images/ico/whatsapp.png",
      "DAYP": "30",
      "PROC": "30"
    }
  ]
}
NameTypeDescription
statusintegerStatus of the response: 1 for success, 0 for failure
dataarray<object>
data[].namestringService name.
data[].servicestringService code.
data[].priceForDaystringDaily rental price, returned as a string.
data[].imgstringService icon path.
data[].DAYPstringRental pricing setting returned by the server.
data[].PROCstringRental pricing setting returned by the server.
msgstringError message when status is 0.

On this page