SMSPVAdevelopers
Private Email Rental
SMSPVA / DOCUMENTATION

Examples & setup

SMSPVA API

Every method page has examples in the same eight languages. Choose a live service and your own IDs; placeholder IDs are not runnable orders. Set only the environment variables relevant to that method.

Runtime

LanguageEnvironment
cURLBash, cURL 7.76+; inspect JSON status in the printed response
JavaScript / TypeScriptNode.js 22+; TypeScript 5+ with Node types
PythonPython 3.10+, standard library
PHPPHP 8.1+ and ext-curl
GoGo 1.22+, standard library
C#.NET 8+, console application
JavaJava 11+, Jackson Databind on the classpath

Java uses Jackson to validate JSON status. Maven dependency (Maven Central):

<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-databind</artifactId>
  <version>2.22.4</version>
</dependency>
# Bash / macOS / Linux
export SMSPVA_API_KEY='YOUR_API_KEY'
export SMSPVA_EMAIL_SCODE='CODE_FROM_LIVE_SERVICES'
export SMSPVA_EMAIL_ORDER_ID='YOUR_EMAIL_ORDER_ID'
export SMSPVA_EMAIL_MESSAGE_ID='ID_FROM_GET_MAILS'
export SMSPVA_EMAIL_ALIAS_ID='ID_FROM_ORDER_ALIASES'
# Optional: set SMSPVA_EMAIL_PCODE from get_providers; unset means any provider.
unset SMSPVA_EMAIL_PCODE
$env:SMSPVA_API_KEY = 'YOUR_API_KEY'
$env:SMSPVA_EMAIL_SCODE = 'CODE_FROM_LIVE_SERVICES'
$env:SMSPVA_EMAIL_ORDER_ID = 'YOUR_EMAIL_ORDER_ID'
$env:SMSPVA_EMAIL_MESSAGE_ID = 'ID_FROM_GET_MAILS'
$env:SMSPVA_EMAIL_ALIAS_ID = 'ID_FROM_ORDER_ALIASES'
Remove-Item Env:SMSPVA_EMAIL_PCODE -ErrorAction SilentlyContinue
VariableParameter
SMSPVA_EMAIL_DTYPEdtype, default week
SMSPVA_EMAIL_DCOUNTdcount, default 1
SMSPVA_EMAIL_Tt, page size, default 50
SMSPVA_EMAIL_Ss, offset, default 0
SMSPVA_EMAIL_SQsq, search, example verification
SMSPVA_EMAIL_PCODEpcode, omitted unless non-empty

Run the cURL examples in Bash. For Java, save the file as Example.java; for Go, use main.go; for C#, use Program.cs in a .NET console project. Compile TypeScript before running it. The other examples read your environment variables directly.

Requests use URL encoding and a 30-second timeout. Account keys go in the query string, so remove them from public request logs. Public reference methods send no key, even if one is set in your environment.

Use email IDs from your own account. The examples do not retry paid requests automatically: check the order before repeating a request whose result is uncertain.

On this page