SMSPVAdevelopers
Private Email Rental
SMSPVA / DOCUMENTATION

Providers

GET /api/rent_email.php?method=get_providers

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

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_providers"Method selector.

How to use this method

Get the enabled email providers and use their pcode values to build your selector. Refresh this list rather than keeping a fixed set of codes. A provider can be enabled while having no mailboxes for a particular service.

Use the selected pcode for services and prices, counts and creating an order.

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_email.php" \
  --data-urlencode "method=get_providers"

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": 2,
      "pcode": "gmailcom",
      "name": "Gmail"
    },
    {
      "id": 6,
      "pcode": "outlookcom",
      "name": "Microsoft Outlook"
    }
  ]
}

Error

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

Success

NameTypeDescription
statusinteger(enum: [1])
dataarray<object>
data[].idintegerProvider ID.
data[].pcodestringProvider code used in filters and orders.
data[].namestringDisplay 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