{
  "openapi": "3.0.0",
  "info": {
    "title": "SMSPVA Private Email Rental API",
    "version": "1.0.0",
    "description": "Private Email Rental subset of the published documentation. Original query-dispatch paths, methods, parameters and responses are preserved."
  },
  "servers": [
    {
      "url": "https://smspva.com"
    }
  ],
  "paths": {
    "/api/rent_email.php?method=get_providers": {
      "get": {
        "tags": [
          "email_lists",
          "email_all_methods"
        ],
        "summary": "Get Providers",
        "operationId": "email_get_providers",
        "description": "Returns enabled email providers. Build your provider selector from this response rather than hardcoding names or codes. A listed provider may have no mailboxes for a particular service.\n\nUse its `pcode` with [Services and Prices](/#operation/email_get_data), [Mailbox Counts](/#operation/email_get_count) and [Create Order](/#operation/email_create_order).\n",
        "parameters": [
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "get_providers"
              ]
            },
            "example": "get_providers"
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Provider"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": [
                        {
                          "id": 2,
                          "pcode": "gmailcom",
                          "name": "Gmail"
                        },
                        {
                          "id": 6,
                          "pcode": "outlookcom",
                          "name": "Microsoft Outlook"
                        }
                      ]
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Provider not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?method=get_providers'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent_email.php?method=get_providers\",\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_email.php',\n  qs: {method: 'get_providers'}\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_email.php?method=get_providers\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=get_data": {
      "get": {
        "tags": [
          "email_lists",
          "email_all_methods"
        ],
        "summary": "Services and Prices",
        "operationId": "email_get_data",
        "description": "Returns services, daily prices and available mailbox counts. Without `pcode`, availability is aggregated across enabled providers; pass a code from [Get Providers](/#operation/email_get_providers) to filter by provider.\n\nUse `scode` when calling [Create Order](/#operation/email_create_order). Refresh availability with [Mailbox Counts](/#operation/email_get_count) when the provider changes. Prices are in USD; `months_discount` applies to rental periods of at least 30 days. Alias access is available only for Gmail.\n",
        "parameters": [
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "get_data"
              ]
            },
            "example": "get_data"
          },
          {
            "$ref": "#/components/parameters/pcode"
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Service"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": [
                        {
                          "count": 40,
                          "scode": "twitter",
                          "sname": "Twitter",
                          "price": 0.1,
                          "alias_price": 0.25,
                          "icon": "/templates/SMSv1EN/images/ico/twitter.png",
                          "months_discount": 20
                        }
                      ]
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Provider not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?method=get_data&pcode=SOME_STRING_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent_email.php?method=get_data&pcode=SOME_STRING_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_email.php',\n  qs: {method: 'get_data', pcode: 'SOME_STRING_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent_email.php?method=get_data&pcode=SOME_STRING_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=get_count": {
      "get": {
        "tags": [
          "email_lists",
          "email_all_methods"
        ],
        "summary": "Mailbox Counts",
        "operationId": "email_get_count",
        "description": "Returns counts by service, optionally filtered by provider. Without `pcode`, counts are aggregated across enabled providers. Match entries by `scode`; a missing service has zero available mailboxes. An empty `data` array means none are available.\n\nCounts may be cached for up to 15 seconds and do not reserve a mailbox. When changing providers, replace the previous counts completely and ignore late responses for earlier selections. Use the same provider when calling [Create Order](/#operation/email_create_order).\n",
        "parameters": [
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "get_count"
              ]
            },
            "example": "get_count"
          },
          {
            "$ref": "#/components/parameters/pcode"
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Count"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": [
                        {
                          "count": 40,
                          "scode": "twitter"
                        },
                        {
                          "count": 38,
                          "scode": "fb"
                        }
                      ]
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Provider not found"
                    }
                  },
                  "empty": {
                    "summary": "Empty result",
                    "value": {
                      "status": 1,
                      "data": []
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?method=get_count&pcode=SOME_STRING_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent_email.php?method=get_count&pcode=SOME_STRING_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_email.php',\n  qs: {method: 'get_count', pcode: 'SOME_STRING_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"smspva.com\")\n\nconn.request(\"GET\", \"/api/rent_email.php?method=get_count&pcode=SOME_STRING_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=create_order": {
      "get": {
        "tags": [
          "email_fast_start",
          "email_all_methods"
        ],
        "summary": "Create Order",
        "operationId": "email_create_order",
        "description": "Rents a mailbox for the selected service and duration. Get `scode`, prices and counts from [Services and Prices](/#operation/email_get_data) and provider codes from [Get Providers](/#operation/email_get_providers).\n\nTo accept any available provider, omit `pcode` entirely. Do not send `pcode=`, an empty string or null. If you specify a provider, the API uses only that provider and will not substitute another when stock runs out.\n\nThe period is `dcount` multiplied by 1, 7 or 30 days for `day`, `week` or `month`. Cost is based on the daily service price and rental period; the configured `months_discount` applies from 30 days. If `status=2`, no mailbox was available: refresh [Mailbox Counts](/#operation/email_get_count).\n\nSave `data.id` as `orderid`, along with the address, actual provider and expiry. Read messages using [List Messages](/#operation/email_get_mails); refresh order details using [Active Orders](/#operation/email_get_orders).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "create_order"
              ]
            },
            "example": "create_order"
          },
          {
            "name": "scode",
            "in": "query",
            "required": true,
            "description": "Service code from Services and Prices.",
            "schema": {
              "type": "string"
            },
            "example": "twitter"
          },
          {
            "$ref": "#/components/parameters/pcode"
          },
          {
            "$ref": "#/components/parameters/dtype"
          },
          {
            "$ref": "#/components/parameters/dcount"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "$ref": "#/components/schemas/CreatedOrder"
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "title": "No mailboxes available",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            2
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "providerError": {
                    "summary": "Unknown or disabled provider",
                    "value": {
                      "status": 0,
                      "errorid": 9,
                      "errormsg": "Provider not found",
                      "msg": "Provider not found"
                    }
                  },
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": {
                        "id": 123456,
                        "email": "mailbox@outlook.com",
                        "scode": "twitter",
                        "pcode": "outlookcom",
                        "expireDate": 1855324800
                      }
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  },
                  "noStock": {
                    "summary": "No mailboxes available",
                    "value": {
                      "status": 2
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=create_order&scode=SOME_STRING_VALUE&pcode=SOME_STRING_VALUE&dtype=SOME_STRING_VALUE&dcount=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_email.php?apikey=SOME_STRING_VALUE&method=create_order&scode=SOME_STRING_VALUE&pcode=SOME_STRING_VALUE&dtype=SOME_STRING_VALUE&dcount=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_email.php',\n  qs: {\n    apikey: 'SOME_STRING_VALUE',\n    method: 'create_order',\n    scode: 'SOME_STRING_VALUE',\n    pcode: 'SOME_STRING_VALUE',\n    dtype: 'SOME_STRING_VALUE',\n    dcount: '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_email.php?apikey=SOME_STRING_VALUE&method=create_order&scode=SOME_STRING_VALUE&pcode=SOME_STRING_VALUE&dtype=SOME_STRING_VALUE&dcount=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=get_orders": {
      "get": {
        "tags": [
          "email_fast_start",
          "email_all_methods"
        ],
        "summary": "Active Orders",
        "operationId": "email_get_orders",
        "description": "Returns active mailbox rentals, message counts and any available aliases. The address field is `address` here, while [Create Order](/#operation/email_create_order) returns it as `email`.\n\nUse the order ID for [List Messages](/#operation/email_get_mails) and [Prolong Rental](/#operation/email_prolong_order). For Gmail aliases, use an existing `aliases[].id` with [Buy Alias Access](/#operation/email_buy_alias); Outlook does not support aliases. Completed orders are listed in [Archived Orders](/#operation/email_get_archived_orders).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "get_orders"
              ]
            },
            "example": "get_orders"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Order"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": [
                        {
                          "id": 123456,
                          "address": "mailbox@outlook.com",
                          "scode": "twitter",
                          "pcode": "outlookcom",
                          "expireDate": 1855324800,
                          "mesCount": 1,
                          "aliases": [],
                          "sname": "Twitter"
                        },
                        {
                          "id": 123457,
                          "address": "sample@gmail.com",
                          "scode": "twitter",
                          "pcode": "gmailcom",
                          "expireDate": 1855324800,
                          "mesCount": 0,
                          "aliases": [
                            {
                              "id": 88,
                              "address": "sam.ple@gmail.com",
                              "mesCount": 1,
                              "isPaid": false
                            }
                          ],
                          "sname": "Twitter"
                        }
                      ]
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=get_orders'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=get_orders\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\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_email.php',\n  qs: {apikey: 'SOME_STRING_VALUE', method: 'get_orders'}\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_email.php?apikey=SOME_STRING_VALUE&method=get_orders\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=get_mails": {
      "get": {
        "tags": [
          "email_fast_start",
          "email_all_methods"
        ],
        "summary": "List Messages",
        "operationId": "email_get_mails",
        "description": "Lists message previews for a rental order owned by the supplied API key. Find `orderid` in [Active Orders](/#operation/email_get_orders). Use `t` and `s` for pagination and URL-encode the optional `sq` search string.\n\nPass a returned message `id` as `emailid` to [Get Message Body](/#operation/email_get_mail_body). An empty `data` array is a successful response with no matching messages.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "get_mails"
              ]
            },
            "example": "get_mails"
          },
          {
            "$ref": "#/components/parameters/orderid"
          },
          {
            "$ref": "#/components/parameters/t"
          },
          {
            "$ref": "#/components/parameters/s"
          },
          {
            "$ref": "#/components/parameters/sq"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Mail"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": [
                        {
                          "id": 6,
                          "sender": "noreply@example.com",
                          "subject": "Verification code",
                          "preview": "Your code: 12345",
                          "addedAt": "2026-10-22T10:00:00.000Z"
                        }
                      ]
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  },
                  "empty": {
                    "summary": "Empty result",
                    "value": {
                      "status": 1,
                      "data": []
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=get_mails&orderid=SOME_INTEGER_VALUE&t=SOME_INTEGER_VALUE&s=SOME_INTEGER_VALUE&sq=SOME_STRING_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=get_mails&orderid=SOME_INTEGER_VALUE&t=SOME_INTEGER_VALUE&s=SOME_INTEGER_VALUE&sq=SOME_STRING_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_email.php',\n  qs: {\n    apikey: 'SOME_STRING_VALUE',\n    method: 'get_mails',\n    orderid: 'SOME_INTEGER_VALUE',\n    t: 'SOME_INTEGER_VALUE',\n    s: 'SOME_INTEGER_VALUE',\n    sq: 'SOME_STRING_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_email.php?apikey=SOME_STRING_VALUE&method=get_mails&orderid=SOME_INTEGER_VALUE&t=SOME_INTEGER_VALUE&s=SOME_INTEGER_VALUE&sq=SOME_STRING_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=get_mail_body": {
      "get": {
        "tags": [
          "email_fast_start",
          "email_all_methods"
        ],
        "summary": "Get Message Body",
        "operationId": "email_get_mail_body",
        "description": "Returns the full message. Use `emailid` from [List Messages](/#operation/email_get_mails) or [Alias Messages](/#operation/email_get_mails_by_alias), together with the parent rental `orderid`.\n\nThe `body` may contain HTML. Treat it as untrusted content and sanitize it before rendering in an application.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "get_mail_body"
              ]
            },
            "example": "get_mail_body"
          },
          {
            "$ref": "#/components/parameters/orderid"
          },
          {
            "name": "emailid",
            "in": "query",
            "required": true,
            "description": "Message ID returned by a message-list method.",
            "schema": {
              "type": "integer"
            },
            "example": 6
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "$ref": "#/components/schemas/MailBody"
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": {
                        "id": 6,
                        "sender": "noreply@example.com",
                        "subject": "Verification code",
                        "body": "<p>Your code: 12345</p>",
                        "addedAt": "2026-10-22T10:00:00.000Z"
                      }
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=get_mail_body&orderid=SOME_INTEGER_VALUE&emailid=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_email.php?apikey=SOME_STRING_VALUE&method=get_mail_body&orderid=SOME_INTEGER_VALUE&emailid=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_email.php',\n  qs: {\n    apikey: 'SOME_STRING_VALUE',\n    method: 'get_mail_body',\n    orderid: 'SOME_INTEGER_VALUE',\n    emailid: '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_email.php?apikey=SOME_STRING_VALUE&method=get_mail_body&orderid=SOME_INTEGER_VALUE&emailid=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=buy_alias": {
      "get": {
        "tags": [
          "email_all_methods"
        ],
        "summary": "Buy Alias Access",
        "operationId": "email_buy_alias",
        "description": "Purchases access to an existing Gmail alias. Outlook does not support aliases. Get `aliasid` from `aliases` in [Active Orders](/#operation/email_get_orders) and use the parent order ID as `orderid`.\n\nThis method buys access; it does not generate a new alias. There is no separate public alias-generation method. Read alias messages using [Alias Messages](/#operation/email_get_mails_by_alias).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "buy_alias"
              ]
            },
            "example": "buy_alias"
          },
          {
            "$ref": "#/components/parameters/orderid"
          },
          {
            "$ref": "#/components/parameters/aliasid"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "alias": {
                              "type": "string",
                              "description": "Alias address.",
                              "example": "sam.ple@gmail.com"
                            }
                          }
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": {
                        "alias": "sam.ple@gmail.com"
                      }
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=buy_alias&orderid=SOME_INTEGER_VALUE&aliasid=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_email.php?apikey=SOME_STRING_VALUE&method=buy_alias&orderid=SOME_INTEGER_VALUE&aliasid=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_email.php',\n  qs: {\n    apikey: 'SOME_STRING_VALUE',\n    method: 'buy_alias',\n    orderid: 'SOME_INTEGER_VALUE',\n    aliasid: '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_email.php?apikey=SOME_STRING_VALUE&method=buy_alias&orderid=SOME_INTEGER_VALUE&aliasid=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=get_mails_by_alias": {
      "get": {
        "tags": [
          "email_all_methods"
        ],
        "summary": "Alias Messages",
        "operationId": "email_get_mails_by_alias",
        "description": "Lists messages for an existing Gmail alias. Use the parent rental ID as `orderid`, not the alias ID. Find both IDs in [Active Orders](/#operation/email_get_orders); use [Buy Alias Access](/#operation/email_buy_alias) to purchase alias access.\n\nPagination and search use the same parameters as [List Messages](/#operation/email_get_mails). Retrieve full content with [Get Message Body](/#operation/email_get_mail_body), passing the parent `orderid` and returned message ID as `emailid`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "get_mails_by_alias"
              ]
            },
            "example": "get_mails_by_alias"
          },
          {
            "$ref": "#/components/parameters/orderid"
          },
          {
            "$ref": "#/components/parameters/aliasid"
          },
          {
            "$ref": "#/components/parameters/t"
          },
          {
            "$ref": "#/components/parameters/s"
          },
          {
            "$ref": "#/components/parameters/sq"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Mail"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": [
                        {
                          "id": 6,
                          "sender": "noreply@example.com",
                          "subject": "Verification code",
                          "preview": "Your code: 12345",
                          "addedAt": "2026-10-22T10:00:00.000Z"
                        }
                      ]
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  },
                  "empty": {
                    "summary": "Empty result",
                    "value": {
                      "status": 1,
                      "data": []
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=get_mails_by_alias&orderid=SOME_INTEGER_VALUE&aliasid=SOME_INTEGER_VALUE&t=SOME_INTEGER_VALUE&s=SOME_INTEGER_VALUE&sq=SOME_STRING_VALUE'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=get_mails_by_alias&orderid=SOME_INTEGER_VALUE&aliasid=SOME_INTEGER_VALUE&t=SOME_INTEGER_VALUE&s=SOME_INTEGER_VALUE&sq=SOME_STRING_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_email.php',\n  qs: {\n    apikey: 'SOME_STRING_VALUE',\n    method: 'get_mails_by_alias',\n    orderid: 'SOME_INTEGER_VALUE',\n    aliasid: 'SOME_INTEGER_VALUE',\n    t: 'SOME_INTEGER_VALUE',\n    s: 'SOME_INTEGER_VALUE',\n    sq: 'SOME_STRING_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_email.php?apikey=SOME_STRING_VALUE&method=get_mails_by_alias&orderid=SOME_INTEGER_VALUE&aliasid=SOME_INTEGER_VALUE&t=SOME_INTEGER_VALUE&s=SOME_INTEGER_VALUE&sq=SOME_STRING_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=prolong_order": {
      "get": {
        "tags": [
          "email_all_methods"
        ],
        "summary": "Prolong Rental",
        "operationId": "email_prolong_order",
        "description": "Extends a rental and deducts the cost from the account balance. Use the order ID from [Active Orders](/#operation/email_get_orders). `day`, `week` and `month` mean 1, 7 and 30 days per unit; `dcount` must be positive.\n\nThe service discount applies to extension periods of at least 30 days when configured. Refresh [Active Orders](/#operation/email_get_orders) after success to obtain the updated expiry; it is not included in this response.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "prolong_order"
              ]
            },
            "example": "prolong_order"
          },
          {
            "$ref": "#/components/parameters/orderid"
          },
          {
            "$ref": "#/components/parameters/dtype"
          },
          {
            "$ref": "#/components/parameters/dcount"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "$ref": "#/components/schemas/OrderResult"
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": {
                        "id": 123456,
                        "email": "mailbox@outlook.com",
                        "service": "Twitter"
                      }
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=prolong_order&orderid=SOME_INTEGER_VALUE&dtype=SOME_STRING_VALUE&dcount=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_email.php?apikey=SOME_STRING_VALUE&method=prolong_order&orderid=SOME_INTEGER_VALUE&dtype=SOME_STRING_VALUE&dcount=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_email.php',\n  qs: {\n    apikey: 'SOME_STRING_VALUE',\n    method: 'prolong_order',\n    orderid: 'SOME_INTEGER_VALUE',\n    dtype: 'SOME_STRING_VALUE',\n    dcount: '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_email.php?apikey=SOME_STRING_VALUE&method=prolong_order&orderid=SOME_INTEGER_VALUE&dtype=SOME_STRING_VALUE&dcount=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=get_archived_orders": {
      "get": {
        "tags": [
          "email_all_methods"
        ],
        "summary": "Archived Orders",
        "operationId": "email_get_archived_orders",
        "description": "Returns archived rentals. Use an archived order's `id` with [Restoration Cost](/#operation/email_calc_restore_order) before calling [Restore Rental](/#operation/email_restore_order).",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "get_archived_orders"
              ]
            },
            "example": "get_archived_orders"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ArchivedOrder"
                          }
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": [
                        {
                          "id": 123455,
                          "address": "archived@outlook.com",
                          "scode": "twitter",
                          "pcode": "outlookcom",
                          "expireDate": 1767225600,
                          "sname": "Twitter"
                        }
                      ]
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=get_archived_orders'"
          },
          {
            "lang": "Php + Curl",
            "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=get_archived_orders\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\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_email.php',\n  qs: {apikey: 'SOME_STRING_VALUE', method: 'get_archived_orders'}\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_email.php?apikey=SOME_STRING_VALUE&method=get_archived_orders\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=calc_restore_order": {
      "get": {
        "tags": [
          "email_all_methods"
        ],
        "summary": "Restoration Cost",
        "operationId": "email_calc_restore_order",
        "description": "Returns the current restoration cost in USD as a numeric `data` value. Find the order ID in [Archived Orders](/#operation/email_get_archived_orders).\n\nThis request does not restore the rental or charge the account. The price may change over time, so request it immediately before [Restore Rental](/#operation/email_restore_order).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "calc_restore_order"
              ]
            },
            "example": "calc_restore_order"
          },
          {
            "$ref": "#/components/parameters/orderid"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "number",
                          "description": "Current restoration cost in USD.",
                          "example": 0.7
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": 0.7
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=calc_restore_order&orderid=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_email.php?apikey=SOME_STRING_VALUE&method=calc_restore_order&orderid=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_email.php',\n  qs: {\n    apikey: 'SOME_STRING_VALUE',\n    method: 'calc_restore_order',\n    orderid: '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_email.php?apikey=SOME_STRING_VALUE&method=calc_restore_order&orderid=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=restore_order": {
      "get": {
        "tags": [
          "email_all_methods"
        ],
        "summary": "Restore Rental",
        "operationId": "email_restore_order",
        "description": "Restores an archived rental and deducts the restoration cost from the account balance. First obtain the order ID from [Archived Orders](/#operation/email_get_archived_orders) and check [Restoration Cost](/#operation/email_calc_restore_order).\n\nThis method does not accept a custom restoration duration. After success, refresh [Active Orders](/#operation/email_get_orders) for the current rental details.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "restore_order"
              ]
            },
            "example": "restore_order"
          },
          {
            "$ref": "#/components/parameters/orderid"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "$ref": "#/components/schemas/OrderResult"
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": {
                        "id": 123455,
                        "email": "archived@outlook.com",
                        "service": "Twitter"
                      }
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=restore_order&orderid=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_email.php?apikey=SOME_STRING_VALUE&method=restore_order&orderid=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_email.php',\n  qs: {\n    apikey: 'SOME_STRING_VALUE',\n    method: 'restore_order',\n    orderid: '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_email.php?apikey=SOME_STRING_VALUE&method=restore_order&orderid=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          }
        ]
      }
    },
    "/api/rent_email.php?method=cancel_order": {
      "get": {
        "tags": [
          "email_all_methods"
        ],
        "summary": "Cancel Order",
        "operationId": "email_cancel_order",
        "description": "Cancels a rental belonging to the API-key owner. Use the order ID from [Active Orders](/#operation/email_get_orders). A refund is not guaranteed by this method.",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikey"
          },
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "Method selector.",
            "schema": {
              "type": "string",
              "enum": [
                "cancel_order"
              ]
            },
            "example": "cancel_order"
          },
          {
            "$ref": "#/components/parameters/orderid"
          }
        ],
        "security": [
          {
            "emailApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check status in the JSON even when HTTP is 200. Examples use illustrative values.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Success",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "enum": [
                            1
                          ]
                        },
                        "data": {
                          "type": "boolean",
                          "example": true
                        }
                      },
                      "required": [
                        "status",
                        "data"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Success (illustrative)",
                    "value": {
                      "status": 1,
                      "data": true
                    }
                  },
                  "error": {
                    "summary": "Error",
                    "value": {
                      "status": 0,
                      "msg": "Incorrect apikey"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://smspva.com/api/rent_email.php?apikey=SOME_STRING_VALUE&method=cancel_order&orderid=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_email.php?apikey=SOME_STRING_VALUE&method=cancel_order&orderid=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_email.php',\n  qs: {\n    apikey: 'SOME_STRING_VALUE',\n    method: 'cancel_order',\n    orderid: '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_email.php?apikey=SOME_STRING_VALUE&method=cancel_order&orderid=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
      }
    }
  },
  "tags": [
    {
      "name": "email_fast_start",
      "x-displayName": "Quick Start",
      "description": "Rent private email mailboxes, read incoming messages, and manage the rental using `https://smspva.com/api/rent_email.php`. Pass the account API key as the `apikey` query parameter for order operations. Reading mail and managing a rental require the order owner's key.\n\nStart with [Get Providers](/#operation/email_get_providers) and [Services and Prices](/#operation/email_get_data). Refresh [Mailbox Counts](/#operation/email_get_count) for the selected provider, then [Create Order](/#operation/email_create_order) using that same `pcode`; omit it entirely to accept any provider. Keep the returned order ID for [List Messages](/#operation/email_get_mails) and [Get Message Body](/#operation/email_get_mail_body).\n\nCheck JSON `status` even when HTTP is 200: `1` means success, `0` means an error, and `2` means no mailbox was available when creating an order. Error details may be in `msg`, `errormsg` and optionally `errorid`. All addresses, prices, counts and IDs in examples are illustrative.\n\nIf a paid operation times out or the connection fails, check the current order state before retrying to avoid a duplicate purchase or extension.\n"
    },
    {
      "name": "email_lists",
      "x-displayName": "Data List",
      "description": "These methods do not require an API key. Get provider codes from [Get Providers](/#operation/email_get_providers), service codes and prices from [Services and Prices](/#operation/email_get_data), and availability from [Mailbox Counts](/#operation/email_get_count). Email service codes are separate from phone activation and rental codes.\n"
    },
    {
      "name": "email_all_methods",
      "x-displayName": "All Requests"
    },
    {
      "name": "email_errors",
      "x-displayName": "Errors",
      "description": "An application error has `status=0`, including when HTTP is 200. Some responses include `errorid`, `errormsg` and `msg`; others include only `msg`. Do not require a numeric code to recognize an error.\n\nStructured `errorid` values: **2** - unknown or unavailable service; **7** - invalid request parameters; **9** - unknown or disabled provider; **10** - active-order limit reached; **16** - order creation requests are too frequent. For error **9**, refresh [Get Providers](/#operation/email_get_providers). For `status=2` during creation, refresh [Mailbox Counts](/#operation/email_get_count).\n\nAuthentication errors include `Incorrect apikey` (missing or malformed key), `Unknown apikey` (account not found) and `User is not owner of order`. Balance errors include `Balance is not enough` and `Balance is lower than zero` (non-positive balance).\n\nOther messages include `Order not found`, `Aliases are only available for Gmail`, `Incorrect service code`, `Incorrect duration type`, `Incorrect duration count`, `Incorrect order id`, `Incorrect email id`, `Email service temporarily unavailable` and `Incorrect method`. Preserve these API messages when reporting errors; use them together with `status` and any structured error fields.\n"
    }
  ]
}
