SMSPVAdevelopers
Private Email Rental
SMSPVA / DOCUMENTATION

Services & prices

GET /api/rent_email.php?method=get_data

SMSPVA API
GEThttps://smspva.com/api/rent_email.php?method=get_data

Send a GET request and check JSON status, even with HTTP 200: 1 means success, 0 means failure, and 2 means no mailbox was available when creating a rental. Error details may be in msg, errormsg and errorid.

Authentication

You can call this method without an API key.

Parameters

NameLocationTypeRequiredExampleDescription
methodquerystringYes"get_data"Method selector.
pcodequerystringNo"outlookcom"Provider code from Get Providers. Omit this parameter entirely to use all providers; do not send an empty value or null.

How to use this method

Find services, daily prices and mailbox counts. Pass a pcode from Providers to filter by provider, or omit it for totals across enabled providers. Use the service’s scode when creating a rental.

Prices are in USD. The months_discount applies to periods of at least 30 days. Alias access is available only for Gmail. Refresh counts whenever the selected provider changes.

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.

Set SMSPVA_EMAIL_PCODE to a current provider code to select it; leave it unset or empty to omit pcode entirely. Provider and service codes come from the live lists.

provider_args=()
if [ -n "${SMSPVA_EMAIL_PCODE:-}" ]; then provider_args=(--data-urlencode "pcode=$SMSPVA_EMAIL_PCODE"); fi
curl --get --fail-with-body --max-time 30 "https://smspva.com/api/rent_email.php" \
  --data-urlencode "method=get_data" \
  "${provider_args[@]}"

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

Check status in the JSON even when HTTP is 200. Examples use illustrative values.

application/json

Success (illustrative)

{
  "status": 1,
  "data": [
    {
      "count": 40,
      "scode": "twitter",
      "sname": "Twitter",
      "price": 0.1,
      "alias_price": 0.25,
      "icon": "/templates/SMSv1EN/images/ico/twitter.png",
      "months_discount": 20
    }
  ]
}

Error

{
  "status": 0,
  "msg": "Provider not found"
}

Success

NameTypeDescription
statusinteger(enum: [1])
dataarray<object>
data[].countintegerAvailable mailbox count.
data[].scodestringService code used to create an order.
data[].snamestringService display name.
data[].pricenumberDaily rental price in USD.
data[].alias_pricenumberAlias access price. Aliases are supported only for Gmail.
data[].iconstringService icon path.
data[].months_discountintegerPercentage discount for rental periods of at least 30 days.

Required: status, data

Error

Some errors include errorid and errormsg; others contain only msg. Check all available error fields.

NameTypeDescription
statusinteger(enum: [0])
erroridintegerOptional structured error code.
errormsgstringOptional error description.
msgstringError message.

On this page