SMSPVAdevelopers
Activation V2
SMSPVA / API REFERENCE

Block number

Mark the number associated with an order as nonworking.

SMSPVA API
PUThttps://api.smspva.com/activation/blocknumber/{orderid}

This request can change an order or incur charges. The examples do not retry it automatically. Reading a newly received SMS can trigger payment, even though the method uses GET.

Authentication

NameLocationTypeRequiredDescription
apikeyheaderstringYesYour API key

Parameters

NameLocationTypeRequiredDescription
orderidpathintegerYesOrder ID

No request body is required.

How to use this method

Mark the number for this orderid as nonworking.

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_ORDER_ID: orderid (required).
: "${SMSPVA_API_KEY:?Set SMSPVA_API_KEY}"
: "${SMSPVA_ORDER_ID:?Set SMSPVA_ORDER_ID to your orderid}"
curl --fail-with-body --max-time 30 --request PUT \
  --url "https://api.smspva.com/activation/blocknumber/${SMSPVA_ORDER_ID}" \
  --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
200Successful operation
405Invalid number format
406Order ID format is invalid or not found
411API access limited by low karma or ratelimits
501Server failed to process request.
503The server is overloaded and experiencing performance issues. Please try later.
HTTP 200

Successful operation

Illustrative response

{
  "statusCode": 200,
  "data": {
    "orderId": 123456
  }
}

Response fields

NameTypeDescription
statusCodeintegerResult status code
dataobjectResponse data
data.orderIdintegerOrder ID
HTTP 405

Invalid number format

Illustrative response

{
  "statusCode": 405,
  "error": {
    "type": "INVALID_PARAMS",
    "description": "Invalid params."
  }
}

Response fields

NameTypeDescription
statusCodeintegerResult status code
errorobjectResponse data
error.typestringError type
error.descriptionstringError description
HTTP 406

Order ID format is invalid or not found

Illustrative response

{
  "statusCode": 406,
  "error": {
    "type": "ORDER_NOT_FOUND",
    "description": "Order not found."
  }
}

Response fields

NameTypeDescription
statusCodeintegerResult status code
errorobjectResponse data
error.typestringError type
error.descriptionstringError description
HTTP 411

API access limited by low karma or ratelimits

Illustrative response

{
  "statusCode": 411,
  "error": {
    "type": "ACCESS_LIMITED",
    "description": "Access is temporary limited."
  }
}

Response fields

NameTypeDescription
statusCodeintegerResult status code
errorobjectError data
error.typestringError type
error.descriptionstringError description
HTTP 501

Server failed to process request.

Illustrative response

{
  "statusCode": 501,
  "error": {
    "type": "SERVER_FAIL",
    "description": "Server failed to process request"
  }
}

Response fields

NameTypeDescription
statusCodeintegerResult status code
errorobjectResponse data
error.typestringError type
error.descriptionstringError description
HTTP 503

The server is overloaded and experiencing performance issues. Please try later.

Illustrative response

{
  "statusCode": 503,
  "error": {
    "type": "SERVER_BUSY",
    "description": "Server overload, try later."
  }
}

Response fields

NameTypeDescription
statusCodeintegerResult status code
errorobjectError data
error.typestringError type
error.descriptionstringError description

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

On this page