{
  "openapi": "3.0.0",
  "info": {
    "title": "SMSPVA Rental API",
    "version": "1.0.0",
    "description": "Rental subset of the published documentation. Original query-dispatch paths, methods, parameters and responses are preserved."
  },
  "servers": [
    {
      "url": "https://smspva.com"
    }
  ],
  "paths": {
    "/api/rent.php?method=create": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Creating new order",
        "description": "Rent a number\n\nChoose a country from [Rental Countries](/#operation/rent_getcountries). Check services, prices and provider counts in [Rental Data by Provider](/#operation/rent_getdataWithProviders), using the same country and duration you intend to rent. For multiple services, check [Multi-Service Count](/#operation/rent_get_count_multi) and use [Create Multi-Service Rental](/#operation/rent_create_multi).\n\nAfter creation, find the order in [Rental Orders](/#operation/rent_orders) and [Activate](/#operation/rent_activate) it before sending an SMS.\n",
        "operationId": "rent_create",
        "parameters": [
          {
            "name": "method",
            "in": "query",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "create"
            }
          },
          {
            "name": "apikey",
            "in": "query",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "type": "string",
              "example": "yourapikeyhere"
            }
          },
          {
            "name": "dtype",
            "in": "query",
            "description": "Type of period: week or month",
            "required": true,
            "schema": {
              "type": "string",
              "example": "week"
            }
          },
          {
            "name": "dcount",
            "in": "query",
            "description": "Count type of period, i.e. if dtype=week then counts of weeks",
            "required": true,
            "schema": {
              "example": 1,
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
            "required": true,
            "schema": {
              "type": "string",
              "example": "KZ"
            }
          },
          {
            "name": "service",
            "in": "query",
            "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
            "required": true,
            "schema": {
              "type": "string",
              "example": "opt6"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "description": "Optional parameter. Provider name. If not specified, a provider will be chosen randomly from the available ones.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "T-Mobile"
            }
          },
          {
            "name": "partner_key",
            "in": "query",
            "description": "Optional partner key for referral accounting.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "partnerkeyhere"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID of order",
                          "example": 40370
                        },
                        "pnumber": {
                          "type": "string",
                          "description": "Phone number without country code",
                          "example": "9096037108"
                        },
                        "ccode": {
                          "type": "string",
                          "description": "Digital country code",
                          "example": "+7"
                        },
                        "service": {
                          "type": "string",
                          "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
                          "example": "opt6"
                        },
                        "until": {
                          "type": "string",
                          "description": "UNIX timestamp of expire date",
                          "example": "1587633960"
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "Incorrect country code"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=create&apikey=yourapikeyhere&dtype=week&dcount=1&country=KZ&service=opt6&provider=T-Mobile&partner_key=partnerkeyhere'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=create&apikey=yourapikeyhere&dtype=week&dcount=1&country=KZ&service=opt6&provider=T-Mobile&partner_key=partnerkeyhere\",\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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'create',\n    apikey: 'yourapikeyhere',\n    dtype: 'week',\n    dcount: '1',\n    country: 'KZ',\n    service: 'opt6',\n    provider: 'T-Mobile',\n    partner_key: 'partnerkeyhere'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=create&apikey=yourapikeyhere&dtype=week&dcount=1&country=KZ&service=opt6&provider=T-Mobile&partner_key=partnerkeyhere\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=create_multi": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Сreating order with multiple services",
        "description": "Rent one number for multiple services.\n\nChoose a country from [Rental Countries](/#operation/rent_getcountries) and service codes from [Rental Data by Provider](/#operation/rent_getdataWithProviders). Check [Multi-Service Count](/#operation/rent_get_count_multi) for the same services and duration before ordering.\n\nFind the created order in [Rental Orders](/#operation/rent_orders) and [Activate](/#operation/rent_activate) it before sending an SMS.\n",
        "operationId": "rent_create_multi",
        "parameters": [
          {
            "name": "method",
            "in": "query",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "create_multi"
            }
          },
          {
            "name": "apikey",
            "in": "query",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "type": "string",
              "example": "yourapikeyhere"
            }
          },
          {
            "name": "dtype",
            "in": "query",
            "description": "Type of period: week or month",
            "required": true,
            "schema": {
              "type": "string",
              "example": "week"
            }
          },
          {
            "name": "dcount",
            "in": "query",
            "description": "Count type of period, i.e. if dtype=week then counts of weeks",
            "required": true,
            "schema": {
              "example": 1,
              "type": "integer"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
            "required": true,
            "schema": {
              "type": "string",
              "example": "KZ"
            }
          },
          {
            "name": "services",
            "in": "query",
            "description": "Services codes separated by commas<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
            "required": true,
            "schema": {
              "type": "string",
              "example": "opt6,opt7,opt8"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "description": "Optional parameter. Provider name. If not specified, a provider will be chosen randomly from the available ones.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "T-Mobile"
            }
          },
          {
            "name": "partner_key",
            "in": "query",
            "description": "Optional partner key for referral accounting.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "partnerkeyhere"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID of order",
                          "example": 40370
                        },
                        "pnumber": {
                          "type": "string",
                          "description": "Phone number without country code",
                          "example": "9096037108"
                        },
                        "ccode": {
                          "type": "string",
                          "description": "Digital country code",
                          "example": "+7"
                        },
                        "service": {
                          "type": "string",
                          "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
                          "example": "opt6"
                        },
                        "until": {
                          "type": "string",
                          "description": "UNIX timestamp of expire date",
                          "example": "1587633960"
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "Incorrect service code list"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=create_multi&apikey=yourapikeyhere&dtype=week&dcount=1&country=KZ&services=opt6%2Copt7%2Copt8&provider=T-Mobile&partner_key=partnerkeyhere'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=create_multi&apikey=yourapikeyhere&dtype=week&dcount=1&country=KZ&services=opt6%2Copt7%2Copt8&provider=T-Mobile&partner_key=partnerkeyhere\",\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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'create_multi',\n    apikey: 'yourapikeyhere',\n    dtype: 'week',\n    dcount: '1',\n    country: 'KZ',\n    services: 'opt6,opt7,opt8',\n    provider: 'T-Mobile',\n    partner_key: 'partnerkeyhere'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=create_multi&apikey=yourapikeyhere&dtype=week&dcount=1&country=KZ&services=opt6%2Copt7%2Copt8&provider=T-Mobile&partner_key=partnerkeyhere\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=add_service_to_order": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Adding new service for existing order",
        "description": "Add another service to an existing rental order. To check available services and prices for a country, use the Get data with operators method.\n\nFind the existing order and its number in [Rental Orders](/#operation/rent_orders). Check the additional service and its price in [Rental Data by Provider](/#operation/rent_getdataWithProviders) for the order's country.\n",
        "operationId": "rent_add_service_to_order",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "example": "add_service_to_order",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "example": "yourapikeyhere",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "required": true,
            "description": "ID of order",
            "schema": {
              "example": 56547,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "service",
            "required": true,
            "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
            "schema": {
              "example": "opt89",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "pnumber",
            "required": true,
            "description": "rented phone number with country code without plus sign",
            "schema": {
              "example": "79335445295",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rent_days",
            "required": false,
            "description": "Optional parameter. Number of days to rent the service. If not specified, default duration will be used (7 days for most countries, 1 day for Canada).",
            "schema": {
              "example": 7,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "description": "Service addition details",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Order ID",
                          "example": 4211321
                        },
                        "pnumber": {
                          "type": "string",
                          "description": "Phone number",
                          "example": "37067181111"
                        },
                        "service": {
                          "type": "string",
                          "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
                          "example": "opt95"
                        },
                        "until": {
                          "type": "integer",
                          "description": "Service expiration time (UNIX timestamp)",
                          "example": 1771583220
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=add_service_to_order&apikey=yourapikeyhere&id=56547&service=opt89&pnumber=79335445295&rent_days=7'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=add_service_to_order&apikey=yourapikeyhere&id=56547&service=opt89&pnumber=79335445295&rent_days=7\",\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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'add_service_to_order',\n    apikey: 'yourapikeyhere',\n    id: '56547',\n    service: 'opt89',\n    pnumber: '79335445295',\n    rent_days: '7'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=add_service_to_order&apikey=yourapikeyhere&id=56547&service=opt89&pnumber=79335445295&rent_days=7\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=activate": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "description": "Before sending an SMS, you must activate the number.\n\nFind the order ID in [Rental Orders](/#operation/rent_orders). Check its state there after activation, then use [Rental SMS](/#operation/rent_sms) to read messages.\n",
        "summary": "Activation phone number",
        "operationId": "rent_activate",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "activate"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "type": "string",
              "example": "yourapikeyhere"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "ID of order",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of order",
                            "example": 123
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=activate&apikey=yourapikeyhere&id=1'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=activate&apikey=yourapikeyhere&id=1\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'activate', apikey: 'yourapikeyhere', id: '1'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=activate&apikey=yourapikeyhere&id=1\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=orders": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Getting list of orders",
        "description": "Get all your active rental orders with current status and prolongation availability.\n\nUse the returned order ID for [Activate](/#operation/rent_activate), [Rental SMS](/#operation/rent_sms) and [Prolong](/#operation/rent_prolong). For completed orders and restoration eligibility, see [Rental History](/#operation/rent_get_rent_history).\n",
        "operationId": "rent_orders",
        "parameters": [
          {
            "name": "method",
            "in": "query",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "orders"
            }
          },
          {
            "name": "apikey",
            "in": "query",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "type": "string",
              "example": "yourapikeyhere"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "ID of order",
                            "example": 40300
                          },
                          "scode": {
                            "type": "string",
                            "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
                            "example": "opt16"
                          },
                          "sname": {
                            "type": "string",
                            "description": "Service name",
                            "example": "Instagram"
                          },
                          "state": {
                            "type": "integer",
                            "description": "Order state: 0 - not active, 1 - active, 2 - activating, -1 - not in system",
                            "example": 0
                          },
                          "pnumber": {
                            "type": "string",
                            "description": "Phone number without country code",
                            "example": "9096068511"
                          },
                          "ccode": {
                            "type": "string",
                            "description": "Digital country code",
                            "example": "+7"
                          },
                          "cname": {
                            "type": "string",
                            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
                            "example": "KZ"
                          },
                          "hasnewsms": {
                            "type": "boolean",
                            "description": "New SMS received for this order",
                            "example": false
                          },
                          "until": {
                            "type": "integer",
                            "description": "UNIX timestamp of expire date",
                            "example": 1587552240
                          },
                          "canprolong": {
                            "type": "boolean",
                            "description": "Is this order available for prolongation?",
                            "example": true
                          },
                          "canprolongmax": {
                            "type": "integer",
                            "description": "Maximum number of days available for prolongation. This is the limit - you cannot extend beyond this number of days.",
                            "example": 162
                          },
                          "canprolonguntil": {
                            "type": "integer",
                            "description": "Unix timestamp showing the deadline until which you can prolong the order. After this date, prolongation is not available.",
                            "example": 1634883780
                          },
                          "lastonline": {
                            "type": "integer",
                            "description": "Unix timestamp of last online date of number",
                            "example": 1586947920
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=orders&apikey=yourapikeyhere'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=orders&apikey=yourapikeyhere\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'orders', apikey: 'yourapikeyhere'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=orders&apikey=yourapikeyhere\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=sms": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Getting all SMS of order",
        "description": "Get SMS of number\n\nUse the order ID from [Rental Orders](/#operation/rent_orders). Before sending a message to the rented number, [Activate](/#operation/rent_activate) the order and check its state in the orders response.\n",
        "operationId": "rent_sms",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "sms"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "example": "yourapikeyhere",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "required": true,
            "description": "ID of order",
            "schema": {
              "type": "integer",
              "example": 123
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "SmsList": {
                          "type": "array",
                          "description": "List of received SMS",
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string",
                                "description": "Text of SMS",
                                "example": "Code Instagram: 671 094."
                              },
                              "sender": {
                                "type": "string",
                                "description": "Sender of the SMS",
                                "example": "FACEBOOK"
                              },
                              "date": {
                                "type": "integer",
                                "description": "Unix timestamp of receiving date",
                                "example": 1586948100
                              }
                            }
                          }
                        },
                        "OtherSms": {
                          "type": "array",
                          "description": "List of other SMS",
                          "items": {}
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=sms&apikey=yourapikeyhere&id=123'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=sms&apikey=yourapikeyhere&id=123\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'sms', apikey: 'yourapikeyhere', id: '123'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=sms&apikey=yourapikeyhere&id=123\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=getcountries": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "description": "Get available countries list\n\nUse the returned country code in [Rental Data](/#operation/rent_getdata) or [Rental Data by Provider](/#operation/rent_getdataWithProviders) to find services, prices and counts before renting.\n",
        "summary": "Getting available countries list",
        "operationId": "rent_getcountries",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "example": "getcountries",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Country name",
                            "example": "United States"
                          },
                          "code": {
                            "type": "string",
                            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
                            "example": "US"
                          },
                          "url_country_name": {
                            "type": "string",
                            "description": "Country slug used in public URLs.",
                            "example": "united-states"
                          },
                          "rent_switch_type": {
                            "type": "string",
                            "description": "Rental availability mode for the country.",
                            "example": "FAST"
                          },
                          "rent_avail_prolong": {
                            "type": "string",
                            "description": "Indicates whether rental prolongation is available for the country.",
                            "example": "1"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=getcountries'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=getcountries\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'getcountries'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=getcountries\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=getdata": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "summary": "Getting available services list",
        "description": "Returns service prices and available number counts for a country and rental duration. `dtype` accepts `week` or `month`; `dcount` is the number of those periods.\n\nThe standard response includes service names, codes, daily prices, counts and icon paths, plus `data.totalAmount`. With `extend=1`, service entries also include `procent_days`, `procent` and `day_step` pricing settings.\n\nCheck the JSON `status` even when HTTP is 200: `status=0` indicates an error, with its text in `msg`.\n",
        "operationId": "rent_getdata",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "getdata"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Optional API key. When supplied, it may affect personalized rental data.",
            "required": false,
            "schema": {
              "example": "yourapikeyhere",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "country",
            "required": true,
            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
            "schema": {
              "example": "KZ",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dtype",
            "required": false,
            "description": "Type of period: week or month Defaults to week when omitted.",
            "schema": {
              "example": "week",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dcount",
            "required": false,
            "description": "Count type of period, i.e. if dtype=week then counts of weeks Defaults to 1 when omitted.",
            "schema": {
              "example": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "extend",
            "required": false,
            "description": "Set to 1 to include procent_days, procent and day_step pricing settings in each service entry.",
            "schema": {
              "type": "string",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "services": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Service name",
                                "example": "Airbnb"
                              },
                              "service": {
                                "type": "string",
                                "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
                                "example": "opt46"
                              },
                              "price_day": {
                                "type": "number",
                                "description": "Price per day",
                                "example": 6
                              },
                              "count": {
                                "type": "integer",
                                "description": "Available count",
                                "example": 359
                              },
                              "img": {
                                "type": "string",
                                "description": "Service icon path.",
                                "example": "images/ico/whatsapp.png"
                              },
                              "procent_days": {
                                "type": "integer",
                                "description": "Number of days for discount Returned with extend=1.",
                                "example": 0
                              },
                              "procent": {
                                "type": "integer",
                                "description": "Discount percentage Returned with extend=1.",
                                "example": 0
                              },
                              "day_step": {
                                "type": "number",
                                "description": "Day step for pricing Returned with extend=1.",
                                "example": 0
                              }
                            }
                          }
                        },
                        "totalAmount": {
                          "type": "integer",
                          "description": "Total count of available numbers for all services",
                          "example": 100
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "Incorrect duration type. Available types: week, month"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=getdata&apikey=yourapikeyhere&country=KZ&dtype=week&dcount=1&extend=1'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=getdata&apikey=yourapikeyhere&country=KZ&dtype=week&dcount=1&extend=1\",\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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'getdata',\n    apikey: 'yourapikeyhere',\n    country: 'KZ',\n    dtype: 'week',\n    dcount: '1',\n    extend: '1'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=getdata&apikey=yourapikeyhere&country=KZ&dtype=week&dcount=1&extend=1\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=getcount": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "summary": "Getting available numbers count",
        "description": "Returns available rental number counts for a country. `dtype` and `dcount` default to week and 1.\n\nFor service names and prices, use [Rental Data](/#operation/rent_getdata). For counts grouped by provider, use [Counts by Provider](/#operation/rent_getCountWithProviders).\n",
        "operationId": "rent_getcount",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "getcount"
            }
          },
          {
            "in": "query",
            "name": "country",
            "required": true,
            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
            "schema": {
              "example": "KZ",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dtype",
            "required": false,
            "description": "Type of period: week or month Defaults to week when omitted.",
            "schema": {
              "example": "week",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dcount",
            "required": false,
            "description": "Count type of period, i.e. if dtype=week then counts of weeks Defaults to 1 when omitted.",
            "schema": {
              "example": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "description": "Count data by service or total count, depending on backend response.",
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer"
                          }
                        },
                        {
                          "type": "integer"
                        }
                      ]
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "Incorrect country code"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=getcount&country=KZ&dtype=week&dcount=1'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=getcount&country=KZ&dtype=week&dcount=1\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'getcount', country: 'KZ', dtype: 'week', dcount: '1'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=getcount&country=KZ&dtype=week&dcount=1\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=get_count_multi": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "summary": "Getting count for multiple services",
        "description": "Returns available rental number count for several services. Pass `dtype` and `dcount` explicitly until backend defaults are fixed.\n",
        "operationId": "rent_get_count_multi",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "get_count_multi"
            }
          },
          {
            "in": "query",
            "name": "country",
            "required": true,
            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
            "schema": {
              "example": "KZ",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "services",
            "required": true,
            "description": "Services codes separated by commas<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
            "schema": {
              "example": "opt1,opt2",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dtype",
            "required": false,
            "description": "Type of period: week or month",
            "schema": {
              "example": "week",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dcount",
            "required": false,
            "description": "Count type of period, i.e. if dtype=week then counts of weeks",
            "schema": {
              "example": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "example": 10
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "Incorrect services list"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=get_count_multi&country=KZ&services=opt1%2Copt2&dtype=week&dcount=1'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=get_count_multi&country=KZ&services=opt1%2Copt2&dtype=week&dcount=1\",\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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'get_count_multi',\n    country: 'KZ',\n    services: 'opt1,opt2',\n    dtype: 'week',\n    dcount: '1'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=get_count_multi&country=KZ&services=opt1%2Copt2&dtype=week&dcount=1\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=get_default_services": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "summary": "Getting default services list",
        "description": "Returns the default services list used by the rental API.\n\nFor country-specific prices and availability, use [Rental Data](/#operation/rent_getdata) or [Rental Data by Provider](/#operation/rent_getdataWithProviders).\n",
        "operationId": "rent_get_default_services",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "get_default_services"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Service name.",
                            "example": "WhatsApp"
                          },
                          "service": {
                            "type": "string",
                            "description": "Service code.",
                            "example": "opt20"
                          },
                          "priceForDay": {
                            "type": "string",
                            "description": "Daily rental price, returned as a string.",
                            "example": "0.20"
                          },
                          "img": {
                            "type": "string",
                            "description": "Service icon path.",
                            "example": "images/ico/whatsapp.png"
                          },
                          "DAYP": {
                            "type": "string",
                            "description": "Rental pricing setting returned by the server.",
                            "example": "30"
                          },
                          "PROC": {
                            "type": "string",
                            "description": "Rental pricing setting returned by the server.",
                            "example": "30"
                          }
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=get_default_services'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=get_default_services\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'get_default_services'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=get_default_services\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=get_country_by_service": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "summary": "Getting countries for service",
        "description": "Returns countries available for a rental service and duration type.\n\nAfter choosing a country, use [Rental Data by Provider](/#operation/rent_getdataWithProviders) to compare providers for the same service and duration.\n",
        "operationId": "rent_get_country_by_service",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "get_country_by_service"
            }
          },
          {
            "in": "query",
            "name": "service",
            "required": true,
            "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
            "schema": {
              "type": "string",
              "example": "opt20"
            }
          },
          {
            "in": "query",
            "name": "dtype",
            "required": true,
            "description": "Type of period: week or month",
            "schema": {
              "type": "string",
              "example": "week"
            }
          },
          {
            "in": "query",
            "name": "dcount",
            "required": false,
            "description": "Count type of period, i.e. if dtype=week then counts of weeks Defaults to 1 when omitted.",
            "schema": {
              "type": "integer",
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "service_name": {
                            "type": "string",
                            "example": "Fiverr"
                          },
                          "price": {
                            "type": "string",
                            "example": "0.20"
                          },
                          "procent_days": {
                            "type": "string",
                            "example": "30"
                          },
                          "procent": {
                            "type": "string",
                            "example": "30"
                          },
                          "day_step": {
                            "type": "string",
                            "example": "0.00"
                          },
                          "country": {
                            "type": "string",
                            "example": "KZ"
                          },
                          "phoneAmount": {
                            "type": "integer",
                            "example": 79
                          }
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "No service"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=get_country_by_service&service=opt20&dtype=week&dcount=1'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=get_country_by_service&service=opt20&dtype=week&dcount=1\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'get_country_by_service', service: 'opt20', dtype: 'week', dcount: '1'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=get_country_by_service&service=opt20&dtype=week&dcount=1\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=get_days_canada_paypal": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "summary": "Getting Canada PayPal days",
        "description": "Returns available rental days data for Canada PayPal flow.",
        "operationId": "rent_get_days_canada_paypal",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "get_days_canada_paypal"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "description": "Rental period entries returned by the Canada PayPal flow.",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "Days": {
                            "type": "integer",
                            "description": "Rental period in days.",
                            "example": 30
                          },
                          "Amount": {
                            "type": "integer",
                            "description": "Amount associated with the rental period, as returned by the API.",
                            "example": 10
                          }
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=get_days_canada_paypal'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=get_days_canada_paypal\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'get_days_canada_paypal'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=get_days_canada_paypal\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=get_min_paypal_days": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "summary": "Getting minimum PayPal rental days",
        "description": "Returns minimum available PayPal rental period for country and service. If `country` or `service` is missing, the current backend may return an empty HTTP response.\n\nUse [Rental Countries](/#operation/rent_getcountries) for country codes. For the Canada PayPal flow, see also [Canada PayPal Days](/#operation/rent_get_days_canada_paypal).\n",
        "operationId": "rent_get_min_paypal_days",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "get_min_paypal_days"
            }
          },
          {
            "in": "query",
            "name": "country",
            "required": true,
            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
            "schema": {
              "type": "string",
              "example": "CA"
            }
          },
          {
            "in": "query",
            "name": "service",
            "required": true,
            "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
            "schema": {
              "type": "string",
              "example": "opt83"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "description": "Minimum rental period and its availability result.",
                      "type": "object",
                      "properties": {
                        "Days": {
                          "type": "integer",
                          "description": "Minimum rental period in days.",
                          "example": 30
                        },
                        "Status": {
                          "type": "integer",
                          "description": "Availability status returned by the server, separate from the top-level status.",
                          "example": 1
                        },
                        "Message": {
                          "type": "string",
                          "description": "Availability message returned by the server.",
                          "example": ""
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "Incorrect country code"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=get_min_paypal_days&country=CA&service=opt83'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=get_min_paypal_days&country=CA&service=opt83\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'get_min_paypal_days', country: 'CA', service: 'opt83'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=get_min_paypal_days&country=CA&service=opt83\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=getdataWithProviders": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Getting available services with operators and prices",
        "description": "Get a list of available services for a country with detailed information about operators, prices, and availability. This method shows the price per day for each service and which operators provide that service.\n\nChoose a country from [Rental Countries](/#operation/rent_getcountries). Use the same `dtype` and `dcount` you intend to rent. Service entries provide codes, prices and provider counts; pass the chosen code to [Create Rental](/#operation/rent_create) or [Create Multi-Service Rental](/#operation/rent_create_multi).\n",
        "operationId": "rent_getdataWithProviders",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "getdataWithProviders"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Optional API key. When supplied, it may affect personalized rental data and prices.",
            "required": false,
            "schema": {
              "example": "yourapikeyhere",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "country",
            "required": true,
            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
            "schema": {
              "example": "KZ",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dtype",
            "required": false,
            "description": "Type of period: week or month Defaults to week when omitted.",
            "schema": {
              "example": "week",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dcount",
            "required": false,
            "description": "Count type of period, i.e. if dtype=week then counts of weeks Defaults to 1 when omitted.",
            "schema": {
              "example": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "extend",
            "required": false,
            "description": "Optional flag enabling extended response format.",
            "schema": {
              "type": "string",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "services": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Service name",
                                "example": "1cupis & okcupid & winline"
                              },
                              "service": {
                                "type": "string",
                                "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
                                "example": "opt48"
                              },
                              "price_day": {
                                "type": "number",
                                "description": "Price per day for this service",
                                "example": 5
                              },
                              "img": {
                                "type": "string",
                                "description": "Service icon URL",
                                "example": "images/ico/cupis_okcupid_winline.ico"
                              },
                              "procent_days": {
                                "type": "integer",
                                "description": "Number of days for discount",
                                "example": 0
                              },
                              "procent": {
                                "type": "integer",
                                "description": "Discount percentage",
                                "example": 0
                              },
                              "day_step": {
                                "type": "integer",
                                "description": "Day step for pricing",
                                "example": 0
                              },
                              "count": {
                                "type": "object",
                                "description": "Number of available numbers for this service from each operator",
                                "additionalProperties": {
                                  "type": "integer"
                                },
                                "example": {
                                  "Claro_AR": 27
                                }
                              },
                              "totalCount": {
                                "type": "integer",
                                "description": "Total count of available numbers for this service",
                                "example": 12
                              }
                            }
                          }
                        },
                        "totalAmount": {
                          "type": "integer",
                          "description": "Total count of available numbers for all services",
                          "example": 1735
                        },
                        "allOperators": {
                          "type": "array",
                          "description": "List of all available operators in this country",
                          "items": {
                            "type": "string",
                            "example": "Claro_AR"
                          }
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0. The API may return HTTP 200 for this result.",
                      "example": "Incorrect duration type. Available types: week, month"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=getdataWithProviders&apikey=yourapikeyhere&country=KZ&dtype=week&dcount=1&extend=1'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=getdataWithProviders&apikey=yourapikeyhere&country=KZ&dtype=week&dcount=1&extend=1\",\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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'getdataWithProviders',\n    apikey: 'yourapikeyhere',\n    country: 'KZ',\n    dtype: 'week',\n    dcount: '1',\n    extend: '1'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=getdataWithProviders&apikey=yourapikeyhere&country=KZ&dtype=week&dcount=1&extend=1\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=getCountWithProviders": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "summary": "Counts by Provider",
        "description": "Returns number counts grouped by service code. For each service, `Amount` maps provider names to counts and `Total` is the combined count. Service codes and provider names are dynamic keys, not a fixed list.\n\nCheck the JSON `status` even when HTTP is 200. If `status=0`, `msg` contains the error message.\n",
        "operationId": "rent_getCountWithProviders",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "getCountWithProviders"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Optional API key. When supplied, it may affect personalized rental data.",
            "required": false,
            "schema": {
              "example": "yourapikeyhere",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "country",
            "required": true,
            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
            "schema": {
              "example": "KZ",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dtype",
            "required": false,
            "description": "Type of period: week or month Defaults to week when omitted.",
            "schema": {
              "example": "week",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dcount",
            "required": false,
            "description": "Count type of period, i.e. if dtype=week then counts of weeks Defaults to 1 when omitted.",
            "schema": {
              "example": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "description": "Service codes mapped to provider counts and totals.",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "Amount": {
                            "type": "object",
                            "description": "Provider names mapped to available number counts.",
                            "additionalProperties": {
                              "type": "integer"
                            }
                          },
                          "Total": {
                            "type": "integer",
                            "description": "Total available numbers for the service."
                          }
                        }
                      },
                      "example": {
                        "opt48": {
                          "Amount": {
                            "Limbo_AT": 12,
                            "Tele2_AT": 1,
                            "yesss_AT": 69
                          },
                          "Total": 82
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "Incorrect duration type. Available types: week, month"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=getCountWithProviders&apikey=yourapikeyhere&country=KZ&dtype=week&dcount=1'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=getCountWithProviders&apikey=yourapikeyhere&country=KZ&dtype=week&dcount=1\",\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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'getCountWithProviders',\n    apikey: 'yourapikeyhere',\n    country: 'KZ',\n    dtype: 'week',\n    dcount: '1'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=getCountWithProviders&apikey=yourapikeyhere&country=KZ&dtype=week&dcount=1\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=prolong": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Prolongation order",
        "description": "Extends an existing rental order by the requested number of weeks or months. Check `canprolong`, `canprolongmax` and `canprolonguntil` in [Rental Orders](/#operation/rent_orders) before calling this method.\n",
        "operationId": "rent_prolong",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "prolong"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "example": "yourapikeyhere",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "required": true,
            "description": "ID of order",
            "schema": {
              "example": 123,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "dtype",
            "required": true,
            "description": "Type of period: week or month",
            "schema": {
              "example": "week",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dcount",
            "required": true,
            "description": "Count type of period, i.e. if dtype=week then counts of weeks",
            "schema": {
              "example": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response with order prolongation status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    }
                  }
                },
                "examples": {
                  "success": {
                    "summary": "Successful prolongation",
                    "value": {
                      "status": 1
                    }
                  },
                  "errorIncorrectId": {
                    "summary": "Incorrect order id",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect order id"
                    }
                  },
                  "errorNotFound": {
                    "summary": "Order not found",
                    "value": {
                      "status": 0,
                      "msg": "Order not found"
                    }
                  },
                  "errorDurationType": {
                    "summary": "Incorrect duration type",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect duration type. Available types: week, month"
                    }
                  },
                  "errorDurationCount": {
                    "summary": "Incorrect duration count",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect duration count. Min 7 days. Max 90 days."
                    }
                  },
                  "errorInsufficientFunds": {
                    "summary": "Insufficient funds in account",
                    "value": {
                      "status": 0,
                      "msg": "Insufficient balance"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=prolong&apikey=yourapikeyhere&id=123&dtype=week&dcount=1'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=prolong&apikey=yourapikeyhere&id=123&dtype=week&dcount=1\",\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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'prolong',\n    apikey: 'yourapikeyhere',\n    id: '123',\n    dtype: 'week',\n    dcount: '1'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=prolong&apikey=yourapikeyhere&id=123&dtype=week&dcount=1\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=prolong_max": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Max prolongation order",
        "description": "Extends a rental order in daily increments using `dtype=day`. Check `canprolong`, `canprolongmax` and `canprolonguntil` in [Rental Orders](/#operation/rent_orders) before requesting an extension.\n\nSee [Getting list of orders](/#operation/rent_orders) to check canprolongmax before calling this method.\n",
        "operationId": "rent_prolong_max",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "prolong_max"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "example": "yourapikeyhere",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "required": true,
            "description": "ID of order",
            "schema": {
              "example": 123,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "dtype",
            "required": true,
            "description": "Duration type - must always be \"day\"",
            "schema": {
              "example": "day",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dcount",
            "required": true,
            "description": "Number of days to extend (1-6). The requested extension must also fit within the order-specific canprolongmax limit.",
            "schema": {
              "example": 5,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response with order max prolongation status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    }
                  }
                },
                "examples": {
                  "success": {
                    "summary": "Successfully extended by up to 7 days",
                    "value": {
                      "status": 1
                    }
                  },
                  "errorIncorrectId": {
                    "summary": "Incorrect order id",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect order id"
                    }
                  },
                  "errorNotFound": {
                    "summary": "Order not found",
                    "value": {
                      "status": 0,
                      "msg": "Order not found"
                    }
                  },
                  "errorInvalidParams": {
                    "summary": "Invalid duration parameters",
                    "value": {
                      "status": 0,
                      "msg": "More than 7 days or type is not day"
                    }
                  },
                  "errorInsufficientFunds": {
                    "summary": "Insufficient funds in account",
                    "value": {
                      "status": 0,
                      "msg": "Insufficient balance"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=prolong_max&apikey=yourapikeyhere&id=123&dtype=day&dcount=5'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=prolong_max&apikey=yourapikeyhere&id=123&dtype=day&dcount=5\",\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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'prolong_max',\n    apikey: 'yourapikeyhere',\n    id: '123',\n    dtype: 'day',\n    dcount: '5'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=prolong_max&apikey=yourapikeyhere&id=123&dtype=day&dcount=5\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=delete": {
      "get": {
        "tags": [
          "rent_all_methods"
        ],
        "summary": "Removing order",
        "description": "Removing",
        "operationId": "rent_delete",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "delete"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "ID of order",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "ID of order",
                          "example": 123
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "Incorrect order id"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=delete&apikey=SOME_STRING_VALUE&id=SOME_INTEGER_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=delete&apikey=SOME_STRING_VALUE&id=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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'delete', apikey: 'SOME_STRING_VALUE', id: 'SOME_INTEGER_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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=delete&apikey=SOME_STRING_VALUE&id=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=get_rent_history": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Getting history of rental",
        "description": "Returns completed rental orders and their restoration eligibility. Check `isAvailForRestore` before attempting restoration.\n\nTo restore an eligible order, first call [Restore Precalculation](/#operation/rent_restore_user_precalc) to check cost and duration, then [Restore Rental](/#operation/rent_restore_user).\n",
        "operationId": "rent_get_rent_history",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "get_rent_history"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "example": "yourapikeyhere",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "skip",
            "description": "Number of items to skip",
            "schema": {
              "example": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "take",
            "description": "Number of items received",
            "schema": {
              "example": 10,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "integer",
                            "description": "ID of order",
                            "example": 857191
                          },
                          "resourceCode": {
                            "type": "string",
                            "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
                            "example": "opt9"
                          },
                          "number": {
                            "type": "string",
                            "description": "rented phone number with country code without plus sign",
                            "example": "37067787324"
                          },
                          "branchId": {
                            "type": "integer",
                            "description": "Internal branch ID for the order",
                            "example": 684
                          },
                          "haveSms": {
                            "type": "boolean",
                            "description": "Whether SMS was received on this number during the rental",
                            "example": false
                          },
                          "isAvailForRestore": {
                            "type": "boolean",
                            "description": "Whether this order can be restored (renewed). If true, you can use the Restore method to renew this rental with a new number.",
                            "example": true
                          },
                          "days": {
                            "type": "integer",
                            "description": "Number of days the order was rented for",
                            "example": 30
                          },
                          "country": {
                            "type": "string",
                            "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
                            "example": "LT"
                          },
                          "begin": {
                            "type": "integer",
                            "description": "UNIX timestamp of start date",
                            "example": 1768902473
                          },
                          "end": {
                            "type": "integer",
                            "description": "UNIX timestamp of end date",
                            "example": 1771494473
                          },
                          "closed": {
                            "type": "integer",
                            "description": "UNIX timestamp of closed date",
                            "example": 1768903921
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=get_rent_history&apikey=yourapikeyhere&skip=0&take=10'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=get_rent_history&apikey=yourapikeyhere&skip=0&take=10\",\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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'get_rent_history', apikey: 'yourapikeyhere', skip: '0', take: '10'}\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=get_rent_history&apikey=yourapikeyhere&skip=0&take=10\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=restore_user_precalc": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Precalcution of restoring",
        "description": "First step to restore an expired rental order. This method calculates the cost of restoration and checks availability. You get the price and details needed before actually restoring the order. Use the order ID from Getting rent history method.\n\nUse [Getting rent history](/#operation/rent_get_rent_history) to find expired orders with `isAvailForRestore: true`.\n\nAfter getting the calculation, call [Restoring of outdated order](/#operation/rent_restore_user) to actually restore the order.\n",
        "operationId": "rent_restore_user_precalc",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "restore_user_precalc"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "ID of order",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "Status of the response: 1 for success, 0 for failure",
                      "example": 1
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "ccode": {
                          "type": "string",
                          "description": "Country code of number<br><a href='/#tag/rent_lists/Countries-list'>Countries list</a>",
                          "example": "LT"
                        },
                        "scode": {
                          "type": "string",
                          "description": "Service code<br><a href='/#tag/rent_lists/Services-list'>Services list</a>",
                          "example": "opt9"
                        },
                        "price": {
                          "type": "number",
                          "description": "Cost to restore this order",
                          "example": 1.5
                        },
                        "sname": {
                          "type": "string",
                          "description": "Service name",
                          "example": "Instagram"
                        },
                        "pnumber": {
                          "type": "string",
                          "description": "rented phone number with country code without plus sign",
                          "example": "37067787324"
                        },
                        "outdays": {
                          "type": "integer",
                          "description": "Number of days since the order expired",
                          "example": 5
                        },
                        "orderid": {
                          "type": "integer",
                          "description": "ID of order",
                          "example": 857191
                        },
                        "prolongTo": {
                          "type": "integer",
                          "description": "Number of days for which the restored order will be active",
                          "example": 30
                        }
                      }
                    },
                    "msg": {
                      "type": "string",
                      "description": "Error message when status is 0.",
                      "example": "Incorrect order id"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=restore_user_precalc&apikey=SOME_STRING_VALUE&id=SOME_INTEGER_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=restore_user_precalc&apikey=SOME_STRING_VALUE&id=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]);\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://smspva.com/api/rent.php',\n  qs: {\n    method: 'restore_user_precalc',\n    apikey: 'SOME_STRING_VALUE',\n    id: 'SOME_INTEGER_VALUE'\n  }\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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=restore_user_precalc&apikey=SOME_STRING_VALUE&id=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent.php?method=restore_user": {
      "get": {
        "tags": [
          "rent_fast_start",
          "rent_all_methods"
        ],
        "summary": "Restoring of outdated order",
        "description": "Restores an eligible completed rental order. Find its ID in [Rental History](/#operation/rent_get_rent_history), check `isAvailForRestore`, and call [Restore Precalculation](/#operation/rent_restore_user_precalc) to check cost and duration before this request.\n\nOn success, `status=1` and `data.id` contains the new restored order ID. On failure, `status=0` and `msg` contains the error. Use [Rental Orders](/#operation/rent_orders) to check the restored order.\n",
        "operationId": "rent_restore_user",
        "parameters": [
          {
            "in": "query",
            "name": "method",
            "description": "Method name",
            "required": true,
            "schema": {
              "type": "string",
              "example": "restore_user"
            }
          },
          {
            "in": "query",
            "name": "apikey",
            "description": "Your API key <br> You can find it on the website in the top right drop-down menu in the Profile and APIKEY section",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "description": "ID of order",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The response contains a restored order ID when the request succeeds, or an error message when it fails.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "title": "Success",
                      "description": "Successful restore response.",
                      "required": [
                        "status",
                        "data"
                      ],
                      "properties": {
                        "status": {
                          "type": "integer",
                          "description": "Request status. `1` means the order was restored successfully.",
                          "example": 1
                        },
                        "data": {
                          "type": "object",
                          "description": "Restored order data.",
                          "required": [
                            "id"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "New restored order ID.",
                              "example": 123456
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "title": "Error",
                      "description": "Error response.",
                      "required": [
                        "status",
                        "msg"
                      ],
                      "properties": {
                        "status": {
                          "type": "integer",
                          "description": "Request status. `0` means the restore request failed.",
                          "example": 0
                        },
                        "msg": {
                          "type": "string",
                          "description": "Error message.",
                          "example": "Incorrect order id"
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Successful restore",
                    "value": {
                      "status": 1,
                      "data": {
                        "id": 123456
                      }
                    }
                  },
                  "incorrectOrderId": {
                    "summary": "Incorrect order ID",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect order id"
                    }
                  },
                  "orderNotFound": {
                    "summary": "Order not found",
                    "value": {
                      "status": 0,
                      "msg": "Order not found"
                    }
                  },
                  "noBalance": {
                    "summary": "Not enough balance",
                    "value": {
                      "status": 0,
                      "msg": "NOBALANCE_12.50"
                    }
                  },
                  "numberBusy": {
                    "summary": "Number is busy",
                    "value": {
                      "status": 0,
                      "msg": "The number is busy, there is already an order for this service"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent.php?method=restore_user&apikey=SOME_STRING_VALUE&id=SOME_INTEGER_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent.php?method=restore_user&apikey=SOME_STRING_VALUE&id=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]);\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://smspva.com/api/rent.php',\n  qs: {method: 'restore_user', apikey: 'SOME_STRING_VALUE', id: 'SOME_INTEGER_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(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent.php?method=restore_user&apikey=SOME_STRING_VALUE&id=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    }
  },
  "components": {
    "responses": {
      "406": {
        "description": "Didn't find order for this number and service",
        "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": "Not found"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        }
      },
      "501": {
        "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": 501
                },
                "error": {
                  "description": "Response data",
                  "properties": {
                    "type": {
                      "description": "Error type",
                      "type": "string",
                      "example": "SERVER_FAIL"
                    },
                    "description": {
                      "description": "Server failed to process request",
                      "type": "string",
                      "example": "Not found"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        }
      },
      "503": {
        "description": "This number is unavailable for SMS receiving.",
        "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": "NUMBER_UNAVAILABLE"
                    },
                    "description": {
                      "description": "This number is no longer in the system",
                      "type": "string",
                      "example": "Not found"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        }
      },
      "504": {
        "description": "Modem holding this number is busy. Please try later.",
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "statusCode": {
                  "description": "Result status code",
                  "type": "integer",
                  "example": 504
                },
                "error": {
                  "description": "Response data",
                  "properties": {
                    "type": {
                      "description": "Error type",
                      "type": "string",
                      "example": "MODEM_IS_BUSY"
                    },
                    "description": {
                      "description": "Modem is busy, try later",
                      "type": "string",
                      "example": "Not found"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        }
      },
      "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."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "emailApiKey": {
        "type": "apiKey",
        "name": "apikey",
        "in": "query"
      },
      "activationV1ApiKey": {
        "type": "apiKey",
        "name": "apikey",
        "in": "query"
      },
      "apikey": {
        "type": "apiKey",
        "name": "apikey",
        "in": "header"
      }
    },
    "schemas": {
      "Provider": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Provider ID.",
            "example": 6
          },
          "pcode": {
            "type": "string",
            "description": "Provider code used in filters and orders.",
            "example": "outlookcom"
          },
          "name": {
            "type": "string",
            "description": "Display name.",
            "example": "Microsoft Outlook"
          }
        }
      },
      "Error": {
        "title": "Error",
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "errorid": {
            "type": "integer",
            "description": "Optional structured error code."
          },
          "errormsg": {
            "type": "string",
            "description": "Optional error description."
          },
          "msg": {
            "type": "string",
            "description": "Error message."
          }
        },
        "required": [
          "status"
        ],
        "description": "Some errors include errorid and errormsg; others contain only msg. Check all available error fields."
      },
      "Service": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Available mailbox count.",
            "example": 40
          },
          "scode": {
            "type": "string",
            "description": "Service code used to create an order.",
            "example": "twitter"
          },
          "sname": {
            "type": "string",
            "description": "Service display name.",
            "example": "Twitter"
          },
          "price": {
            "type": "number",
            "description": "Daily rental price in USD.",
            "example": 0.1
          },
          "alias_price": {
            "type": "number",
            "description": "Alias access price. Aliases are supported only for Gmail.",
            "example": 0.25
          },
          "icon": {
            "type": "string",
            "description": "Service icon path.",
            "example": "/templates/SMSv1EN/images/ico/twitter.png"
          },
          "months_discount": {
            "type": "integer",
            "description": "Percentage discount for rental periods of at least 30 days.",
            "example": 20
          }
        }
      },
      "Count": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Available mailbox count.",
            "example": 40
          },
          "scode": {
            "type": "string",
            "description": "Service code.",
            "example": "twitter"
          }
        }
      },
      "CreatedOrder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Order ID. Pass this as orderid in subsequent requests.",
            "example": 123456
          },
          "email": {
            "type": "string",
            "description": "Assigned email address.",
            "example": "mailbox@outlook.com"
          },
          "scode": {
            "type": "string",
            "description": "Service code.",
            "example": "twitter"
          },
          "pcode": {
            "type": "string",
            "description": "Actual assigned provider code.",
            "example": "outlookcom"
          },
          "expireDate": {
            "type": "integer",
            "description": "Rental expiry as a Unix timestamp in seconds.",
            "example": 1855324800
          }
        }
      },
      "Alias": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Existing alias ID. Pass this as aliasid.",
            "example": 88
          },
          "address": {
            "type": "string",
            "description": "Alias email address.",
            "example": "sam.ple@gmail.com"
          },
          "mesCount": {
            "type": "integer",
            "description": "Message count for this alias.",
            "example": 1
          },
          "isPaid": {
            "type": "boolean",
            "description": "Whether access to this alias has been paid for.",
            "example": false
          }
        }
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Order ID.",
            "example": 123456
          },
          "address": {
            "type": "string",
            "description": "Email address. This field is named email in the create_order response.",
            "example": "mailbox@outlook.com"
          },
          "scode": {
            "type": "string",
            "description": "Service code.",
            "example": "twitter"
          },
          "pcode": {
            "type": "string",
            "description": "Provider code.",
            "example": "outlookcom"
          },
          "expireDate": {
            "type": "integer",
            "description": "Rental expiry as a Unix timestamp in seconds.",
            "example": 1855324800
          },
          "mesCount": {
            "type": "integer",
            "description": "Message count.",
            "example": 1
          },
          "aliases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Alias"
            }
          },
          "sname": {
            "type": "string",
            "description": "Service display name.",
            "example": "Twitter"
          }
        }
      },
      "Mail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Message ID. Pass this as emailid to get_mail_body.",
            "example": 6
          },
          "sender": {
            "type": "string",
            "description": "Sender address.",
            "example": "noreply@example.com"
          },
          "subject": {
            "type": "string",
            "description": "Message subject.",
            "example": "Verification code"
          },
          "preview": {
            "type": "string",
            "description": "Message preview.",
            "example": "Your code: 12345"
          },
          "addedAt": {
            "type": "string",
            "description": "Message timestamp.",
            "example": "2026-10-22T10:00:00.000Z",
            "format": "date-time"
          }
        }
      },
      "MailBody": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Message ID.",
            "example": 6
          },
          "sender": {
            "type": "string",
            "description": "Sender address.",
            "example": "noreply@example.com"
          },
          "subject": {
            "type": "string",
            "description": "Message subject.",
            "example": "Verification code"
          },
          "body": {
            "type": "string",
            "description": "Message body, which may contain HTML. Treat it as untrusted content when rendering.",
            "example": "<p>Your code: 12345</p>"
          },
          "addedAt": {
            "type": "string",
            "description": "Message timestamp.",
            "example": "2026-10-22T10:00:00.000Z",
            "format": "date-time"
          }
        }
      },
      "OrderResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Order ID.",
            "example": 123456
          },
          "email": {
            "type": "string",
            "description": "Email address.",
            "example": "mailbox@outlook.com"
          },
          "service": {
            "type": "string",
            "description": "Service display name, not a service code.",
            "example": "Twitter"
          }
        }
      },
      "ArchivedOrder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Archived order ID used for restoration.",
            "example": 123455
          },
          "address": {
            "type": "string",
            "description": "Email address.",
            "example": "archived@outlook.com"
          },
          "scode": {
            "type": "string",
            "description": "Service code.",
            "example": "twitter"
          },
          "pcode": {
            "type": "string",
            "description": "Provider code.",
            "example": "outlookcom"
          },
          "expireDate": {
            "type": "integer",
            "description": "Rental expiry as a Unix timestamp in seconds.",
            "example": 1767225600
          },
          "sname": {
            "type": "string",
            "description": "Service display name.",
            "example": "Twitter"
          }
        }
      }
    },
    "parameters": {
      "pcode": {
        "name": "pcode",
        "in": "query",
        "required": false,
        "description": "Provider code from Get Providers. Omit this parameter entirely to use all providers; do not send an empty value or null.",
        "schema": {
          "type": "string"
        },
        "example": "outlookcom"
      },
      "apikey": {
        "name": "apikey",
        "in": "query",
        "required": true,
        "description": "Account API key. Reading messages and managing a rental require the order owner's key.",
        "schema": {
          "type": "string"
        },
        "example": "YOUR_API_KEY"
      },
      "dtype": {
        "name": "dtype",
        "in": "query",
        "required": true,
        "description": "Rental period unit: day = 1 day, week = 7 days, month = 30 days.",
        "schema": {
          "type": "string",
          "enum": [
            "day",
            "week",
            "month"
          ]
        },
        "example": "week"
      },
      "dcount": {
        "name": "dcount",
        "in": "query",
        "required": true,
        "description": "Positive number of rental period units.",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 1
      },
      "orderid": {
        "name": "orderid",
        "in": "query",
        "required": true,
        "description": "Order ID from Create Order, Active Orders or Archived Orders, as appropriate for this method.",
        "schema": {
          "type": "integer"
        },
        "example": 123456
      },
      "t": {
        "name": "t",
        "in": "query",
        "required": false,
        "description": "Page size.",
        "schema": {
          "type": "integer",
          "default": 50
        },
        "example": 50
      },
      "s": {
        "name": "s",
        "in": "query",
        "required": false,
        "description": "Pagination offset.",
        "schema": {
          "type": "integer",
          "default": 0
        },
        "example": 0
      },
      "sq": {
        "name": "sq",
        "in": "query",
        "required": false,
        "description": "Search string. URL-encode this value.",
        "schema": {
          "type": "string"
        },
        "example": "verification"
      },
      "aliasid": {
        "name": "aliasid",
        "in": "query",
        "required": true,
        "description": "Existing alias ID from aliases in Active Orders. orderid must identify its parent order.",
        "schema": {
          "type": "integer"
        },
        "example": 88
      }
    }
  }
}
