SMSPVAdevelopers
Activation V2
SMSPVA / API REFERENCE

Message type settings

Check which message types are enabled for a country, service and operator.

SMSPVA API
GEThttps://api.smspva.com/activation/countryservicesettings

Authentication

NameLocationTypeRequiredDescription
apikeyheaderstringYesYour API key

Parameters

No path or query parameters. No request body.

How to use this method

Check which message types are allowed for your combination of country, service and operator. Send the apikey header; no path or query parameters are needed. The response contains all rules in ascending setting-ID order, without the IDs themselves.

Each non-empty condition must match your combination; an empty string matches any value. A matching rule with more non-empty conditions takes priority. For example, a country-and-service rule overrides a country-only rule, and a matching operator condition makes it more specific still. Use all three flags from the selected rule together: sms, caller and voice use 1 for enabled and 0 for disabled.

If no rule matches, all three types are enabled. An empty data array is a successful response with no configured rules. These permissions do not guarantee available numbers.

The voice query parameter used for prices and number requests has a separate meaning: 0 SMS, 1 caller-ID, 2 voice call. Use the same type when comparing prices and ordering. Check number counts for stock.

Request examples

Runtime requirements and environment setup. cURL uses a POSIX shell. JavaScript and TypeScript run in Node.js. Java uses the standard HTTP client and prints raw JSON; use your application’s JSON library to inspect the body.

: "${SMSPVA_API_KEY:?Set SMSPVA_API_KEY}"
curl --fail-with-body --max-time 30 --request GET \
  --url "https://api.smspva.com/activation/countryservicesettings" \
  --header "apikey: $SMSPVA_API_KEY"

Responses

The examples below show the response format. Prices, stock and account values are sample data; use the API response for current values.

HTTPDescription
200Message-type settings. An empty list is a successful result.
400The apikey header is missing, empty or shorter than 30 characters.
401No user was found for the supplied API key.
402The request rate limit was exceeded. This API uses HTTP 402 for this error.
403The user is banned.
500Internal server error. The description may contain a specific exception message when error details are enabled.
HTTP 200

Message-type settings. An empty list is a successful result.

Service-wide and country-specific rules

{
  "statusCode": 200,
  "data": [
    {
      "country": "",
      "service": "opt20",
      "operator": "",
      "voice": 0,
      "caller": 0,
      "sms": 1
    },
    {
      "country": "FR",
      "service": "opt20",
      "operator": "",
      "voice": 1,
      "caller": 0,
      "sms": 1
    }
  ]
}

No configured rules

{
  "statusCode": 200,
  "data": []
}

Response fields

NameTypeDescription
statusCodeinteger(enum: [200])
dataarray<object>
data[].countrystringCountry code to match, or an empty string for any country.
data[].servicestringService code to match, or an empty string for any service.
data[].operatorstringOperator code to match, or an empty string for any operator.
data[].voiceintegerVoice calls: 1 = enabled, 0 = disabled. (enum: [0,1])
data[].callerintegerCaller-ID: 1 = enabled, 0 = disabled. (enum: [0,1])
data[].smsintegerSMS: 1 = enabled, 0 = disabled. (enum: [0,1])
HTTP 400

The apikey header is missing, empty or shorter than 30 characters.

Illustrative response

{
  "statusCode": 400,
  "error": {
    "type": "APIKEY_NOT_SET",
    "description": "No ApiKey found"
  }
}

Response fields

NameTypeDescription
statusCodeinteger(enum: [400])
errorobject
error.typestring
error.descriptionstring
HTTP 401

No user was found for the supplied API key.

Illustrative response

{
  "statusCode": 401,
  "error": {
    "type": "USER_NOT_FOUND",
    "description": "Not found"
  }
}

Response fields

NameTypeDescription
statusCodeinteger(enum: [401])
errorobject
error.typestring
error.descriptionstring
HTTP 402

The request rate limit was exceeded. This API uses HTTP 402 for this error.

Illustrative response

{
  "statusCode": 402,
  "error": {
    "type": "RATELIMIT_EXCEED",
    "description": "Request ratelimit exeeded"
  }
}

Response fields

NameTypeDescription
statusCodeinteger(enum: [402])
errorobject
error.typestring
error.descriptionstring
HTTP 403

The user is banned.

Illustrative response

{
  "statusCode": 403,
  "error": {
    "type": "USER_BANNED",
    "description": "User banned"
  }
}

Response fields

NameTypeDescription
statusCodeinteger(enum: [403])
errorobject
error.typestring
error.descriptionstring
HTTP 500

Internal server error. The description may contain a specific exception message when error details are enabled.

Illustrative response

{
  "statusCode": 500,
  "error": {
    "type": "SERVER_ERROR",
    "description": "An internal error has occurred while processing your request."
  }
}

Response fields

NameTypeDescription
statusCodeinteger(enum: [500])
errorobject
error.typestring
error.descriptionstring

If a connection fails during an order-changing request, check the order before trying again.

On this page