{
    "openapi": "3.1.0",
    "info": {
        "title": "Bulletproof.to API",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "/api/v1"
        }
    ],
    "paths": {
        "/catalog": {
            "get": {
                "summary": "Plans, dedicated stock, hosting, TLDs, locations, OS images, coins (+ your price factor when logged in)",
                "tags": [
                    "Catalog"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                }
            }
        },
        "/domains/check": {
            "get": {
                "summary": "Check availability of a name across all TLDs (?name=), live registry check",
                "tags": [
                    "Catalog"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                }
            }
        },
        "/storefront/{slug}": {
            "get": {
                "summary": "Public storefront data for a reseller (brand + marked-up prices)",
                "tags": [
                    "Reseller"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/account": {
            "get": {
                "summary": "Your profile, balance and settings",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "patch": {
                "summary": "Update notification settings or IP retention. Username, email and PGP key need a logged-in session.",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "account"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/account/export": {
            "get": {
                "summary": "Everything we hold about you, as JSON",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "account"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/activity": {
            "get": {
                "summary": "Recent account activity (kept 30 days)",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/metrics/traffic": {
            "get": {
                "summary": "Daily inbound/outbound traffic of all your servers in bytes, last 30 days (UTC days), plus this month so far",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/ssh-keys": {
            "get": {
                "summary": "Your SSH public keys (used at deploy / reinstall)",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "post": {
                "summary": "Add an SSH public key {\"name\", \"key\"}",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "account"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "name": "laptop",
                                "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA\u2026 me@laptop"
                            }
                        }
                    }
                }
            }
        },
        "/ssh-keys/{id}": {
            "delete": {
                "summary": "Remove an SSH key",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "account"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers": {
            "get": {
                "summary": "List VPS and dedicated servers",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "post": {
                "summary": "Deploy servers. auth: \"ssh\" (keys: [ids]) or \"password\" (generated, returned once). VPS only: \"firewall\" = one of your firewall ids or \"none\"; left out, your default firewall (if any) is used. Price is computed server-side and charged from balance. \"promo\": a promo code (see GET /promos/check), otherwise the best automatic promo applies. With \"pay\": xmr|btc|ltc|usdt and a short balance, returns {checkout} with a payment for the difference instead, and the order runs once it is paid.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "kind": "vps",
                                "plan": "vps-2",
                                "location": "lt",
                                "image": "debian",
                                "quantity": 1,
                                "period": 1,
                                "auth": "password",
                                "tags": [
                                    "web"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/servers/{id}": {
            "get": {
                "summary": "Get one server (status, progress while installing)",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            },
            "patch": {
                "summary": "Rename, set tags or auto-renew",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "tags": [
                                    "prod",
                                    "db"
                                ],
                                "auto": true
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a server for good {\"confirm\": \"<server name>\"}. The disk is wiped, unused days are not refunded.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "confirm": "web-1"
                            }
                        }
                    }
                }
            }
        },
        "/servers/{id}/actions": {
            "post": {
                "summary": "Power and lifecycle: {\"action\": \"start|stop|reboot|reinstall\", \"image\": \"debian\", \"version\": \"13\"}. Dedicated servers: start, stop and reboot run like on a VPS (status goes to \"installing\" with a progress text, then \"running\" or \"stopped\"; one power action every few minutes); reinstall opens a ticket for our team.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "action": "reboot"
                            }
                        }
                    }
                }
            }
        },
        "/servers/bulk": {
            "post": {
                "summary": "Bulk action or tag: {\"ids\": [...], \"action\": \"stop\"} or {\"ids\": [...], \"addTag\": \"prod\"}",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "ids": [
                                    "srv-1001",
                                    "srv-1002"
                                ],
                                "action": "reboot"
                            }
                        }
                    }
                }
            }
        },
        "/servers/{id}/password": {
            "post": {
                "summary": "Show the server credentials: login user and password (generated, or the one our team delivered), the root password when the login is a normal user, the rescue system password and notes. Kept encrypted until you delete them.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            },
            "delete": {
                "summary": "Delete the stored credentials of a server from our side (they cannot be shown again)",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/rescue": {
            "delete": {
                "summary": "Mark the rescue system as finished (after a reboot from inside it) and forget its password. To leave it from here, reboot the server instead.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/live": {
            "get": {
                "summary": "Live readings of a VPS: CPU %, memory, network in / out and disk read / write in bytes per second (poll every few seconds)",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/history": {
            "get": {
                "summary": "Samples for charts (?range=hour|day|week|month): CPU %, memory %, network and disk in bytes per second",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/traffic": {
            "get": {
                "summary": "Traffic of a server in bytes: this month, last month, all time (in = download, out = upload) and the last 30 days",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/isos": {
            "get": {
                "summary": "ISO images a VPS can boot from (rescue systems, installers)",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/iso": {
            "post": {
                "summary": "Boot a VPS from an ISO {\"iso\": id from /isos} or eject it {\"iso\": null}. A running server restarts. Use the console to work in it.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "iso": "local:iso/systemrescue-11.02-amd64.iso"
                            }
                        }
                    }
                }
            }
        },
        "/firewalls": {
            "get": {
                "summary": "Your reusable firewalls, each with the ids of the servers using it",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "post": {
                "summary": "Create a reusable firewall {\"name\", \"policy\", \"rules\" (as for one server), \"servers\": [ids that use it]}",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "name": "Web servers",
                                "policy": "drop",
                                "rules": [
                                    {
                                        "action": "accept",
                                        "proto": "tcp",
                                        "port": "22",
                                        "source": "",
                                        "note": "SSH"
                                    },
                                    {
                                        "action": "accept",
                                        "proto": "tcp",
                                        "port": "80,443",
                                        "source": "",
                                        "note": "Web"
                                    }
                                ],
                                "servers": [
                                    "srv-k7m2x9qa"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/firewalls/lists": {
            "get": {
                "summary": "Your IP lists for firewall rules, each with what uses it",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "post": {
                "summary": "Create an IP list {\"name\", \"entries\": \"IPv4 or CIDR, comma or line separated\"}",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "name": "Office",
                                "entries": "203.0.113.10, 198.51.100.0/28"
                            }
                        }
                    }
                }
            }
        },
        "/firewalls/lists/{id}": {
            "put": {
                "summary": "Change an IP list; every rule using it gets the new addresses",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            },
            "delete": {
                "summary": "Delete an IP list (refused while a rule uses it)",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/promos/check": {
            "get": {
                "summary": "Check a promo code (?code=&kind=vps|dedicated|hosting|domain, optional &plan= plan id or TLD like .com): its terms and discounts per product, or why it cannot be used. Send it as \"promo\" with the order.",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/promos/auto": {
            "get": {
                "summary": "Promotions that apply without a code right now (each lists its products; an order gets the biggest one that fits)",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/account/ip": {
            "get": {
                "summary": "The IPv4 address your request comes from (for a firewall rule), nothing is stored",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/firewalls/{id}": {
            "put": {
                "summary": "Change a firewall; every server using it gets the new rules. \"servers\" (optional) is the full list that should use it",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            },
            "delete": {
                "summary": "Delete a firewall; servers that used it keep its rules as their own",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/firewall": {
            "put": {
                "summary": "Firewall of a VPS, in front of the VM: {\"profile\": firewall id} to use one of your firewalls, or own rules {\"on\", \"policy\" / \"policyOut\": \"accept\"|\"drop\" (incoming / outgoing traffic no rule matches), \"rules\": [{\"dir\": \"in\"|\"out\", \"action\": \"accept\"|\"drop\", \"proto\": \"tcp\"|\"udp\"|\"icmp\"|\"any\", \"port\": \"22\" | \"80,443\" | \"8000-8100\" | \"\", \"source\": the far side, \"\" | IPv4 / CIDR list, \"lists\": [IP list ids], \"local\": one of the server's IPv4 or \"\", \"on\": true|false, \"until\": ISO time a temporary rule ends or \"\", \"note\"}]}. First matching rule wins, replies to connections always get through.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "on": true,
                                "policy": "drop",
                                "rules": [
                                    {
                                        "action": "accept",
                                        "proto": "tcp",
                                        "port": "22",
                                        "source": "",
                                        "note": "SSH"
                                    },
                                    {
                                        "action": "accept",
                                        "proto": "tcp",
                                        "port": "80,443",
                                        "source": "",
                                        "note": "Web"
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/servers/{id}/snapshots": {
            "post": {
                "summary": "Take a snapshot of the disk of a VPS {\"label\"}. A few per server, kept a limited number of days (see GET /catalog, snapshots).",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "label": "Before the upgrade"
                            }
                        }
                    }
                }
            }
        },
        "/servers/{id}/snapshots/{name}/restore": {
            "post": {
                "summary": "Put the disk back to a snapshot. Everything written since is lost. A running server starts again from it.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/snapshots/{name}": {
            "delete": {
                "summary": "Delete a snapshot",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/stock/notify": {
            "post": {
                "summary": "Tell me when a sold-out VPS can be ordered again: {\"loc\", \"plan\" (optional, any plan when empty)}. Logged in, you are told through your notification channels; otherwise send \"email\", deleted from our list with the notice or after 60 days.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "loc": "lt",
                                "plan": "vps-1"
                            }
                        }
                    }
                }
            }
        },
        "/servers/{id}/upgrade": {
            "get": {
                "summary": "Bigger plans this VPS can move to, with what it costs now (the difference for the days already paid) and the new monthly price",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            },
            "post": {
                "summary": "Upgrade a VPS: {\"plan\": \"vps-3\"}. The difference for the days already paid is taken from your balance, the server reboots once with the new resources. Disks only grow, so plans cannot go down.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "plan": "vps-3"
                            }
                        }
                    }
                }
            }
        },
        "/servers/{id}/addons": {
            "get": {
                "summary": "Extra IPv4 and extra disk for a VPS: what it has, what each costs a month and today for the days already paid",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/ips": {
            "post": {
                "summary": "Add an extra IPv4 to a VPS. The difference for the days already paid is taken from your balance; add the address inside the OS (same gateway).",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/ips/{ip}": {
            "delete": {
                "summary": "Give an extra IPv4 back. It stops reaching the server and the monthly price goes down (days already paid are not refunded).",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "ip",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/ips/{ip}/primary": {
            "post": {
                "summary": "Make an extra IPv4 the main address. The server reboots with it, the old main address stays as an extra.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "ip",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/disk": {
            "post": {
                "summary": "Add disk to a VPS {\"gb\": 10} in 10 GB blocks, up to 100 GB extra. The difference for the days already paid is taken from your balance, the disk grows without a restart.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "gb": 20
                            }
                        }
                    }
                }
            }
        },
        "/servers/{id}/console": {
            "post": {
                "summary": "One-time noVNC console URL (valid 60 s)",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/servers/{id}/rdns": {
            "post": {
                "summary": "Set reverse DNS (PTR) for the server IP: {\"ptr\": \"mail.example.com\"}",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "servers"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "ptr": "mail.example.com"
                            }
                        }
                    }
                }
            }
        },
        "/servers/{id}/renew": {
            "post": {
                "summary": "Renew now from balance {\"months\": 1|3|12, optional, the billing period when left out}. Pays the open renewal invoice when the period matches. Unsuspends. To pay with crypto use POST /billing/renew.",
                "tags": [
                    "Servers"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "months": 3
                            }
                        }
                    }
                }
            }
        },
        "/hosting/{id}/renew": {
            "post": {
                "summary": "Renew a hosting account now from balance. Unsuspends.",
                "tags": [
                    "Hosting"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/hosting": {
            "get": {
                "summary": "List Plesk hosting accounts",
                "tags": [
                    "Hosting"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "post": {
                "summary": "Create a hosting account. domain.mode is new, mine, external or sub. \"pay\" and \"promo\" work as on POST /servers (a promo never covers the domain).",
                "tags": [
                    "Hosting"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "hosting"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "plan": "host-2",
                                "location": "lt",
                                "domain": {
                                    "mode": "new",
                                    "name": "my-site.is"
                                },
                                "php": "8.4",
                                "wordpress": true,
                                "period": 1
                            }
                        }
                    }
                }
            }
        },
        "/hosting/{id}": {
            "patch": {
                "summary": "Change PHP version (8.5, 8.4, 8.3, 8.2, 8.1) or auto-renew",
                "tags": [
                    "Hosting"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "hosting"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/hosting/{id}/sso": {
            "post": {
                "summary": "One-time Plesk login URL (valid 60 s). app is one of home, files, mail, databases, wordpress, backups, cron, git, logs",
                "tags": [
                    "Hosting"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "hosting"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "app": "files"
                            }
                        }
                    }
                }
            }
        },
        "/hosting/{id}/password": {
            "post": {
                "summary": "Set a new random SFTP password and return it once. It is not stored on our side, set a new one if you lose it.",
                "tags": [
                    "Hosting"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "hosting"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/domains": {
            "get": {
                "summary": "List registered domains and DNS zones",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "post": {
                "summary": "Register a domain (always with our privacy contact, your data never reaches the registry). Charged from balance; with \"pay\": xmr|btc|ltc|usdt and a short balance (or \"payAll\"), returns {checkout} with a payment instead, and the domain is registered once it is paid.",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "dns"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "name": "quietpress.is"
                            }
                        }
                    }
                }
            }
        },
        "/domains/transfer": {
            "post": {
                "summary": "Transfer a domain in with {\"name\", \"authCode\"}, charged the transfer price (includes 1 year)",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "dns"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "name": "blindspot.com",
                                "authCode": "EPP-CODE"
                            }
                        }
                    }
                }
            }
        },
        "/dns/zones": {
            "post": {
                "summary": "Add a free DNS zone for a domain registered elsewhere. {\"import\": true} (default) copies the records it has today on its current DNS (apex, common names, mail authentication)",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "dns"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "name": "example.com",
                                "import": true
                            }
                        }
                    }
                }
            }
        },
        "/dns/zones/{name}/check": {
            "post": {
                "summary": "Re-check whether the domain delegates to our nameservers (live DNS lookup)",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "dns"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/domains/{name}": {
            "patch": {
                "summary": "Update auto-renew, transfer lock, DNSSEC, nameservers ({\"ns\": \"ours\"|\"custom\", \"nameservers\": [...]}) or renew 1 year",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "dns"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/dns/zones/{name}": {
            "delete": {
                "summary": "Delete a DNS-only zone",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "dns"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/domains/{name}/records": {
            "post": {
                "summary": "Add a DNS record (A, CNAME, MX, TXT, CAA, SRV, NS, no AAAA)",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "dns"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "type": "A",
                                "name": "@",
                                "value": "185.231.40.12",
                                "ttl": 300
                            }
                        }
                    }
                }
            }
        },
        "/domains/{name}/records/{index}": {
            "put": {
                "summary": "Replace a record by index",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "dns"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "index",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            },
            "delete": {
                "summary": "Delete a record by index",
                "tags": [
                    "Domains & DNS"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "dns"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "name",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "index",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/billing": {
            "get": {
                "summary": "Balance, monthly spend, invoices and open payments",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/billing/invoices/{id}": {
            "get": {
                "summary": "One invoice: item, amount, status, period, what it is for, and for a top-up the crypto payment (coin, amount, network)",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/billing/topups": {
            "post": {
                "summary": "Create a top-up {\"amount\", \"method\": xmr|btc|ltc|usdt, \"invoice\"?}, returns a one-time address and the exact coin amount",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "amount": 50,
                                "method": "xmr"
                            }
                        }
                    }
                }
            }
        },
        "/billing/topups/{id}": {
            "get": {
                "summary": "Payment status (waiting, confirming, paid, underpaid, expired)",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/billing/topups/{id}/simulate-payment": {
            "post": {
                "summary": "Dev only, marks a fake-gateway payment as paid (real gateways call /webhooks/*)",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/billing/renew": {
            "get": {
                "summary": "What renewing costs for 1, 3 or 12 months: ?servers=srv-a,srv-b&hosting=web-c. Per service the price for each period, the new expiry and any open renewal invoice, plus your balance.",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "post": {
                "summary": "Renew services for a period: {\"servers\": [...], \"hosting\": [...], \"months\": 1|3|12, \"pay\": xmr|btc|ltc|usdt (optional), \"payAll\": bool}. Without \"pay\" it is charged to your balance. With \"pay\" and a short balance (or payAll) you get a checkout with a one-time crypto address; the services renew once it confirms.",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "servers": [
                                    "srv-k7m2x9qa"
                                ],
                                "months": 3,
                                "pay": "xmr"
                            }
                        }
                    }
                }
            }
        },
        "/billing/invoices/{id}/pay": {
            "post": {
                "summary": "Pay a due invoice from balance (also unsuspends the service)",
                "tags": [
                    "Billing"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/tickets": {
            "get": {
                "summary": "List tickets and chats with messages",
                "tags": [
                    "Support"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "post": {
                "summary": "Open a ticket {\"subject\", \"text\", \"dept\", \"priority\", \"server\"}",
                "tags": [
                    "Support"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "account"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "subject": "rDNS for my server",
                                "text": "Please set PTR to mail.example.com",
                                "dept": "Technical",
                                "files": [
                                    "img_\u2026 from POST /uploads"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/tickets/{id}": {
            "get": {
                "summary": "One ticket or chat with its messages",
                "tags": [
                    "Support"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/tickets/{id}/messages": {
            "post": {
                "summary": "Reply to a ticket {\"text\", \"files\": [image ids]}. {\"close\": true} closes it, {\"reopen\": true} reopens.",
                "tags": [
                    "Support"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "account"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "text": "Thanks!"
                            }
                        }
                    }
                }
            }
        },
        "/uploads": {
            "post": {
                "summary": "Upload one image (raw body, PNG, JPEG, GIF or WebP, up to 3.5 MB, name in X-File-Name). Send the returned id in \"files\" of a ticket or chat message.",
                "tags": [
                    "Support"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                }
            }
        },
        "/uploads/{id}": {
            "get": {
                "summary": "An image from one of your tickets or chats",
                "tags": [
                    "Support"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/affiliate": {
            "get": {
                "summary": "Your referral code, stats, commissions and payouts",
                "tags": [
                    "Affiliate"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/affiliate/payouts": {
            "post": {
                "summary": "Withdraw available earnings to balance (instant), xmr or btc (min \u20ac20, paid by staff within 48 h)",
                "tags": [
                    "Affiliate"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "billing"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "amount": 20,
                                "method": "xmr",
                                "address": "8Bz4\u2026your-wallet"
                            }
                        }
                    }
                }
            }
        },
        "/reseller": {
            "get": {
                "summary": "Reseller status, storefront settings, customers and rebates",
                "tags": [
                    "Reseller"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "read"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            },
            "patch": {
                "summary": "Update storefront brand, slug, color, domain and markup (0 to 200 %)",
                "tags": [
                    "Reseller"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "reseller"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "brand": "Nightjar Cloud",
                                "markup": 25,
                                "color": "#7c5cff"
                            }
                        }
                    }
                }
            }
        },
        "/reseller/apply": {
            "post": {
                "summary": "Apply for the reseller program (staff review, usually within 24 h)",
                "tags": [
                    "Reseller"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "reseller"
                        ]
                    },
                    {
                        "session": []
                    }
                ]
            }
        },
        "/reseller/customers": {
            "post": {
                "summary": "Create an end-customer sub-account (they log in on your white-label panel). Returns a one-time password.",
                "tags": [
                    "Reseller"
                ],
                "responses": {
                    "200": {
                        "description": "OK, returns {\"data\": \u2026}"
                    },
                    "4XX": {
                        "description": "{\"error\": {\"code\", \"message\"}}"
                    }
                },
                "security": [
                    {
                        "bearer": [
                            "reseller"
                        ]
                    },
                    {
                        "session": []
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "name": "acme-studio"
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearer": {
                "type": "http",
                "scheme": "bearer"
            },
            "session": {
                "type": "apiKey",
                "in": "cookie",
                "name": "sid"
            }
        }
    }
}