SMSPVAdevelopers
Private Email Rental
SMSPVA / DOCUMENTATION

Active orders

GET /api/rent_email.php?method=get_orders

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

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

Send apikey as a required query parameter.

Parameters

NameLocationTypeRequiredExampleDescription
apikeyquerystringYesSMSPVA_API_KEYAccount API key. Reading messages and managing a rental require the order owner's key.
methodquerystringYes"get_orders"Method selector.

How to use this method

Find active mailbox rentals, message counts and available aliases. The email address is named address in this response; Create rental calls it email.

Use the order ID to read messages or extend the rental. Gmail orders may include aliases[].id for buying alias access; Outlook does not support aliases. Completed rentals are in Archived orders.

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.

: "${SMSPVA_API_KEY:?Set SMSPVA_API_KEY}"
curl --get --fail-with-body --max-time 30 "https://smspva.com/api/rent_email.php" \
  --data-urlencode "method=get_orders" \
  --data-urlencode "apikey=$SMSPVA_API_KEY"

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": [
    {
      "id": 123456,
      "address": "[email protected]",
      "scode": "twitter",
      "pcode": "outlookcom",
      "expireDate": 1855324800,
      "mesCount": 1,
      "aliases": [],
      "sname": "Twitter"
    },
    {
      "id": 123457,
      "address": "[email protected]",
      "scode": "twitter",
      "pcode": "gmailcom",
      "expireDate": 1855324800,
      "mesCount": 0,
      "aliases": [
        {
          "id": 88,
          "address": "[email protected]",
          "mesCount": 1,
          "isPaid": false
        }
      ],
      "sname": "Twitter"
    }
  ]
}

Error

{
  "status": 0,
  "msg": "Incorrect apikey"
}

Success

NameTypeDescription
statusinteger(enum: [1])
dataarray<object>
data[].idintegerOrder ID.
data[].addressstringEmail address. This field is named email in the create_order response.
data[].scodestringService code.
data[].pcodestringProvider code.
data[].expireDateintegerRental expiry as a Unix timestamp in seconds.
data[].mesCountintegerMessage count.
data[].aliasesarray<object>
data[].aliases[].idintegerExisting alias ID. Pass this as aliasid.
data[].aliases[].addressstringAlias email address.
data[].aliases[].mesCountintegerMessage count for this alias.
data[].aliases[].isPaidbooleanWhether access to this alias has been paid for.
data[].snamestringService display name.

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