SMSPVAdevelopers
SMSPVA / DOCUMENTATION

Quickstart

From API key to your first response, with no number purchase required.

SMSPVA API

1. Get your API key

Sign in to SMSPVA and open Profile and ApiKey from the account menu.

Save your key as a server environment variable so your application can read it without storing it in source code. Keep it out of public browser code and repositories.

export SMSPVA_API_KEY="YOUR_API_KEY"

2. Read your balance

Activation V2 uses the base URL https://api.smspva.com and the apikey request header.

Run the cURL example in a POSIX shell (macOS, Linux or WSL); on Windows, the JavaScript and Python examples work from PowerShell. JavaScript requires Node.js 22.16+; Python uses only the standard library (Python 3.10+).

curl --fail-with-body --max-time 30 \
  'https://api.smspva.com/activation/balance' \
  --header "apikey: $SMSPVA_API_KEY"

3. Understand the result

{
  "statusCode": 200,
  "data": { "balance": "10.50" }
}

Your response will contain your own account balance. The balance field is a string, so keep it as text when displaying the amount.

Before using data, check the HTTP response and any API error. A missing key or a key of invalid length returns HTTP 400 with APIKEY_NOT_SET. If the request times out, you have no confirmed API result.

Next steps

Read the full balance reference, explore the SDK plan, or see MCP and Markdown access.

Continue with the activation workflow, the complete Activation V2 reference, or the eight-language examples guide. Do not automatically retry purchases after a timeout: the first request may have succeeded.

On this page