{
  "openapi": "3.0.0",
  "info": {
    "title": "SMSPVA Activation V2",
    "version": "1.0.0",
    "description": "Activation V2 subset of the published SMSPVA documentation. API methods, status codes, fields and schemas are preserved."
  },
  "servers": [
    {
      "url": "https://smspva.com"
    }
  ],
  "paths": {
    "/activation/operators/{country}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Operators",
        "operationId": "activation_operators",
        "description": "Get a list of available mobile operators for a specific country. This method returns all operators that provide services in the selected country.\n\nOperator names may include SMSpva operators and donor operators from external providers. Donor operator codes can look like `DonorAlpha_UK`. Donor operators work in API requests the same way as regular operators, but the numbers are supplied by external services, not directly by SMSpva. External provider numbers may be less consistent than SMSpva numbers; SMSpva uses real SIM cards and stands behind their quality. If a donor operator shows `9999` available numbers, the exact count is unknown and availability may be effectively unlimited.\n",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "description": "Country code",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "UK"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "country": {
                          "description": "Country code",
                          "type": "string",
                          "example": "UK"
                        },
                        "operators": {
                          "description": "List of available operators",
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "Operator code. It can be a regular SMSpva operator or a donor operator from an external provider.",
                            "example": "DonorAlpha_UK"
                          }
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "No ApiKey found",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 400
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "APIKEY_NOT_SET"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "No ApiKey found"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/operators/UK \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/operators/UK\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/operators/UK',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/operators/UK\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/conversions/{service}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Conversion Rates",
        "description": "Get a list of countries with SMS reception conversion rates (quality indicators) for a specific service. The conversion rate indicates the likelihood of successfully receiving SMS for that service in each country.",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "description": "Service code",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "opt1"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "service": {
                          "description": "Service code",
                          "type": "string",
                          "example": "opt1"
                        },
                        "conversions": {
                          "description": "Map of countries to conversion rates",
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer",
                            "description": "Quality indicator (0-3, where 3 is the best quality)",
                            "minimum": 0,
                            "maximum": 3
                          },
                          "example": {
                            "UA": 3,
                            "KZ": 2,
                            "RU": 3
                          }
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "No ApiKey found",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 400
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "APIKEY_NOT_SET"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "No ApiKey found"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/conversions/opt1 \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/conversions/opt1\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/conversions/opt1',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/conversions/opt1\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/serviceprice/{country}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Country Operator Prices",
        "operationId": "activation_country_operator_prices",
        "description": "Get a list of all available services with their prices and operator details for a specific country. This includes the base price for each service and individual operator prices.\n\nChoose a country from the [Data List](/#tag/activation_v2_lists). Check [Country Number Counts](/#operation/activation_country_number_counts) for availability and [Operators](/#operation/activation_operators) for operator codes before using [Get Number by Operator](/#operation/activation_get_number_by_operator).\n\nOperator price maps may include donor operators from external providers. Donor operator codes can look like `DonorAlpha_UK`. Donor operators work in API requests the same way as regular operators, but the numbers are supplied by external services, not directly by SMSpva. External provider numbers may be less consistent than SMSpva numbers; SMSpva uses real SIM cards and stands behind their quality. If a donor operator shows `9999` available numbers, the exact count is unknown and availability may be effectively unlimited.\n",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "description": "Country code",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "UK"
          },
          {
            "name": "voice",
            "in": "query",
            "description": "Number type: 0 - SMS, 1 - caller-ID, 2 - voice call. Defaults to 0.",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 0
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "s": {
                            "description": "Service code",
                            "type": "string",
                            "example": "opt0"
                          },
                          "sd": {
                            "description": "Service description",
                            "type": "string",
                            "example": "myopinions & erewards"
                          },
                          "c": {
                            "description": "Country code",
                            "type": "string",
                            "example": "UK"
                          },
                          "p": {
                            "description": "Base price for the service",
                            "type": "string",
                            "example": "0.58"
                          },
                          "po": {
                            "description": "Map of operator names to their prices for this service",
                            "type": "object",
                            "additionalProperties": {
                              "type": "string",
                              "description": "Operator price"
                            },
                            "example": {
                              "Hutchison_UK": "0.58",
                              "ASDA_UK": "0.58",
                              "Vodafone_UK": "0.65"
                            }
                          }
                        }
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "No ApiKey found",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 400
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "APIKEY_NOT_SET"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "No ApiKey found"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://api.smspva.com/activation/serviceprice/UK?voice=SOME_INTEGER_VALUE' \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/serviceprice/UK?voice=SOME_INTEGER_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/serviceprice/UK',\n  qs: {voice: 'SOME_INTEGER_VALUE'},\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/serviceprice/UK?voice=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/number/{country}/{service}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_fast_start",
          "activation_v2_all_methods"
        ],
        "summary": "Get Number",
        "operationId": "activation_get_number",
        "description": "Get a number for country and service\n\nChoose country and service codes from the [Data List](/#tag/activation_v2_lists). Before ordering, check [Service Price](/#operation/activation_service_price) and [Country Number Counts](/#operation/activation_country_number_counts). Compare options using [Country Operator Prices](/#operation/activation_country_operator_prices) or [Service Prices by Country](/#operation/activation_service_prices_by_country).\n\nCheck [Get Message Type Settings](/#operation/activation_country_service_settings) for message-type permissions. After receiving a number, pass its `orderId` to [Receive SMS](/#operation/activation_receive_sms) to retrieve the result.\n",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "description": "Country 2 symbols name in ISO 3166-2 format, uppercase. <br> <a href='/#tag/activation_v2_lists/Countries-list'>Countries list</a>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "BD"
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service code. <br> <a href='/#tag/activation_v2_lists/Services-list'>Services list</a>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "opt20"
          },
          {
            "name": "voice",
            "in": "query",
            "description": "Number type: 0 - SMS, 1 - caller-ID, 2 - voice call. Defaults to 0.",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 0
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "orderId": {
                          "description": "Order ID",
                          "type": "integer",
                          "example": 123456
                        },
                        "phoneNumber": {
                          "description": "Phone number without country code",
                          "type": "integer",
                          "example": 9876544321
                        },
                        "countryCode": {
                          "description": "Country code according ITU-T E.123 & E.164 <br> <a href='/#tag/activation_v2_lists/Countries-list'>Countries list</a>",
                          "type": "string",
                          "example": "BD"
                        },
                        "orderExpireIn": {
                          "description": "Order expiration time in seconds",
                          "type": "integer",
                          "example": 600
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "INVALID_PARAMS"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Invalid params."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "407": {
            "description": "Your balance is too low to receive sms for selected country and service.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 407
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "LOW_BALANCE"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Low balance."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "411": {
            "description": "API access limited by low karma or ratelimits",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 411
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "ACCESS_LIMITED"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Access is temporary limited."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Failed to fetch number",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 500
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "NUMBER_FETCH_FAIL"
                        },
                        "description": {
                          "type": "string",
                          "example": "Failed to fetch number"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "501": {
            "description": "Number not found",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 501
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "PRICE_FETCH_FAIL"
                        },
                        "description": {
                          "description": "Failed to fetch price",
                          "type": "string",
                          "example": "Failed to fetch price"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "502": {
            "description": "Number not found.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 502
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "NUMBER_NOT_FOUND"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Number not found."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "Server overload, try later.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 503
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_BUSY"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server overload, try later."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://api.smspva.com/activation/number/BD/opt20?voice=SOME_INTEGER_VALUE' \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/number/BD/opt20?voice=SOME_INTEGER_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/number/BD/opt20',\n  qs: {voice: 'SOME_INTEGER_VALUE'},\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/number/BD/opt20?voice=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/number/{country}/{service}/{operator}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_fast_start",
          "activation_v2_all_methods"
        ],
        "summary": "Get Number by Operator",
        "operationId": "activation_get_number_by_operator",
        "description": "Get a number for the selected country, service, and mobile operator.\n\nChoose country and service codes from the [Data List](/#tag/activation_v2_lists). Before ordering, check [Service Price](/#operation/activation_service_price) and [Country Number Counts](/#operation/activation_country_number_counts). Compare options using [Country Operator Prices](/#operation/activation_country_operator_prices) or [Service Prices by Country](/#operation/activation_service_prices_by_country).\n\nCheck [Get Message Type Settings](/#operation/activation_country_service_settings) for message-type permissions. After receiving a number, pass its `orderId` to [Receive SMS](/#operation/activation_receive_sms) to retrieve the result.\n\nGet valid operator codes for your country from [Operators](/#operation/activation_operators). Pass the returned code in `operator`.\n\nThe `operator` path parameter can be a regular SMSpva operator or a donor operator from an external provider. Donor operator codes can look like `DonorAlpha_UK`. Donor operators work in API requests the same way as regular operators, but the numbers are supplied by external services, not directly by SMSpva. External provider numbers may be less consistent than SMSpva numbers; SMSpva uses real SIM cards and stands behind their quality.\n",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "description": "Country 2 symbols name in ISO 3166-2 format, uppercase. <br> <a href='/#tag/activation_v2_lists/Countries-list'>Countries list</a>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "BD"
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service code. <br> <a href='/#tag/activation_v2_lists/Services-list'>Services list</a>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "opt20"
          },
          {
            "name": "operator",
            "in": "path",
            "description": "Operator code. Regular and donor operators are accepted.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Grameenphone_BD"
          },
          {
            "name": "voice",
            "in": "query",
            "description": "Number type: 0 - SMS, 1 - caller-ID, 2 - voice call. Defaults to 0.",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 0
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "orderId": {
                          "description": "Order ID",
                          "type": "integer",
                          "example": 123456
                        },
                        "phoneNumber": {
                          "description": "Phone number without country code",
                          "type": "integer",
                          "example": 9876544321
                        },
                        "countryCode": {
                          "description": "Country code according ITU-T E.123 & E.164 <br> <a href='/#tag/activation_v2_lists/Countries-list'>Countries list</a>",
                          "type": "string",
                          "example": "BD"
                        },
                        "orderExpireIn": {
                          "description": "Order expiration time in seconds",
                          "type": "integer",
                          "example": 600
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "INVALID_PARAMS"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Invalid params."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "407": {
            "description": "Your balance is too low to receive sms for selected country and service."
          },
          "411": {
            "description": "API access limited by low karma or ratelimits"
          },
          "500": {
            "description": "Failed to fetch number"
          },
          "501": {
            "description": "Number not found"
          },
          "502": {
            "description": "Number not found."
          },
          "503": {
            "description": "Server overload, try later."
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://api.smspva.com/activation/number/BD/opt20/Grameenphone_BD?voice=SOME_INTEGER_VALUE' \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/number/BD/opt20/Grameenphone_BD?voice=SOME_INTEGER_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/number/BD/opt20/Grameenphone_BD',\n  qs: {voice: 'SOME_INTEGER_VALUE'},\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/number/BD/opt20/Grameenphone_BD?voice=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/sms/{orderid}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_fast_start",
          "activation_v2_all_methods"
        ],
        "summary": "Receive SMS",
        "operationId": "activation_receive_sms",
        "description": "Receive SMS with service activation code\n\nAlso returns voice-call and caller-ID results for the specified order.\n\n### Result type\nThe type is selected when requesting the number:\n\n| Number request | Result |\n| --- | --- |\n| `voice=0` | SMS |\n| `voice=1` | Caller-ID |\n| `voice=2` | Voice call |\n\nSend the order ID to this endpoint. No `voice` parameter is needed here.\n\n### Response fields\nAll types use the same JSON structure. Provider values are passed through unchanged:\n\n| Provider field | Response field |\n| --- | --- |\n| `text` | `data.sms.code` |\n| `sms` | `data.sms.fullText` |\n\nSee the HTTP `200` examples for each result type. HTTP `202` means the result is still pending.\n\nUse the `orderId` returned when requesting a number. Current order IDs are also available in [Orders](/#operation/activation_orders).\n",
        "parameters": [
          {
            "name": "apikey",
            "in": "header",
            "description": "Your API key",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "yourapikeyhere"
          },
          {
            "name": "partnerkey",
            "in": "header",
            "description": "Optional partner key for referral accounting. It is used only when SMS is received successfully.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "yourpartnerkeyhere"
          },
          {
            "name": "orderid",
            "in": "path",
            "description": "ID of order received in number response",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "sms": {
                          "description": "Received SMS content",
                          "properties": {
                            "code": {
                              "description": "Provider text field, passed through unchanged. Its content depends on the message type and provider; it is not always a verification code.",
                              "type": "string",
                              "example": "1234"
                            },
                            "fullText": {
                              "description": "Provider sms field, passed through unchanged. May contain SMS text, voice-call text with a recording link, a recording link alone, or caller-ID content.",
                              "type": "string",
                              "example": "Your activation code is 1234. Don't tell it anybody"
                            }
                          },
                          "type": "object"
                        },
                        "orderId": {
                          "description": "Order ID",
                          "type": "integer",
                          "example": 123456
                        },
                        "orderExpireIn": {
                          "description": "Order expiration time in seconds",
                          "type": "integer",
                          "example": 600
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                },
                "examples": {
                  "sms": {
                    "summary": "SMS (voice=0)",
                    "value": {
                      "statusCode": 200,
                      "data": {
                        "sms": {
                          "code": "123456",
                          "fullText": "Your verification code is 123456"
                        },
                        "orderId": 123456,
                        "orderExpireIn": 420
                      }
                    }
                  },
                  "voice": {
                    "summary": "Voice call (voice=2)",
                    "description": "Illustrative voice-call result. `fullText` contains text and a recording link in the format `VOICE: ...; The file: ...`.\n\nThe content of `code` depends on the provider and is not confirmed; a numeric verification code is not guaranteed.\n",
                    "value": {
                      "statusCode": 200,
                      "data": {
                        "sms": {
                          "code": "<provider text value>",
                          "fullText": "VOICE: Your code is 123456; The file: https://link.smspva.com/EXAMPLE_RECORD_ID"
                        },
                        "orderId": 123456,
                        "orderExpireIn": 420
                      }
                    }
                  },
                  "voiceLink": {
                    "summary": "Voice call - link only (voice=2)",
                    "description": "Possible format: `fullText` may contain only a recording link. This variant is not confirmed, so do not rely on a fixed text format.\n\n`code` is a placeholder for the provider's unchanged `text` value.\n",
                    "value": {
                      "statusCode": 200,
                      "data": {
                        "sms": {
                          "code": "<provider text value>",
                          "fullText": "https://link.smspva.com/EXAMPLE_RECORD_ID"
                        },
                        "orderId": 123456,
                        "orderExpireIn": 420
                      }
                    }
                  },
                  "callerId": {
                    "summary": "Caller-ID (voice=1)",
                    "description": "The JSON structure is the same as for SMS. The field contents shown here are placeholders: the exact caller-ID format is not confirmed.\n\nThe provider may return a code or a caller number in `code` and a message in `fullText`. Do not assume that `code` always contains a verification code.\n",
                    "value": {
                      "statusCode": 200,
                      "data": {
                        "sms": {
                          "code": "<provider text: code or caller number>",
                          "fullText": "<provider sms: caller-ID message>"
                        },
                        "orderId": 123456,
                        "orderExpireIn": 420
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "The result is not ready yet. Applies to SMS, voice-call and caller-ID orders alike; the API uses `SMS_NOT_YET_RECEIVED` and `Waiting for SMS` for all three types.\n",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 202
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "SMS_NOT_YET_RECEIVED"
                        },
                        "description": {
                          "type": "string",
                          "example": "Waiting for SMS"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "INVALID_PARAMS"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid params, please re-check the specified data."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "406": {
            "description": "Order ID format is invalid or not found",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 406
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "INVALID_ORDER_FORMAT"
                        },
                        "description": {
                          "type": "string",
                          "example": "Order should be integer."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "407": {
            "description": "We received SMS but your balance is not enough to pay it.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 407
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "LOW_BALANCE"
                        },
                        "description": {
                          "type": "string",
                          "example": "Low balance"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "410": {
            "description": "This order is closed and unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 410
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "ORDER_CLOSED"
                        },
                        "description": {
                          "type": "string",
                          "example": "Order closed and unavailable"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "411": {
            "description": "API access limited by low karma or ratelimits",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 411
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "ACCESS_LIMITED"
                        },
                        "description": {
                          "type": "string",
                          "example": "Access is temporary limited"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Failed to fetch SMS.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 500
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SMS_FETCH_FAIL"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Failed to fetch SMS."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "501": {
            "description": "Server failed to process request.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 501
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "SERVER_FAIL"
                        },
                        "description": {
                          "type": "string",
                          "example": "Server failed to process request"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "The server is overloaded and experiencing performance issues. Please try later.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 503
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_BUSY"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server overload, try later."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/sms/123456 \\\n  --header 'apikey: REPLACE_KEY_VALUE' \\\n  --header 'partnerkey: SOME_STRING_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/sms/123456\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\",\n    \"partnerkey: SOME_STRING_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/sms/123456',\n  headers: {apikey: 'REPLACE_KEY_VALUE', partnerkey: 'SOME_STRING_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = {\n    'apikey': \"REPLACE_KEY_VALUE\",\n    'partnerkey': \"SOME_STRING_VALUE\"\n    }\n\nconn.request(\"GET\", \"/activation/sms/123456\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/countryservicesettings": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_fast_start",
          "activation_v2_all_methods"
        ],
        "summary": "Get Message Type Settings",
        "operationId": "activation_country_service_settings",
        "description": "Returns the rules that enable or disable SMS, voice calls and caller-ID for combinations of country, service and operator.\n\nSend a GET request to `https://api.smspva.com/activation/countryservicesettings` with the header `apikey: YOUR_API_KEY`. No path or query parameters are required. The response contains all settings, ordered by setting ID in ascending order; IDs are not included in the response.\n\n### Matching a rule\nEach non-empty `country`, `service` or `operator` field is a condition that must match your combination. An empty string means that field does not restrict the rule. A rule can apply to a country, a service or an operator alone, or to a combination of these fields.\n\nIn the matching rule, `1` enables the corresponding message type and `0` disables it:\n- `voice`: voice calls.\n- `caller`: caller-ID.\n- `sms`: SMS.\n\n### Rule priority\nMore specific matching rules take priority over broader rules: the more non-empty conditions a rule has, the higher its priority. Use the three flags from the applicable rule together.\n\nFor example, a rule for `UK` alone is overridden by a matching rule for `UK` and a specific service. A matching rule for that country, service and a specific operator takes priority over both. These are priority examples, not current settings.\n\nIf no rule matches your combination, all three message types are enabled by default. An empty `data` array is a successful response with no configured rules.\n\nThese flags describe message-type permissions, not the number of available phone numbers. To request a number, the `voice` query parameter uses a different mapping: `0` for SMS, `1` for caller-ID and `2` for voice calls.\n\n### Prices and available numbers\nCheck [Service Price](/#operation/activation_service_price) for one country and service, or [Country Operator Prices](/#operation/activation_country_operator_prices) for operator-level prices. Compare more options using [Service Prices by Country](/#operation/activation_service_prices_by_country) or [All Service Prices](/#operation/activation_all_service_prices). Select the same `voice` type in price methods that accept it.\n\nAvailable number counts are listed in [Country Number Counts](/#operation/activation_country_number_counts) and [All Number Counts](/#operation/activation_all_number_counts). Country and service codes are in the [Data List](/#tag/activation_v2_lists).\n",
        "security": [
          {
            "apikey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Message-type settings. An empty list is a successful result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "statusCode",
                    "data"
                  ],
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "enum": [
                        200
                      ],
                      "example": 200
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "country",
                          "service",
                          "operator",
                          "voice",
                          "caller",
                          "sms"
                        ],
                        "properties": {
                          "country": {
                            "type": "string",
                            "description": "Country code to match, or an empty string for any country.",
                            "example": "FR"
                          },
                          "service": {
                            "type": "string",
                            "description": "Service code to match, or an empty string for any service.",
                            "example": "opt20"
                          },
                          "operator": {
                            "type": "string",
                            "description": "Operator code to match, or an empty string for any operator.",
                            "example": ""
                          },
                          "voice": {
                            "type": "integer",
                            "enum": [
                              0,
                              1
                            ],
                            "description": "Voice calls: 1 = enabled, 0 = disabled.",
                            "example": 1
                          },
                          "caller": {
                            "type": "integer",
                            "enum": [
                              0,
                              1
                            ],
                            "description": "Caller-ID: 1 = enabled, 0 = disabled.",
                            "example": 0
                          },
                          "sms": {
                            "type": "integer",
                            "enum": [
                              0,
                              1
                            ],
                            "description": "SMS: 1 = enabled, 0 = disabled.",
                            "example": 1
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "settings": {
                    "summary": "Service-wide and country-specific rules",
                    "value": {
                      "statusCode": 200,
                      "data": [
                        {
                          "country": "",
                          "service": "opt20",
                          "operator": "",
                          "voice": 0,
                          "caller": 0,
                          "sms": 1
                        },
                        {
                          "country": "FR",
                          "service": "opt20",
                          "operator": "",
                          "voice": 1,
                          "caller": 0,
                          "sms": 1
                        }
                      ]
                    }
                  },
                  "empty": {
                    "summary": "No configured rules",
                    "value": {
                      "statusCode": 200,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The apikey header is missing, empty or shorter than 30 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "statusCode",
                    "error"
                  ],
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "enum": [
                        400
                      ],
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "description"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "APIKEY_NOT_SET"
                        },
                        "description": {
                          "type": "string",
                          "example": "No ApiKey found"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "statusCode": 400,
                  "error": {
                    "type": "APIKEY_NOT_SET",
                    "description": "No ApiKey found"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No user was found for the supplied API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "statusCode",
                    "error"
                  ],
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "enum": [
                        401
                      ],
                      "example": 401
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "description"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "USER_NOT_FOUND"
                        },
                        "description": {
                          "type": "string",
                          "example": "Not found"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "statusCode": 401,
                  "error": {
                    "type": "USER_NOT_FOUND",
                    "description": "Not found"
                  }
                }
              }
            }
          },
          "402": {
            "description": "The request rate limit was exceeded. This API uses HTTP 402 for this error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "statusCode",
                    "error"
                  ],
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "enum": [
                        402
                      ],
                      "example": 402
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "description"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "RATELIMIT_EXCEED"
                        },
                        "description": {
                          "type": "string",
                          "example": "Request ratelimit exeeded"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "statusCode": 402,
                  "error": {
                    "type": "RATELIMIT_EXCEED",
                    "description": "Request ratelimit exeeded"
                  }
                }
              }
            }
          },
          "403": {
            "description": "The user is banned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "statusCode",
                    "error"
                  ],
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "enum": [
                        403
                      ],
                      "example": 403
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "description"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "USER_BANNED"
                        },
                        "description": {
                          "type": "string",
                          "example": "User banned"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "statusCode": 403,
                  "error": {
                    "type": "USER_BANNED",
                    "description": "User banned"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. The description may contain a specific exception message when error details are enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "statusCode",
                    "error"
                  ],
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "enum": [
                        500
                      ],
                      "example": 500
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "description"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "SERVER_ERROR"
                        },
                        "description": {
                          "type": "string",
                          "example": "An internal error has occurred while processing your request."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "statusCode": 500,
                  "error": {
                    "type": "SERVER_ERROR",
                    "description": "An internal error has occurred while processing your request."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/countryservicesettings \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/countryservicesettings\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/countryservicesettings',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/countryservicesettings\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/balance": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Balance",
        "description": "Get user's balance",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "balance": {
                          "description": "Balance",
                          "type": "string",
                          "example": "10.50"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ActivationApiKeyNotSet"
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/balance \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/balance\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/balance',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/balance\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/userinfo": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "User Info",
        "description": "Get user's info",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "balance": {
                          "description": "Balance",
                          "type": "string",
                          "example": "10.50"
                        },
                        "name": {
                          "description": "User name.",
                          "type": "string",
                          "example": "user123"
                        },
                        "karma": {
                          "description": "Karma.",
                          "type": "number",
                          "format": "float",
                          "example": 100.5
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ActivationApiKeyNotSet"
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/userinfo \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/userinfo\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/userinfo',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/userinfo\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/countnumbers": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "All Number Counts",
        "operationId": "activation_all_number_counts",
        "description": "Returns available number counts grouped by country, operator and service. Use [Country Number Counts](/#operation/activation_country_number_counts) to check one country, and [All Service Prices](/#operation/activation_all_service_prices) to compare costs.\n",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "type": "array",
                      "items": {
                        "properties": {
                          "operator": {
                            "description": "Operator",
                            "type": "string",
                            "example": "Primetel_CY"
                          },
                          "country": {
                            "description": "Country",
                            "type": "string",
                            "example": "CY"
                          },
                          "services": {
                            "type": "array",
                            "items": {
                              "properties": {
                                "service": {
                                  "description": "Service",
                                  "type": "string",
                                  "example": "opt0"
                                },
                                "total": {
                                  "description": "Numbers count",
                                  "type": "integer",
                                  "example": 12
                                }
                              },
                              "type": "object"
                            }
                          }
                        },
                        "type": "object"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "API rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 402
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "RATELIMIT_EXCEED"
                        },
                        "description": {
                          "type": "string",
                          "example": "Rate limit exceeded."
                        }
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/countnumbers \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/countnumbers\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/countnumbers',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/countnumbers\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/countnumbers/{country}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Country Number Counts",
        "operationId": "activation_country_number_counts",
        "description": "Returns available number counts for the selected country, grouped by operator and service. Choose a country from the [Data List](/#tag/activation_v2_lists) and compare costs in [Country Operator Prices](/#operation/activation_country_operator_prices) before requesting a number.\n",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "description": "Country 2 symbols name in ISO 3166-2 format, uppercase. <br> <a href='/#tag/activation_v2_lists/Countries-list'>Countries list</a>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "UK"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "type": "array",
                      "items": {
                        "properties": {
                          "operator": {
                            "description": "Operator",
                            "type": "string",
                            "example": "Primetel_CY"
                          },
                          "country": {
                            "description": "Country",
                            "type": "string",
                            "example": "CY"
                          },
                          "services": {
                            "type": "array",
                            "items": {
                              "properties": {
                                "service": {
                                  "description": "Service",
                                  "type": "string",
                                  "example": "opt0"
                                },
                                "total": {
                                  "description": "Numbers count",
                                  "type": "integer",
                                  "example": 12
                                }
                              },
                              "type": "object"
                            }
                          }
                        },
                        "type": "object"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/countnumbers/UK \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/countnumbers/UK\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/countnumbers/UK',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/countnumbers/UK\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/serviceprice/{country}/{service}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Service Price",
        "operationId": "activation_service_price",
        "description": "Get service price specific country\n\nChoose codes from the [Data List](/#tag/activation_v2_lists). Check [Country Number Counts](/#operation/activation_country_number_counts) for availability, or [Service Prices by Country](/#operation/activation_service_prices_by_country) to compare the service in other countries.\n\n`priceByOperators` may include regular SMSpva operators and donor operators from external providers. Donor operator codes can look like `DonorAlpha_UK`. Donor operators work in API requests the same way as regular operators, but the numbers are supplied by external services, not directly by SMSpva. External provider numbers may be less consistent than SMSpva numbers; SMSpva uses real SIM cards and stands behind their quality. If a donor operator shows `9999` available numbers in availability responses, the exact count is unknown and availability may be effectively unlimited.\n",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "description": "Country 2 symbols name in ISO 3166-2 format, uppercase. <br> <a href='/#tag/activation_v2_lists/Countries-list'>Countries list</a>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "BD"
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service code. <br> <a href='/#tag/activation_v2_lists/Services-list'>Services list</a>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "opt0"
          },
          {
            "name": "voice",
            "in": "query",
            "description": "Number type: 0 - SMS, 1 - caller-ID, 2 - voice call. Defaults to 0.",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 0
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "service": {
                          "description": "Service",
                          "type": "string",
                          "example": "opt0"
                        },
                        "serviceDescription": {
                          "description": "Service description.",
                          "type": "string",
                          "example": "myopinions & erewards"
                        },
                        "country": {
                          "description": "Country",
                          "type": "string",
                          "example": "KZ"
                        },
                        "price": {
                          "description": "Price.",
                          "type": "string",
                          "example": "2.34"
                        },
                        "priceByOperators": {
                          "description": "Prices grouped by mobile operator.",
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "example": {
                            "Other_KZ": "0.39",
                            "Activ_KZ": "0.39"
                          }
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Invalid country or service parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "INVALID_PARAMS"
                        },
                        "description": {
                          "type": "string",
                          "example": "Invalid params"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://api.smspva.com/activation/serviceprice/BD/opt0?voice=SOME_INTEGER_VALUE' \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/serviceprice/BD/opt0?voice=SOME_INTEGER_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/serviceprice/BD/opt0',\n  qs: {voice: 'SOME_INTEGER_VALUE'},\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/serviceprice/BD/opt0?voice=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/serviceprices/{service}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Service Prices by Country",
        "operationId": "activation_service_prices_by_country",
        "description": "Returns prices and available number counts for one service across countries and operators.\n\nCompare countries and operators for the selected service. The response includes operator prices and counts; use the corresponding codes with [Get Number by Operator](/#operation/activation_get_number_by_operator).\n\nOperator lists may include regular SMSpva operators and donor operators from external providers. Donor operator codes can look like `DonorAlpha_UK`. Donor operators work in API requests the same way as regular operators, but the numbers are supplied by external services, not directly by SMSpva. External provider numbers may be less consistent than SMSpva numbers; SMSpva uses real SIM cards and stands behind their quality. If a donor operator shows `9999` available numbers, the exact count is unknown and availability may be effectively unlimited.\n",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "description": "Service code. <br> <a href='/#tag/activation_v2_lists/Services-list'>Services list</a>",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^opt[0-9]{1,8}$"
            },
            "example": "opt20"
          },
          {
            "name": "voice",
            "in": "query",
            "description": "Number type: 0 - SMS, 1 - caller-ID, 2 - voice call. Defaults to 0.",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 0
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "type": "object",
                      "properties": {
                        "scode": {
                          "description": "Service code.",
                          "type": "string",
                          "example": "opt20"
                        },
                        "sname": {
                          "description": "Service name.",
                          "type": "string",
                          "example": "WhatsApp"
                        },
                        "clist": {
                          "description": "Countries and operators available for the service.",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ccode": {
                                "description": "Country code.",
                                "type": "string",
                                "example": "UK"
                              },
                              "cname": {
                                "description": "Country name.",
                                "type": "string",
                                "example": "United Kingdom"
                              },
                              "opers": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "opcode": {
                                      "description": "Operator code. It can be a regular SMSpva operator or a donor operator from an external provider.",
                                      "type": "string",
                                      "example": "DonorAlpha_UK"
                                    },
                                    "price": {
                                      "description": "Operator price.",
                                      "type": "number",
                                      "format": "float",
                                      "example": 0.65
                                    },
                                    "count": {
                                      "description": "Available numbers count. For donor operators, `9999` means that the exact count is unknown and availability may be effectively unlimited.",
                                      "type": "integer",
                                      "example": 9999
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "INVALID_PARAMS"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Invalid params."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://api.smspva.com/activation/serviceprices/opt20?voice=SOME_INTEGER_VALUE' \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/serviceprices/opt20?voice=SOME_INTEGER_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/serviceprices/opt20',\n  qs: {voice: 'SOME_INTEGER_VALUE'},\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/serviceprices/opt20?voice=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/servicesprices": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "All Service Prices",
        "operationId": "activation_all_service_prices",
        "description": "Returns service prices across countries. For one country and service, use [Service Price](/#operation/activation_service_price); for operator prices, use [Country Operator Prices](/#operation/activation_country_operator_prices). Check [All Number Counts](/#operation/activation_all_number_counts) for availability.\n",
        "parameters": [
          {
            "name": "voice",
            "in": "query",
            "description": "Number type: 0 - SMS, 1 - caller-ID, 2 - voice call. Defaults to 0.",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 0
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "type": "array",
                      "items": {
                        "properties": {
                          "service": {
                            "description": "Service",
                            "type": "string",
                            "example": "opt0"
                          },
                          "serviceDescription": {
                            "description": "Service description.",
                            "type": "string",
                            "example": "myopinions & erewards"
                          },
                          "country": {
                            "description": "Country",
                            "type": "string",
                            "example": "CY"
                          },
                          "price": {
                            "description": "Price.",
                            "type": "string",
                            "example": "0.50"
                          }
                        },
                        "type": "object"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://api.smspva.com/activation/servicesprices?voice=SOME_INTEGER_VALUE' \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/servicesprices?voice=SOME_INTEGER_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/servicesprices',\n  qs: {voice: 'SOME_INTEGER_VALUE'},\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/servicesprices?voice=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/numberstatus/{number}/{service}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Number Status",
        "description": "Check if number is still able to receive SMS for certain service. Only if you used to receive SMS on this number for this service previously.",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "description": "Phone number without country phone code.",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{5,}$"
            },
            "example": "98765432"
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service code. To see all service codes please refer to servicesprices method.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "opt0"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "number": {
                          "description": "Phone number without country phone code.",
                          "type": "string",
                          "example": "98765432"
                        },
                        "orderId": {
                          "description": "ID of your previous order for this number and service.",
                          "type": "integer",
                          "example": 123456
                        },
                        "countryCode": {
                          "description": "Country phone number code.",
                          "type": "string",
                          "example": "+7"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Invalid number format",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "description": "Response data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "INVALID_NUMBER_FORMAT"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Number should be integer with more than 5 digits"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "406": {
            "description": "Order ID format is invalid or not found",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 406
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "ORDER_NOT_FOUND"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Order not found."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ActivationServerError"
          },
          "501": {
            "description": "Server failed to process request."
          },
          "502": {
            "description": "Number not found."
          },
          "503": {
            "description": "The server is overloaded and experiencing performance issues. Please try later."
          },
          "504": {
            "description": "av2.resp.504.desc"
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/numberstatus/98765432/opt0 \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/numberstatus/98765432/opt0\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/numberstatus/98765432/opt0',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/numberstatus/98765432/opt0\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/clearsms/{orderid}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "put": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Clear SMS",
        "description": "Delete current SMS to receive new one.",
        "parameters": [
          {
            "name": "orderid",
            "in": "path",
            "description": "Order ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "orderId": {
                          "description": "Order ID",
                          "type": "integer",
                          "example": 123456
                        },
                        "orderExpireIn": {
                          "description": "Order expiration time in seconds",
                          "type": "integer",
                          "example": 599
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No SMS received, or there's unpaid SMS waiting.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 404
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "NO_SMS_TO_CLEAN"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "SMS not yet received or paid."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "INVALID_PARAMS"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Invalid params."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "406": {
            "description": "Order not found.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 406
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "ORDER_NOT_FOUND"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Order not found."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "501": {
            "description": "Server failed to process request.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 501
                    },
                    "error": {
                      "description": "Response data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_FAIL"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server failed to process request"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "No SMS received, or there's unpaid SMS waiting.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 503
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_BUSY"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server overload, try later."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://api.smspva.com/activation/clearsms/123456 \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/clearsms/123456\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.smspva.com/activation/clearsms/123456',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"PUT\", \"/activation/clearsms/123456\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/stopsms/{orderid}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "put": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Stop SMS",
        "description": "Stop receiving SMS",
        "parameters": [
          {
            "name": "orderid",
            "in": "path",
            "description": "Order ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "orderId": {
                          "description": "Order ID",
                          "type": "integer",
                          "example": 123456
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "INVALID_PARAMS"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Invalid params."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "406": {
            "description": "Order ID format is invalid or not found",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 406
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "ORDER_NOT_FOUND"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Order not found."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "411": {
            "description": "API access limited by low karma or ratelimits",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 411
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "ACCESS_LIMITED"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Access is temporary limited."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "501": {
            "description": "Server failed to process request.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 501
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_FAIL"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server failed to process request."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "The server is overloaded and experiencing performance issues. Please try later.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 503
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_BUSY"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server overload, try later."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://api.smspva.com/activation/stopsms/123456 \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/stopsms/123456\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.smspva.com/activation/stopsms/123456',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"PUT\", \"/activation/stopsms/123456\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/cancelorder/{orderid}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "put": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Cancel Order",
        "description": "Cancel order.",
        "parameters": [
          {
            "name": "orderid",
            "in": "path",
            "description": "Order ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "orderId": {
                          "description": "Order ID",
                          "type": "integer",
                          "example": 123456
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "INVALID_PARAMS"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Invalid params."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "406": {
            "description": "Order ID format is invalid or not found",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 406
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "ORDER_NOT_FOUND"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Order not found."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "411": {
            "description": "API access limited by low karma or ratelimits",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 411
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "ACCESS_LIMITED"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Access is temporary limited."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "501": {
            "description": "Server failed to process request.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 501
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_BUSY"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server failed to process request."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "The server is overloaded and experiencing performance issues. Please try later.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 503
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_BUSY"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server overload, try later."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://api.smspva.com/activation/cancelorder/123456 \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/cancelorder/123456\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.smspva.com/activation/cancelorder/123456',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"PUT\", \"/activation/cancelorder/123456\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/blocknumber/{orderid}": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "put": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Block Number",
        "description": "Set number as nonworking.",
        "parameters": [
          {
            "name": "orderid",
            "in": "path",
            "description": "Order ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "orderId": {
                          "description": "Order ID",
                          "type": "integer",
                          "example": 123456
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Invalid number format",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 405
                    },
                    "error": {
                      "description": "Response data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "INVALID_PARAMS"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Invalid params."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "406": {
            "description": "Order ID format is invalid or not found",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 406
                    },
                    "error": {
                      "description": "Response data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "ORDER_NOT_FOUND"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Order not found."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "411": {
            "description": "API access limited by low karma or ratelimits",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 411
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "ACCESS_LIMITED"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Access is temporary limited."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "501": {
            "description": "Server failed to process request.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 501
                    },
                    "error": {
                      "description": "Response data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_FAIL"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server failed to process request"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "The server is overloaded and experiencing performance issues. Please try later.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 503
                    },
                    "error": {
                      "description": "Error data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_BUSY"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server overload, try later."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://api.smspva.com/activation/blocknumber/123456 \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/blocknumber/123456\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.smspva.com/activation/blocknumber/123456',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"PUT\", \"/activation/blocknumber/123456\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/activation/orders": {
      "servers": [
        {
          "url": "https://api.smspva.com"
        }
      ],
      "get": {
        "tags": [
          "activation_v2_all_methods"
        ],
        "summary": "Orders",
        "operationId": "activation_orders",
        "description": "Returns current activation orders. Use the returned `orderId` with [Receive SMS](/#operation/activation_receive_sms) and other order-specific methods.\n",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 200
                    },
                    "data": {
                      "description": "Response data",
                      "properties": {
                        "orders": {
                          "description": "Response data",
                          "type": "array",
                          "items": {
                            "properties": {
                              "orderId": {
                                "description": "Order ID",
                                "type": "integer",
                                "example": 123456
                              },
                              "phoneNumber": {
                                "description": "Phone number without country code",
                                "type": "integer",
                                "example": 987654321
                              },
                              "countryCode": {
                                "description": "Country phone number code.",
                                "type": "string",
                                "example": "+7"
                              },
                              "orderExpireIn": {
                                "description": "Order expiration time in seconds",
                                "type": "integer",
                                "example": 599
                              },
                              "service": {
                                "description": "Service code <br> <a href='/#tag/activation_v2_lists/Services-list'>Services list</a>",
                                "type": "string",
                                "example": "opt0"
                              },
                              "country": {
                                "description": "Country code according ITU-T E.123 & E.164 <br> <a href='/#tag/activation_v2_lists/Countries-list'>Countries list</a>",
                                "type": "string",
                                "example": "UK"
                              },
                              "status": {
                                "description": "SMS status.",
                                "type": "string",
                                "example": "PENDING_SMS|SMS_READY|PENDING_PAYMENT"
                              },
                              "sms": {
                                "description": "SMS status.",
                                "properties": {
                                  "code": {
                                    "description": "Service activation code from SMS.",
                                    "type": "string",
                                    "example": "1234"
                                  },
                                  "fullText": {
                                    "description": "Full SMS text.",
                                    "type": "string",
                                    "example": "Your service Activation code is 1234. Don't tell it anybody"
                                  }
                                },
                                "type": "object"
                              }
                            },
                            "type": "object"
                          }
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "501": {
            "description": "Server failed to process request.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 501
                    },
                    "error": {
                      "description": "Response data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_FAIL"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server failed to process request"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "The server is overloaded and experiencing performance issues. Please try later.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "statusCode": {
                      "description": "Result status code",
                      "type": "integer",
                      "example": 503
                    },
                    "error": {
                      "description": "Response data",
                      "properties": {
                        "type": {
                          "description": "Error type",
                          "type": "string",
                          "example": "SERVER_BUSY"
                        },
                        "description": {
                          "description": "Error description",
                          "type": "string",
                          "example": "Server overload, try later."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey": []
          }
        ],
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://api.smspva.com/activation/orders \\\n  --header 'apikey: REPLACE_KEY_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.smspva.com/activation/orders\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"apikey: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.smspva.com/activation/orders',\n  headers: {apikey: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.smspva.com\")\n\nheaders = { 'apikey': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/activation/orders\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apikey": {
        "type": "apiKey",
        "name": "apikey",
        "in": "header"
      }
    },
    "responses": {
      "ActivationApiKeyNotSet": {
        "description": "The apikey header is missing, empty or invalid in length.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "statusCode": {
                  "type": "integer",
                  "example": 400
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "example": "APIKEY_NOT_SET"
                    },
                    "description": {
                      "type": "string",
                      "example": "No ApiKey found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ActivationServerError": {
        "description": "Internal server error. The description may include diagnostic details.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "statusCode": {
                  "type": "integer",
                  "example": 500
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "example": "SERVER_ERROR"
                    },
                    "description": {
                      "type": "string",
                      "example": "An internal error has occurred while processing your request."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
