{
  "components": {
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Refused; see code."
      }
    },
    "schemas": {
      "Account": {
        "properties": {
          "auto_renew": {
            "type": "boolean"
          },
          "capabilities": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Capabilities"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": "string"
          },
          "datacenter": {
            "type": "string"
          },
          "datacenter_info": {
            "description": "The account's datacenter as the catalog names it.",
            "properties": {
              "code": {
                "type": "string"
              },
              "country": {
                "description": "ISO 3166 alpha-2.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "name_local": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "domain": {
            "type": "string"
          },
          "domain_change": {
            "description": "Changing the main domain (GET /accounts/{id} only).",
            "properties": {
              "available": {
                "description": "It can be changed now: the account is active, its panel can, and the change is free or has a price.",
                "type": "boolean"
              },
              "free": {
                "description": "No successful change yet: the next one is free. Every later one is charged price.",
                "type": "boolean"
              },
              "price": {
                "description": "Core's price of a paid change (SKU hosting.domain_change.\u003cregion\u003e, term once); null when none.",
                "properties": {
                  "amount": {
                    "description": "Decimal string.",
                    "type": "string"
                  },
                  "currency": {
                    "description": "ISO 4217.",
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "available",
              "free",
              "price"
            ],
            "type": "object"
          },
          "end_of_term": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EndOfTerm"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Region-unique: the datacenter's 3-digit prefix and a 9-digit sequence.",
            "format": "int64",
            "type": "integer"
          },
          "identity_hold": {
            "description": "The account is locked until the account owner verifies their identity: suspended on its server, and every operation but reading it and keeping it paid (auto-renew, renew) refused with identity_hold (403). Billing is unchanged; a renewed account stays suspended until the identity is verified, when it is released.",
            "type": "boolean"
          },
          "ip_address": {
            "description": "The address the control panel assigned the account (where its domain's A record points). Cached: set at creation, refreshed by GET /accounts/{id} and the inventory sweep. Null while pending, once terminated, or until the panel has reported it.",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "description": "Its plan's kind when ordered; never changes (a plan change stays within it).",
            "enum": [
              "shared",
              "reseller"
            ],
            "type": "string"
          },
          "panel_username": {
            "type": [
              "string",
              "null"
            ]
          },
          "period_starts_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "plan_id": {
            "format": "int64",
            "type": "integer"
          },
          "project_id": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "region": {
            "type": "string"
          },
          "renews_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "reset_incomplete": {
            "description": "A reset removed the account from its server and has not created it again yet: true while a reset runs, and after one that failed halfway (its action ends with reset_incomplete). Run the reset again to recreate it.",
            "type": "boolean"
          },
          "state": {
            "enum": [
              "pending",
              "active",
              "suspended",
              "terminated"
            ],
            "type": "string"
          },
          "suspension_reason": {
            "enum": [
              "non_payment",
              "expired",
              "abuse",
              "staff"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "term": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "region",
          "datacenter",
          "domain",
          "plan_id",
          "kind",
          "term",
          "state",
          "auto_renew",
          "created_at"
        ],
        "type": "object"
      },
      "Action": {
        "properties": {
          "command": {
            "description": "reseller_account_*: a reseller's operation on one of its customer accounts, on the reseller's account; result names it (username, domain, package, reason).",
            "enum": [
              "create",
              "suspend",
              "unsuspend",
              "terminate",
              "change_plan",
              "renew",
              "reset",
              "redis",
              "reseller_account_create",
              "reseller_account_terminate",
              "reseller_account_reset",
              "reseller_account_package",
              "reseller_account_password",
              "reseller_account_suspend",
              "reseller_account_unsuspend",
              "change_domain",
              "reseller_account_domain"
            ],
            "type": "string"
          },
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "finished_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "hosting_account_id": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "progress": {
            "format": "int64",
            "maximum": 100,
            "minimum": 0,
            "type": "integer"
          },
          "region": {
            "type": "string"
          },
          "result": {
            "additionalProperties": true,
            "properties": {},
            "type": "object"
          },
          "started_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "enum": [
              "running",
              "success",
              "error"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "region",
          "command",
          "state",
          "progress",
          "hosting_account_id",
          "started_at"
        ],
        "type": "object"
      },
      "Alert": {
        "properties": {
          "data": {
            "additionalProperties": true,
            "description": "The kind's details. attack_blocked: {domain, ip, requests, window_s, block_s}; disk_threshold: {percent (70 or 90), used_mb, limit_mb}; over_quota: {stage (warning, suspended or cleared), used_mb, limit_mb, grace_ends_at (unix seconds, warning only)}; resource_limit: {cpu, memory, entry_processes, processes, io, iops} - how often each CloudLinux limit was hit in the latest hour.",
            "type": "object"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "kind": {
            "description": "attack_blocked, disk_threshold, over_quota or resource_limit (others may be added).",
            "examples": [
              "attack_blocked"
            ],
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "data",
          "occurred_at"
        ],
        "type": "object"
      },
      "Capabilities": {
        "description": "What the account's control panel can do. Anything off is refused with feature_unavailable.",
        "properties": {
          "account_password": {
            "description": "The account's own password (control panel login, FTP, SSH) can be changed: POST /accounts/{id}/password.",
            "type": "boolean"
          },
          "change_domain": {
            "description": "The account's main domain can be changed in place: POST /accounts/{id}/domain.",
            "type": "boolean"
          },
          "change_plan": {
            "type": "boolean"
          },
          "cloudlinux": {
            "description": "The account's server runs CloudLinux OS (detected, not configured): GET /accounts/{id}/cloudlinux, /resource-usage and /php. Never for a reseller.",
            "type": "boolean"
          },
          "database_users": {
            "type": "boolean"
          },
          "databases": {
            "type": "boolean"
          },
          "dns": {
            "description": "The zone can be read and edited here.",
            "type": "boolean"
          },
          "dns_create_types": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "dns_list_types": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "email": {
            "type": "boolean"
          },
          "email_quota": {
            "type": "boolean"
          },
          "login_targets": {
            "description": "One-time login links this panel can mint for the account; reseller (the reseller level: WHM, DirectAdmin's reseller panel) only for a reseller account.",
            "items": {
              "enum": [
                "panel",
                "file_manager",
                "webmail",
                "reseller"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "panel": {
            "description": "Which control panel this is (cpanel, directadmin), for a client to name it (WHM, DirectAdmin). Null on a datacenter whose servers run different panels.",
            "type": [
              "string",
              "null"
            ]
          },
          "redis": {
            "description": "A per-account Redis can be run: /accounts/{id}/redis.",
            "type": "boolean"
          },
          "reseller": {
            "description": "Reseller accounts can be created and managed on this panel.",
            "type": "boolean"
          },
          "reseller_accounts": {
            "description": "Only on a reseller's account: it can create, delete, reset, re-package, suspend and unsuspend its own customer accounts, set their passwords and log into them (login_targets panel, file_manager, webmail as listed): /accounts/{id}/reseller/accounts.",
            "type": "boolean"
          },
          "reseller_privileges": {
            "description": "The reseller privileges this panel can withhold; a reseller here always holds the others.",
            "items": {
              "enum": [
                "dns",
                "ssl",
                "shell",
                "packages",
                "account_edit",
                "create_sessions"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "reset": {
            "description": "The account can be reset to a freshly created one: POST /accounts/{id}/actions/reset. Never for a reseller.",
            "type": "boolean"
          },
          "shell": {
            "description": "Shell access can be read and switched: /accounts/{id}/shell. A shell is only ever given confined (CageFS, or the panel's jail).",
            "type": "boolean"
          },
          "ssh_keys": {
            "description": "SSH public keys can be managed: /accounts/{id}/ssh-keys.",
            "type": "boolean"
          },
          "standalone_database_users": {
            "description": "A user can exist without a database; when false, create a user by granting it a database with a password.",
            "type": "boolean"
          },
          "traffic": {
            "description": "Download traffic is metered against the plan's quota: /accounts/{id}/traffic.",
            "type": "boolean"
          },
          "usage": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CloudLinuxStatus": {
        "description": "Isolation and the limits in force (cloudlinux-limits). The PHP Selector's state is GET /accounts/{id}/php's.",
        "properties": {
          "cagefs": {
            "description": "The account's CageFS cage: its own filesystem view, other accounts invisible. unavailable: the server's CageFS is not initialized.",
            "enum": [
              "enabled",
              "disabled",
              "unavailable"
            ],
            "type": "string"
          },
          "cagefs_ready": {
            "description": "CageFS is initialized on the server.",
            "type": "boolean"
          },
          "limits": {
            "description": "CloudLinux (LVE) limits. 0 is unlimited; null not reported.",
            "properties": {
              "cpu_percent": {
                "description": "CPU: 100 is one full core.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "entry_processes": {
                "description": "Concurrent web and cron entries.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "io_kbps": {
                "description": "Disk throughput, KB/s.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "iops": {
                "description": "Disk operations per second.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "memory_mb": {
                "description": "Physical memory.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "processes": {
                "description": "Processes.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "symlink_protection": {
            "description": "The server's link-traversal protection (CloudLinux LinkSafe) is on.",
            "type": "boolean"
          }
        },
        "required": [
          "cagefs",
          "cagefs_ready",
          "symlink_protection",
          "limits"
        ],
        "type": "object"
      },
      "DNSRecord": {
        "properties": {
          "content": {
            "type": "string"
          },
          "id": {
            "description": "Identifies the record to update or delete; may change after any edit, so re-read the zone.",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "ttl": {
            "format": "int64",
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "name",
          "content"
        ],
        "type": "object"
      },
      "DNSRecordInput": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "maxLength": 2000,
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "type": "string"
          },
          "priority": {
            "format": "int64",
            "maximum": 65535,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "ttl": {
            "format": "int64",
            "maximum": 86400,
            "minimum": 1,
            "type": "integer"
          },
          "type": {
            "description": "One of the account's capabilities.dns_create_types.",
            "type": "string"
          }
        },
        "required": [
          "type",
          "name",
          "content"
        ],
        "type": "object"
      },
      "Database": {
        "properties": {
          "name": {
            "description": "Without the account prefix.",
            "type": "string"
          },
          "size_mb": {
            "format": "int64",
            "type": "integer"
          },
          "users": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "users"
        ],
        "type": "object"
      },
      "DatabaseUser": {
        "properties": {
          "databases": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "databases"
        ],
        "type": "object"
      },
      "Datacenter": {
        "properties": {
          "capabilities": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Capabilities"
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "country": {
            "description": "ISO 3166 alpha-2.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "name_local": {
            "type": [
              "string",
              "null"
            ]
          },
          "orderable": {
            "type": "boolean"
          },
          "region": {
            "description": "The install's region code.",
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "closed"
            ],
            "type": "string"
          }
        },
        "required": [
          "code",
          "region",
          "name",
          "state",
          "orderable"
        ],
        "type": "object"
      },
      "EndOfTerm": {
        "description": "What happens if the current term ends unrenewed. Present for an active account whether auto-renew is on or off, and for one suspended for a lapsed term; null when nothing is scheduled (pending, terminated, or suspended for abuse or by staff). Each step can come up to the renewal interval (minutes) after its time.",
        "properties": {
          "deletes_at": {
            "description": "When the account and all its data are deleted: suspends_at plus the region's retention. RFC 3339 time, UTC.",
            "format": "date-time",
            "type": "string"
          },
          "retention_days": {
            "description": "Days a lapsed account is kept suspended before deletion.",
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "suspends_at": {
            "description": "When the account is suspended if its current term is not renewed (auto-renew off, or the renewal refused): the term's end. For an account already suspended for a lapsed term, when it was suspended. RFC 3339 time, UTC.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "suspends_at",
          "deletes_at",
          "retention_days"
        ],
        "type": "object"
      },
      "Error": {
        "properties": {
          "code": {
            "description": "Stable machine code.",
            "enum": [
              "account_pending",
              "account_suspended",
              "account_terminated",
              "action_failed",
              "action_in_progress",
              "already",
              "already_adopted",
              "already_exists",
              "cagefs_not_ready",
              "confirmation_mismatch",
              "confirmation_required",
              "conflict",
              "core_unavailable",
              "datacenter_closed",
              "domain_exists_on_server",
              "domain_taken",
              "downgrade_not_allowed",
              "enabled",
              "failed",
              "feature_unavailable",
              "forbidden",
              "id_prefix_taken",
              "idempotency_key_reused",
              "identity_hold",
              "identity_needed",
              "insufficient_balance",
              "internal_error",
              "invalid_cursor",
              "invalid_input",
              "invalid_kind",
              "invalid_state",
              "key",
              "limit_reached",
              "method_not_allowed",
              "name_taken",
              "not_found",
              "not_on_panel",
              "order_unavailable",
              "panel_account_missing",
              "panel_unavailable",
              "php_selector_disabled",
              "php_selector_needs_cagefs",
              "php_selector_unavailable",
              "plan_unavailable",
              "rate_limit_exceeded",
              "redis_needs_cagefs",
              "redis_not_running",
              "redis_off",
              "redis_tier_unavailable",
              "reseller_account_limit",
              "reseller_resource_limit",
              "server_in_use",
              "server_unreachable",
              "shell_disabled",
              "shell_not_confined",
              "sold_out",
              "status",
              "suspended_by_provider",
              "traffic_unavailable",
              "unauthorized",
              "unavailable",
              "unlimited",
              "username_taken"
            ],
            "type": "string"
          },
          "error": {
            "description": "English, for people. Branch on code.",
            "type": "string"
          }
        },
        "required": [
          "error",
          "code"
        ],
        "type": "object"
      },
      "Mailbox": {
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "description": "The local part.",
            "type": "string"
          },
          "quota_mb": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "used_mb": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "email",
          "used_mb"
        ],
        "type": "object"
      },
      "PHPSelector": {
        "properties": {
          "current": {
            "description": "Selected version; native is the server's own PHP.",
            "type": [
              "string",
              "null"
            ]
          },
          "native_version": {
            "description": "The server's own PHP version behind native, e.g. 8.3.",
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "description": "Only active can be changed.",
            "enum": [
              "active",
              "needs_cagefs",
              "disabled",
              "unavailable"
            ],
            "type": "string"
          },
          "versions": {
            "items": {
              "properties": {
                "enabled": {
                  "description": "Offered by the server; a disabled version cannot be chosen.",
                  "type": "boolean"
                },
                "extensions": {
                  "items": {
                    "properties": {
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": "string"
                      },
                      "state": {
                        "enum": [
                          "enabled",
                          "disabled",
                          "builtin"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "state"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "options": {
                  "items": {
                    "properties": {
                      "choices": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "default": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "editable": {
                        "description": "Settable here: bool and list options, and a few numeric ones.",
                        "type": "boolean"
                      },
                      "name": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "bool",
                          "list",
                          "value"
                        ],
                        "type": "string"
                      },
                      "value": {
                        "description": "The account's setting; null: the default applies.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "type",
                      "choices",
                      "value",
                      "editable"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "version",
                "enabled",
                "extensions",
                "options"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "state",
          "reason",
          "current",
          "native_version",
          "versions"
        ],
        "type": "object"
      },
      "Plan": {
        "properties": {
          "code": {
            "type": "string"
          },
          "cpu_cores": {
            "description": "CPU cores the plan states. Null: not stated. Enforced as the CloudLinux CPU limit (100% a core) where the server runs CloudLinux.",
            "format": "int64",
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "datacenter": {
            "type": "string"
          },
          "features": {
            "description": "Short English keys (e.g. free_ssl, unlimited_ftp, unlimited_traffic) for the client to localize; at most 20, never null.",
            "items": {
              "pattern": "^[a-z][a-z0-9_]{0,31}$",
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "kind": {
            "description": "shared: one hosting account. reseller: an account that creates and sells hosting accounts of its own.",
            "enum": [
              "shared",
              "reseller"
            ],
            "type": "string"
          },
          "limits": {
            "properties": {
              "bandwidth_mb": {
                "description": "Null is unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "databases": {
                "description": "Null is unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "disk_mb": {
                "description": "Null is unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "domains": {
                "description": "Null is unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "email_accounts": {
                "description": "Null is unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "ftp_accounts": {
                "description": "Null is unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "subdomains": {
                "description": "Null is unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "memory_mb": {
            "description": "Memory the plan states, in MB. Null: not stated. Enforced as the CloudLinux memory limit where the server runs CloudLinux.",
            "format": "int64",
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "name_local": {
            "type": [
              "string",
              "null"
            ]
          },
          "recommended": {
            "type": "boolean"
          },
          "reseller": {
            "description": "A reseller plan's terms; null for a shared plan. limits.disk_mb and limits.bandwidth_mb are then the reseller's totals over every account it owns.",
            "properties": {
              "dedicated_ip": {
                "description": "Created on its own IP address instead of the server's shared one.",
                "type": "boolean"
              },
              "max_accounts": {
                "description": "Accounts the reseller may create. Null: no cap.",
                "format": "int64",
                "minimum": 1,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "overselling": {
                "description": "May allocate more disk and bandwidth to its accounts than the plan's totals.",
                "type": "boolean"
              },
              "private_nameservers": {
                "description": "May run its own nameservers.",
                "type": "boolean"
              },
              "privileges": {
                "description": "What the reseller may do beyond managing its accounts.",
                "items": {
                  "enum": [
                    "dns",
                    "ssl",
                    "shell",
                    "packages",
                    "account_edit",
                    "create_sessions"
                  ],
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "max_accounts",
              "overselling",
              "dedicated_ip",
              "private_nameservers",
              "privileges"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "resources": {
            "description": "CloudLinux limits the plan sets beyond memory and CPU. Null: the server's default; 0: unlimited.",
            "properties": {
              "entry_processes": {
                "description": "Concurrent web and cron entries (CloudLinux EP).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "io_kbps": {
                "description": "Disk throughput, KB/s.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "iops": {
                "description": "Disk operations per second.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "processes": {
                "description": "Processes (CloudLinux NPROC).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "terms": {
            "items": {
              "$ref": "#/components/schemas/PlanTerm"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "code",
          "kind",
          "reseller",
          "datacenter",
          "name",
          "memory_mb",
          "cpu_cores",
          "features",
          "terms"
        ],
        "type": "object"
      },
      "PlanTerm": {
        "properties": {
          "price": {
            "properties": {
              "amount": {
                "description": "Decimal string.",
                "type": "string"
              },
              "currency": {
                "description": "ISO 4217.",
                "type": "string"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "sku": {
            "description": "Accounting SKU: hosting.plan.\u003ccode\u003e.\u003cterm\u003e, or hosting.reseller.\u003ccode\u003e.\u003cterm\u003e for a reseller plan.",
            "type": "string"
          },
          "term": {
            "enum": [
              "weekly",
              "monthly",
              "quarterly",
              "semiannually",
              "yearly"
            ],
            "type": "string"
          }
        },
        "required": [
          "term",
          "sku"
        ],
        "type": "object"
      },
      "Redis": {
        "description": "A per-account Redis: run as the account's user inside its CageFS, unix socket in its home only (no TCP), password, maxmemory from the tier with allkeys-lru eviction, no persistence.",
        "properties": {
          "action": {
            "description": "A Redis change still running.",
            "properties": {
              "id": {
                "format": "int64",
                "type": "integer"
              },
              "state": {
                "type": "string"
              }
            },
            "type": [
              "object",
              "null"
            ]
          },
          "can_manage": {
            "type": "boolean"
          },
          "connection": {
            "properties": {
              "password": {
                "description": "Only for a holder of hosting:redis:manage.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "socket_path": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "socket_path",
              "password"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "memory": {
            "properties": {
              "keys": {
                "format": "int64",
                "type": "integer"
              },
              "max_bytes": {
                "format": "int64",
                "type": "integer"
              },
              "uptime_seconds": {
                "format": "int64",
                "type": "integer"
              },
              "used_bytes": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "used_bytes",
              "max_bytes",
              "keys",
              "uptime_seconds"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "paid_tier": {
            "description": "The tier the current term is paid for.",
            "properties": {
              "code": {
                "type": "string"
              },
              "memory_mb": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "memory_mb"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "period_ends_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "php": {
            "properties": {
              "extension": {
                "enum": [
                  "enabled",
                  "disabled",
                  "unavailable"
                ],
                "type": "string"
              },
              "version": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "version",
              "extension"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "state": {
            "enum": [
              "off",
              "running",
              "stopped",
              "failed",
              "suspended"
            ],
            "type": "string"
          },
          "term": {
            "type": "string"
          },
          "tier": {
            "properties": {
              "code": {
                "type": "string"
              },
              "memory_mb": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "memory_mb"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "tiers": {
            "items": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "current": {
                  "type": "boolean"
                },
                "due_now": {
                  "description": "Estimated charge to move to this tier now (prorated for the rest of the term; display only).",
                  "properties": {
                    "amount": {
                      "description": "Decimal string.",
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "memory_mb": {
                  "format": "int64",
                  "type": "integer"
                },
                "price": {
                  "description": "Per term; renews with the account.",
                  "properties": {
                    "amount": {
                      "description": "Decimal string.",
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "memory_mb",
                "current",
                "price",
                "due_now"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "state",
          "tier",
          "paid_tier",
          "action",
          "term",
          "period_ends_at",
          "connection",
          "memory",
          "php",
          "can_manage",
          "tiers"
        ],
        "type": "object"
      },
      "ResellerAccount": {
        "properties": {
          "created_at": {
            "description": "When the panel created it; null when the panel does not say. RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "disk": {
            "properties": {
              "limit_mb": {
                "description": "Null: unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "used_mb": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "used_mb",
              "limit_mb"
            ],
            "type": "object"
          },
          "domain": {
            "type": "string"
          },
          "domain_change": {
            "description": "Changing the customer account's main domain; a paid change is charged to the reseller's account.",
            "properties": {
              "free": {
                "description": "No change of this account's domain from here yet: the next one is free.",
                "type": "boolean"
              },
              "price": {
                "description": "Core's price of a paid change (SKU hosting.domain_change.\u003cregion\u003e, term once); null when none.",
                "properties": {
                  "amount": {
                    "description": "Decimal string.",
                    "type": "string"
                  },
                  "currency": {
                    "description": "ISO 4217.",
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "free",
              "price"
            ],
            "type": "object"
          },
          "package": {
            "description": "The package the reseller put it on.",
            "type": "string"
          },
          "suspended": {
            "type": "boolean"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "username",
          "domain",
          "package",
          "disk",
          "suspended",
          "created_at"
        ],
        "type": "object"
      },
      "ResellerPackageInfo": {
        "properties": {
          "accounts": {
            "description": "Its customer accounts on this package.",
            "format": "int64",
            "type": "integer"
          },
          "bandwidth_mb": {
            "description": "Null: unlimited.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "disk_mb": {
            "description": "Null: unlimited.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "max_addon_domains": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "max_databases": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "max_email_accounts": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "max_ftp_accounts": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "max_subdomains": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "description": "As the panel names it (WHM: \u003creseller\u003e_\u003cname\u003e); a customer account's package carries the same name.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "disk_mb",
          "bandwidth_mb",
          "accounts"
        ],
        "type": "object"
      },
      "ResellerUsage": {
        "properties": {
          "accounts": {
            "properties": {
              "limit": {
                "description": "Its cap. Null: none.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "used": {
                "description": "Accounts the reseller created (its own not counted).",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "used",
              "limit"
            ],
            "type": "object"
          },
          "bandwidth": {
            "properties": {
              "limit_mb": {
                "description": "Null: unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "used_mb": {
                "description": "Over every account it owns, this month.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "used_mb",
              "limit_mb"
            ],
            "type": "object"
          },
          "disk": {
            "properties": {
              "limit_mb": {
                "description": "Null: unlimited.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "used_mb": {
                "description": "Over every account it owns.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "used_mb",
              "limit_mb"
            ],
            "type": "object"
          },
          "overselling": {
            "description": "Its plan lets it sell its customers more disk and bandwidth than its totals.",
            "type": "boolean"
          }
        },
        "required": [
          "accounts",
          "disk",
          "bandwidth",
          "overselling"
        ],
        "type": "object"
      },
      "ResourceUsage": {
        "properties": {
          "faults": {
            "description": "How often each limit was hit.",
            "properties": {
              "cpu": {
                "format": "int64",
                "type": "integer"
              },
              "entry_processes": {
                "format": "int64",
                "type": "integer"
              },
              "io": {
                "format": "int64",
                "type": "integer"
              },
              "iops": {
                "format": "int64",
                "type": "integer"
              },
              "memory": {
                "format": "int64",
                "type": "integer"
              },
              "processes": {
                "format": "int64",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "limits": {
            "description": "CloudLinux (LVE) limits. 0 is unlimited; null not reported.",
            "properties": {
              "cpu_percent": {
                "description": "CPU: 100 is one full core.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "entry_processes": {
                "description": "Concurrent web and cron entries.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "io_kbps": {
                "description": "Disk throughput, KB/s.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "iops": {
                "description": "Disk operations per second.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "memory_mb": {
                "description": "Physical memory.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "processes": {
                "description": "Processes.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "period": {
            "enum": [
              "1h",
              "24h",
              "7d",
              "30d"
            ],
            "type": "string"
          },
          "points": {
            "description": "Averages per interval over the whole window, oldest first (lve-stats); an interval the account was idle in is zero.",
            "items": {
              "properties": {
                "cpu_percent": {
                  "type": "number"
                },
                "entry_processes": {
                  "type": "number"
                },
                "faults": {
                  "description": "How often each limit was hit.",
                  "properties": {
                    "cpu": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "entry_processes": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "io": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "iops": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "memory": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "processes": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                },
                "from": {
                  "description": "RFC 3339 time, UTC.",
                  "format": "date-time",
                  "type": "string"
                },
                "io_kbps": {
                  "type": "number"
                },
                "iops": {
                  "type": "number"
                },
                "memory_mb": {
                  "type": "number"
                },
                "processes": {
                  "type": "number"
                },
                "to": {
                  "description": "RFC 3339 time, UTC.",
                  "format": "date-time",
                  "type": "string"
                }
              },
              "required": [
                "from",
                "to",
                "cpu_percent",
                "memory_mb",
                "entry_processes",
                "processes",
                "io_kbps",
                "iops",
                "faults"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "period",
          "points",
          "limits",
          "faults"
        ],
        "type": "object"
      },
      "SSHKey": {
        "properties": {
          "authorized": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "authorized"
        ],
        "type": "object"
      },
      "Shell": {
        "properties": {
          "cagefs": {
            "enum": [
              "enabled",
              "disabled",
              "unavailable"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "contained": {
            "description": "The shell is confined: CageFS or the panel's jail.",
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "jailed": {
            "description": "The panel's own jail (cPanel jailshell).",
            "type": "boolean"
          },
          "ssh_port": {
            "description": "The SSH port the control panel reports.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "enabled",
          "jailed",
          "contained",
          "cagefs",
          "ssh_port"
        ],
        "type": "object"
      },
      "Snapshot": {
        "description": "How fresh a CloudLinux answer is: these are answered from a snapshot at once and refreshed in the background (one CloudLinux call at a time per server).",
        "properties": {
          "fetched_at": {
            "description": "RFC 3339 time, UTC.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "loading": {
            "description": "Only on 202: never read before and not ready yet; no data. Ask again in a few seconds.",
            "type": "boolean"
          },
          "refreshing": {
            "description": "A read of the server is under way; ask again (or ?refresh=1) for its answer.",
            "type": "boolean"
          },
          "stale": {
            "description": "Older than a few minutes: a new read is running.",
            "type": "boolean"
          }
        },
        "required": [
          "fetched_at",
          "stale",
          "refreshing"
        ],
        "type": "object"
      },
      "Traffic": {
        "description": "An account's download traffic in its current traffic period (one month anchored on its term's start). Only download (HTTP bytes sent to visitors) counts against the plan's quota; upload is free and shown for information. Download above the quota is charged per GB while overage_billing is on; while it is off the account's sites are blocked (HTTP 509) once the quota is reached, until the next period. MB are 2^20 bytes, GB 1024 MB.",
        "properties": {
          "billed_gb": {
            "description": "Overage already charged this period: whole GB while the period runs, the remainder when it closes.",
            "type": "number"
          },
          "blocked": {
            "description": "The account's sites answer the traffic quota exhausted page (HTTP 509).",
            "type": "boolean"
          },
          "can_manage": {
            "description": "The caller holds hosting:traffic:manage on the account.",
            "type": "boolean"
          },
          "currency": {
            "description": "The price's currency (ISO 4217).",
            "type": [
              "string",
              "null"
            ]
          },
          "daily": {
            "description": "Per day (the server's Asia/Tehran date), oldest first.",
            "items": {
              "properties": {
                "date": {
                  "format": "date",
                  "type": "string"
                },
                "download_mb": {
                  "type": "number"
                },
                "upload_mb": {
                  "type": "number"
                }
              },
              "required": [
                "date",
                "download_mb",
                "upload_mb"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "download_mb": {
            "description": "Downloaded this period, as last read (3 decimals).",
            "type": "number"
          },
          "estimated_overage_rial": {
            "description": "overage_mb at price_per_gb, rounded (display only: accounting rates the charge); null when the price is unknown.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "overage_billing": {
            "description": "On: overage is charged to the wallet. Off: the sites are blocked when the quota is reached.",
            "type": "boolean"
          },
          "overage_mb": {
            "description": "Download above the quota.",
            "type": "number"
          },
          "period_end": {
            "description": "Exclusive.",
            "format": "date-time",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "type": "string"
          },
          "price_per_gb": {
            "description": "Price of one GB of overage in the region's currency (core's catalog); null when unknown.",
            "type": [
              "number",
              "null"
            ]
          },
          "quota_mb": {
            "description": "The plan's monthly download quota.",
            "format": "int64",
            "type": "integer"
          },
          "read_at": {
            "description": "When the server was last read.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "upload_mb": {
            "description": "Uploaded this period (free; information only).",
            "type": "number"
          }
        },
        "required": [
          "period_start",
          "period_end",
          "quota_mb",
          "download_mb",
          "upload_mb",
          "overage_mb",
          "billed_gb",
          "price_per_gb",
          "currency",
          "estimated_overage_rial",
          "overage_billing",
          "blocked",
          "can_manage",
          "read_at",
          "daily"
        ],
        "type": "object"
      },
      "Usage": {
        "description": "For a reseller, disk and bandwidth are its totals over every account it owns and accounts is set; null for a hosting account.",
        "properties": {
          "accounts": {
            "properties": {
              "limit": {
                "description": "Its cap. Null: none.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "used": {
                "description": "Accounts the reseller created (its own not counted).",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "used",
              "limit"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "bandwidth": {
            "properties": {
              "limit_mb": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "used_mb": {
                "format": "int64",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "disk": {
            "properties": {
              "limit_mb": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "used_mb": {
                "format": "int64",
                "type": "integer"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "session": {
        "description": "A session from POST /auth/exchange with core's handoff assertion.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Shared web hosting (cPanel/WHM, DirectAdmin) in one region. Every region serves the same API at its own base URL; ids are unique across regions. Long operations answer 202 with an action to poll. Errors carry a stable `code`. Requests are rate limited per caller (RateLimit-* headers, 429 rate_limit_exceeded).",
    "title": "Arianet Hosting API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/accounts": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "listAccounts",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Account"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Your hosting accounts",
        "x-permission": "hosting:view"
      },
      "post": {
        "description": "Requires the `hosting:manage` permission.",
        "operationId": "createAccount",
        "parameters": [
          {
            "description": "A repeat with the same key answers with the first order.",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "maxLength": 64,
              "minLength": 8,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "contact_email": {
                    "format": "email",
                    "type": "string"
                  },
                  "datacenter": {
                    "type": "string"
                  },
                  "domain": {
                    "maxLength": 253,
                    "type": "string"
                  },
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  },
                  "plan_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "project_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "term": {
                    "enum": [
                      "weekly",
                      "monthly",
                      "quarterly",
                      "semiannually",
                      "yearly"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "datacenter",
                  "plan_id",
                  "term",
                  "domain",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Account"
                    }
                  },
                  "required": [
                    "data",
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Accepted: follow the action."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Order a hosting account (a reseller plan also needs hosting:reseller:manage)",
        "x-codes": [
          "insufficient_balance (402)",
          "identity_needed",
          "sold_out",
          "domain_taken",
          "datacenter_closed"
        ],
        "x-permission": "hosting:manage"
      }
    },
    "/accounts/{id}": {
      "delete": {
        "description": "Requires the `hosting:manage` permission.",
        "operationId": "terminateAccount",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Terminate the account and delete its data (a reseller: with every account it created; also needs hosting:reseller:manage). Nothing already charged is refunded or prorated: the rest of the paid term is forfeited",
        "x-permission": "hosting:manage"
      },
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "getAccount",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Account"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "One hosting account",
        "x-permission": "hosting:view"
      },
      "patch": {
        "description": "Requires the `hosting:manage` permission.",
        "operationId": "updateAccount",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "auto_renew": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "auto_renew"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Account"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Turn auto-renew on or off",
        "x-permission": "hosting:manage"
      }
    },
    "/accounts/{id}/actions": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "listAccountActions",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Action"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "The account's operations",
        "x-permission": "hosting:view"
      }
    },
    "/accounts/{id}/actions/{op}": {
      "post": {
        "description": "Requires the `hosting:manage` permission.",
        "operationId": "accountOperation",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "change_plan | renew | reset",
            "in": "path",
            "name": "op",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  },
                  "plan_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "change_plan {plan_id}, renew a lapsed term, or reset {password}: the account wiped back to a fresh one (same server, username, domain, plan and paid term; files, mail, databases and DNS zone deleted; no charge; never for a reseller). On a reseller change_plan (to another reseller plan) and renew also need hosting:reseller:manage",
        "x-codes": [
          "feature_unavailable",
          "downgrade_not_allowed (change_plan to a lower plan: a cheaper price for the term, or the same price and less disk)",
          "account_suspended",
          "account_pending",
          "action_in_progress",
          "reset_incomplete (action error)"
        ],
        "x-permission": "hosting:manage"
      }
    },
    "/accounts/{id}/alerts": {
      "get": {
        "description": "Requires the `hosting:view` permission. Attacks blocked, disk thresholds crossed, over-quota warnings and suspensions, and CloudLinux resource limits hit (at most one a day).",
        "operationId": "listAlerts",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Alert"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "The account's alerts, newest first (kept 90 days)",
        "x-permission": "hosting:view"
      }
    },
    "/accounts/{id}/cloudlinux": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "getCloudLinux",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Read the server again instead of answering from the snapshot (waits up to 30 s).",
            "in": "query",
            "name": "refresh",
            "schema": {
              "enum": [
                "1"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CloudLinuxStatus"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "required": [
                    "data",
                    "snapshot"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Not read yet: {data: null, snapshot: {loading: true}}; ask again shortly (Retry-After)."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "CloudLinux on the account: CageFS, symlink protection, its resource limits and the PHP Selector's state",
        "x-codes": [
          "feature_unavailable (no CloudLinux on its server)"
        ],
        "x-permission": "hosting:view"
      }
    },
    "/accounts/{id}/database-users": {
      "get": {
        "description": "Requires the `hosting:database:view` permission.",
        "operationId": "listDatabaseUsers",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DatabaseUser"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "MySQL users",
        "x-permission": "hosting:database:view"
      },
      "post": {
        "description": "Requires the `hosting:database:manage` permission.",
        "operationId": "createDatabaseUser",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "pattern": "^[a-zA-Z0-9_]{1,48}$",
                    "type": "string"
                  },
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Create a user (panels with standalone_database_users)",
        "x-permission": "hosting:database:manage"
      }
    },
    "/accounts/{id}/database-users/{name}": {
      "delete": {
        "description": "Requires the `hosting:database:manage` permission.",
        "operationId": "deleteDatabaseUser",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete a user",
        "x-permission": "hosting:database:manage"
      },
      "put": {
        "description": "Requires the `hosting:database:manage` permission.",
        "operationId": "updateDatabaseUser",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  }
                },
                "required": [
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Set a user's password",
        "x-permission": "hosting:database:manage"
      }
    },
    "/accounts/{id}/databases": {
      "get": {
        "description": "Requires the `hosting:database:view` permission.",
        "operationId": "listDatabases",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Database"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "MySQL databases",
        "x-permission": "hosting:database:view"
      },
      "post": {
        "description": "Requires the `hosting:database:manage` permission.",
        "operationId": "createDatabase",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "pattern": "^[a-zA-Z0-9_]{1,48}$",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Create a database",
        "x-permission": "hosting:database:manage"
      }
    },
    "/accounts/{id}/databases/{name}": {
      "delete": {
        "description": "Requires the `hosting:database:manage` permission.",
        "operationId": "deleteDatabase",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete a database",
        "x-permission": "hosting:database:manage"
      }
    },
    "/accounts/{id}/databases/{name}/grant": {
      "post": {
        "description": "Requires the `hosting:database:manage` permission.",
        "operationId": "grantDatabase",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "password": {
                    "description": "Creates the user while granting, where users exist only with a database.",
                    "type": "string"
                  },
                  "user": {
                    "pattern": "^[a-zA-Z0-9_]{1,48}$",
                    "type": "string"
                  }
                },
                "required": [
                  "user"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Give a user all privileges on the database",
        "x-permission": "hosting:database:manage"
      }
    },
    "/accounts/{id}/dns-records": {
      "get": {
        "description": "Requires the `hosting:dns:view` permission.",
        "operationId": "listDNSRecords",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DNSRecord"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "The domain's zone",
        "x-permission": "hosting:dns:view"
      },
      "post": {
        "description": "Requires the `hosting:dns:manage` permission.",
        "operationId": "createDNSRecord",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DNSRecordInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DNSRecord"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Add a record; answers the zone",
        "x-permission": "hosting:dns:manage"
      }
    },
    "/accounts/{id}/dns-records/{record}": {
      "delete": {
        "description": "Requires the `hosting:dns:manage` permission.",
        "operationId": "deleteDNSRecord",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Record id from the zone.",
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DNSRecord"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete a record; answers the zone",
        "x-permission": "hosting:dns:manage"
      },
      "put": {
        "description": "Requires the `hosting:dns:manage` permission.",
        "operationId": "updateDNSRecord",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Record id from the zone.",
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DNSRecordInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/DNSRecord"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change a record; answers the zone",
        "x-permission": "hosting:dns:manage"
      }
    },
    "/accounts/{id}/domain": {
      "post": {
        "description": "Requires the `hosting:manage` permission.",
        "operationId": "changeDomain",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "domain": {
                    "description": "The new main domain; an internationalized one is taken and stored as punycode.",
                    "maxLength": 253,
                    "type": "string"
                  }
                },
                "required": [
                  "domain"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change the account's main domain: its sites, DNS zone and mailboxes move to the new domain, and a free SSL certificate is requested for it. The first change is free, each later one is charged (domain_change.price), pre-authorized now and charged once done. A reseller's own account also needs hosting:reseller:manage",
        "x-codes": [
          "feature_unavailable",
          "invalid_input (not a domain, or the current one)",
          "domain_taken",
          "invalid_state (not active)",
          "insufficient_balance (402)",
          "order_unavailable (no price)",
          "action_in_progress",
          "domain_taken (action error)"
        ],
        "x-permission": "hosting:manage"
      }
    },
    "/accounts/{id}/email-accounts": {
      "get": {
        "description": "Requires the `hosting:email:view` permission.",
        "operationId": "listMailboxes",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Mailbox"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Mailboxes on the domain",
        "x-permission": "hosting:email:view"
      },
      "post": {
        "description": "Requires the `hosting:email:manage` permission.",
        "operationId": "createMailbox",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "local_part": {
                    "pattern": "^[a-zA-Z0-9._-]{1,64}$",
                    "type": "string"
                  },
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  },
                  "quota_mb": {
                    "description": "0 is unlimited.",
                    "format": "int64",
                    "maximum": 102400,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "local_part",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Mailbox"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Add a mailbox; answers the list",
        "x-permission": "hosting:email:manage"
      }
    },
    "/accounts/{id}/email-accounts/{local_part}": {
      "delete": {
        "description": "Requires the `hosting:email:manage` permission.",
        "operationId": "deleteMailbox",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "local_part",
            "in": "path",
            "name": "local_part",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete a mailbox",
        "x-permission": "hosting:email:manage"
      },
      "put": {
        "description": "Requires the `hosting:email:manage` permission.",
        "operationId": "updateMailbox",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "local_part",
            "in": "path",
            "name": "local_part",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  },
                  "quota_mb": {
                    "format": "int64",
                    "maximum": 102400,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Mailbox"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change a mailbox's password and/or quota; answers the list",
        "x-permission": "hosting:email:manage"
      }
    },
    "/accounts/{id}/login": {
      "post": {
        "description": "Requires the `hosting:panel:access` permission.",
        "operationId": "login",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "target": {
                    "description": "reseller also needs hosting:reseller:manage.",
                    "enum": [
                      "panel",
                      "file_manager",
                      "webmail",
                      "reseller"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "expires_in": {
                          "description": "Seconds.",
                          "format": "int64",
                          "type": "integer"
                        },
                        "target": {
                          "type": "string"
                        },
                        "url": {
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "A one-time login link into the control panel",
        "x-permission": "hosting:panel:access"
      }
    },
    "/accounts/{id}/nameservers": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "getNameservers",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "nameservers": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Where the domain must point",
        "x-permission": "hosting:view"
      }
    },
    "/accounts/{id}/password": {
      "post": {
        "description": "Requires the `hosting:manage` permission.",
        "operationId": "setAccountPassword",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  }
                },
                "required": [
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change the account's own password (control panel login, FTP, SSH)",
        "x-codes": [
          "feature_unavailable",
          "invalid_input",
          "action_in_progress"
        ],
        "x-permission": "hosting:manage"
      }
    },
    "/accounts/{id}/php": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "getPHPSelector",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Read the server again instead of answering from the snapshot (waits up to 30 s).",
            "in": "query",
            "name": "refresh",
            "schema": {
              "enum": [
                "1"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PHPSelector"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "required": [
                    "data",
                    "snapshot"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Not read yet: {data: null, snapshot: {loading: true}}; ask again shortly (Retry-After)."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "The PHP Selector: versions, extensions, options",
        "x-permission": "hosting:view"
      }
    },
    "/accounts/{id}/php/extensions": {
      "put": {
        "description": "Requires the `hosting:php:manage` permission.",
        "operationId": "setPHPExtensions",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "extensions": {
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "description": "Extension name -\u003e on. Only the ones to change.",
                    "type": "object"
                  },
                  "version": {
                    "type": "string"
                  }
                },
                "required": [
                  "version",
                  "extensions"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PHPSelector"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Turn extensions of a version on or off; answers the selector",
        "x-permission": "hosting:php:manage"
      }
    },
    "/accounts/{id}/php/options": {
      "put": {
        "description": "Requires the `hosting:php:manage` permission.",
        "operationId": "setPHPOptions",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "options": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Option -\u003e value: on/off, one of its choices, or a whole number.",
                    "type": "object"
                  },
                  "version": {
                    "type": "string"
                  }
                },
                "required": [
                  "version",
                  "options"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PHPSelector"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Set php.ini options of a version; answers the selector",
        "x-permission": "hosting:php:manage"
      }
    },
    "/accounts/{id}/php/version": {
      "put": {
        "description": "Requires the `hosting:php:manage` permission.",
        "operationId": "setPHPVersion",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "version": {
                    "type": "string"
                  }
                },
                "required": [
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PHPSelector"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Select the PHP version; answers the selector",
        "x-codes": [
          "php_selector_needs_cagefs",
          "php_selector_disabled",
          "php_selector_unavailable",
          "invalid_input"
        ],
        "x-permission": "hosting:php:manage"
      }
    },
    "/accounts/{id}/redis": {
      "get": {
        "description": "Requires the `hosting:view` permission. The password is returned only to a holder of `hosting:redis:manage`.",
        "operationId": "getRedis",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Read the server again instead of answering from the snapshot (waits up to 30 s).",
            "in": "query",
            "name": "refresh",
            "schema": {
              "enum": [
                "1"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Redis"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Not read yet: {data: null, snapshot: {loading: true}}; ask again shortly (Retry-After)."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "The account's Redis add-on: state, tier, connection, memory, the tiers with their prices",
        "x-permission": "hosting:view"
      },
      "put": {
        "description": "Requires the `hosting:redis:manage` permission.",
        "operationId": "setRedis",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "tier": {
                    "description": "A tier code from GET /accounts/{id}/redis, or null to turn Redis off.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "tier"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Accepted: follow the action."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Turn Redis on at a tier, move it to another tier, or turn it off (tier null). A tier above the one this term is paid for is charged for the rest of the term; a smaller tier or off refunds nothing",
        "x-permission": "hosting:redis:manage"
      }
    },
    "/accounts/{id}/redis/flush": {
      "post": {
        "description": "Requires the `hosting:redis:manage` permission.",
        "operationId": "flushRedis",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Redis"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete every key",
        "x-permission": "hosting:redis:manage"
      }
    },
    "/accounts/{id}/redis/password": {
      "post": {
        "description": "Requires the `hosting:redis:manage` permission.",
        "operationId": "rotateRedisPassword",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Redis"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Give Redis a new random password (it restarts; the cache is emptied)",
        "x-permission": "hosting:redis:manage"
      }
    },
    "/accounts/{id}/redis/restart": {
      "post": {
        "description": "Requires the `hosting:redis:manage` permission.",
        "operationId": "restartRedis",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Redis"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Restart Redis (the cache is emptied)",
        "x-permission": "hosting:redis:manage"
      }
    },
    "/accounts/{id}/redis/usage": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "getRedisUsage",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "period",
            "schema": {
              "default": "24h",
              "enum": [
                "24h",
                "7d"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "period": {
                          "enum": [
                            "24h",
                            "7d"
                          ],
                          "type": "string"
                        },
                        "points": {
                          "items": {
                            "properties": {
                              "at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "max_bytes": {
                                "format": "int64",
                                "type": "integer"
                              },
                              "used_bytes": {
                                "format": "int64",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "at",
                              "used_bytes",
                              "max_bytes"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "period",
                        "points"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Redis memory readings over a period",
        "x-permission": "hosting:view"
      }
    },
    "/accounts/{id}/reseller/accounts": {
      "get": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "listResellerAccounts",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ResellerAccount"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "A reseller's customer accounts as its control panel lists them (its own not included), by username. Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller)",
          "account_pending",
          "account_terminated"
        ],
        "x-permission": "hosting:reseller:manage"
      },
      "post": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "resellerCreateAccount",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "contact_email": {
                    "format": "email",
                    "type": "string"
                  },
                  "domain": {
                    "maxLength": 253,
                    "type": "string"
                  },
                  "package": {
                    "description": "A name from GET /accounts/{id}/reseller/packages.",
                    "type": "string"
                  },
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  },
                  "username": {
                    "description": "Optional: derived from the domain when left out.",
                    "pattern": "^[a-z][a-z0-9]{2,9}$",
                    "type": "string"
                  }
                },
                "required": [
                  "domain",
                  "package",
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Create a customer account owned by the reseller, on one of its packages, within its plan's limits (its account cap; unless the plan allows overselling, the disk and bandwidth its packages give out against its totals). Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller, or its panel cannot)",
          "account_suspended (the reseller)",
          "account_pending",
          "account_terminated",
          "not_found (not one of the reseller's customer accounts)",
          "invalid_input",
          "domain_taken",
          "username_taken",
          "reseller_account_limit",
          "reseller_resource_limit",
          "action_in_progress",
          "domain_exists_on_server (action error)"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/accounts/{username}": {
      "delete": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "resellerTerminateAccount",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "The customer account's username on the reseller's panel (GET /accounts/{id}/reseller/accounts).",
            "in": "path",
            "name": "username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "confirm": {
                    "description": "The account's domain.",
                    "type": "string"
                  }
                },
                "required": [
                  "confirm"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Delete one of the reseller's customer accounts and its data. Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller, or its panel cannot)",
          "account_suspended (the reseller)",
          "account_pending",
          "account_terminated",
          "not_found (not one of the reseller's customer accounts)",
          "invalid_input",
          "confirmation_mismatch",
          "action_in_progress"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/accounts/{username}/domain": {
      "post": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "resellerChangeDomain",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "The customer account's username on the reseller's panel (GET /accounts/{id}/reseller/accounts).",
            "in": "path",
            "name": "username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "domain": {
                    "description": "The new main domain; an internationalized one is taken and stored as punycode.",
                    "maxLength": 253,
                    "type": "string"
                  }
                },
                "required": [
                  "domain"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Change the main domain of one of the reseller's customer accounts, at once. Its first change is free, each later one is charged to the reseller's account. Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller, or its panel cannot)",
          "account_suspended (the reseller)",
          "account_pending",
          "account_terminated",
          "not_found (not one of the reseller's customer accounts)",
          "invalid_input",
          "domain_taken",
          "invalid_state (suspended)",
          "insufficient_balance (402)",
          "order_unavailable (no price)",
          "action_in_progress"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/accounts/{username}/login": {
      "post": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "resellerLogin",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "The customer account's username on the reseller's panel (GET /accounts/{id}/reseller/accounts).",
            "in": "path",
            "name": "username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "target": {
                    "description": "Default panel; only the account's capabilities.login_targets.",
                    "enum": [
                      "panel",
                      "file_manager",
                      "webmail"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "expires_in": {
                          "description": "Seconds.",
                          "format": "int64",
                          "type": "integer"
                        },
                        "target": {
                          "type": "string"
                        },
                        "url": {
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "A one-time login link into one of the reseller's customer accounts (open it in a new tab). Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller, or its panel cannot)",
          "account_suspended (the reseller)",
          "account_pending",
          "account_terminated",
          "not_found (not one of the reseller's customer accounts)",
          "invalid_input",
          "account_suspended"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/accounts/{username}/package": {
      "post": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "resellerSetPackage",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "The customer account's username on the reseller's panel (GET /accounts/{id}/reseller/accounts).",
            "in": "path",
            "name": "username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "package": {
                    "description": "A name from GET /accounts/{id}/reseller/packages.",
                    "type": "string"
                  }
                },
                "required": [
                  "package"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Move one of the reseller's customer accounts to another of its packages, within its plan's limits. Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller, or its panel cannot)",
          "account_suspended (the reseller)",
          "account_pending",
          "account_terminated",
          "not_found (not one of the reseller's customer accounts)",
          "invalid_input",
          "reseller_resource_limit",
          "action_in_progress"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/accounts/{username}/password": {
      "post": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "resellerSetPassword",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "The customer account's username on the reseller's panel (GET /accounts/{id}/reseller/accounts).",
            "in": "path",
            "name": "username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  }
                },
                "required": [
                  "password"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Set the password of one of the reseller's customer accounts (control panel login, FTP, SSH). Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller, or its panel cannot)",
          "account_suspended (the reseller)",
          "account_pending",
          "account_terminated",
          "not_found (not one of the reseller's customer accounts)",
          "invalid_input",
          "action_in_progress"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/accounts/{username}/reset": {
      "post": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "resellerResetAccount",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "The customer account's username on the reseller's panel (GET /accounts/{id}/reseller/accounts).",
            "in": "path",
            "name": "username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "confirm": {
                    "description": "The account's domain.",
                    "type": "string"
                  },
                  "password": {
                    "description": "At least 8 characters with upper and lower case letters and a digit.",
                    "maxLength": 128,
                    "minLength": 8,
                    "type": "string"
                  }
                },
                "required": [
                  "password",
                  "confirm"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Wipe one of the reseller's customer accounts back to a fresh one: same username, domain and package, still the reseller's; files, mail, databases and DNS zone deleted. Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller, or its panel cannot)",
          "account_suspended (the reseller)",
          "account_pending",
          "account_terminated",
          "not_found (not one of the reseller's customer accounts)",
          "invalid_input",
          "confirmation_mismatch",
          "invalid_state (suspended)",
          "action_in_progress",
          "reset_incomplete (action error)"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/accounts/{username}/suspend": {
      "post": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "resellerSuspend",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "The customer account's username on the reseller's panel (GET /accounts/{id}/reseller/accounts).",
            "in": "path",
            "name": "username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "reason": {
                    "description": "Shown on the panel. One line.",
                    "maxLength": 255,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Suspend one of the reseller's customer accounts (already suspended: nothing changes). Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller, or its panel cannot)",
          "account_suspended (the reseller)",
          "account_pending",
          "account_terminated",
          "not_found (not one of the reseller's customer accounts)",
          "invalid_input",
          "action_in_progress"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/accounts/{username}/unsuspend": {
      "post": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "resellerUnsuspend",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "The customer account's username on the reseller's panel (GET /accounts/{id}/reseller/accounts).",
            "in": "path",
            "name": "username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Lift the suspension of one of the reseller's customer accounts (not suspended: nothing changes); never one the server's quota guard holds. Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller, or its panel cannot)",
          "account_suspended (the reseller)",
          "account_pending",
          "account_terminated",
          "not_found (not one of the reseller's customer accounts)",
          "invalid_input",
          "suspended_by_provider",
          "action_in_progress"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/packages": {
      "get": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "listResellerPackages",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ResellerPackageInfo"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "The hosting packages a reseller defined on its control panel for its customers, by name, with how many of its accounts run each. Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller)",
          "account_pending",
          "account_terminated"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/reseller/usage": {
      "get": {
        "description": "Requires the `hosting:reseller:manage` permission.",
        "operationId": "getResellerUsage",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ResellerUsage"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "A reseller's accounts, disk and bandwidth against its plan's totals, and whether it may oversell. Also needs hosting:view",
        "x-codes": [
          "feature_unavailable (not a reseller)",
          "account_pending",
          "account_terminated"
        ],
        "x-permission": "hosting:reseller:manage"
      }
    },
    "/accounts/{id}/resource-usage": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "getResourceUsage",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Read the server again instead of answering from the snapshot (waits up to 30 s).",
            "in": "query",
            "name": "refresh",
            "schema": {
              "enum": [
                "1"
              ],
              "type": "string"
            }
          },
          {
            "description": "Default 24h.",
            "in": "query",
            "name": "period",
            "schema": {
              "enum": [
                "1h",
                "24h",
                "7d",
                "30d"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ResourceUsage"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "required": [
                    "data",
                    "snapshot"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Not read yet: {data: null, snapshot: {loading: true}}; ask again shortly (Retry-After)."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "CPU, memory, processes and disk I/O over time, with how often a limit was hit",
        "x-permission": "hosting:view"
      }
    },
    "/accounts/{id}/shell": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "getShell",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Read the server again instead of answering from the snapshot (waits up to 30 s).",
            "in": "query",
            "name": "refresh",
            "schema": {
              "enum": [
                "1"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Shell"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "required": [
                    "data",
                    "snapshot"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Not read yet: {data: null, snapshot: {loading: true}}; ask again shortly (Retry-After)."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Shell access and what confines it",
        "x-permission": "hosting:view"
      },
      "put": {
        "description": "Requires the `hosting:shell:manage` permission.",
        "operationId": "setShell",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Shell"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Turn shell access on or off. On is only ever confined: CageFS (the account is caged first) or the panel's jail",
        "x-codes": [
          "shell_not_confined",
          "feature_unavailable"
        ],
        "x-permission": "hosting:shell:manage"
      }
    },
    "/accounts/{id}/ssh-keys": {
      "get": {
        "description": "Requires the `hosting:shell:manage` permission.",
        "operationId": "listSSHKeys",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Read the server again instead of answering from the snapshot (waits up to 30 s).",
            "in": "query",
            "name": "refresh",
            "schema": {
              "enum": [
                "1"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SSHKey"
                      },
                      "type": "array"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "required": [
                    "data",
                    "snapshot"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Not read yet: {data: null, snapshot: {loading: true}}; ask again shortly (Retry-After)."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "SSH public keys",
        "x-permission": "hosting:shell:manage"
      },
      "post": {
        "description": "Requires the `hosting:shell:manage` permission.",
        "operationId": "addSSHKey",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,39}$",
                    "type": "string"
                  },
                  "public_key": {
                    "description": "One OpenSSH line: \u003ctype\u003e \u003cbase64\u003e [comment].",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "public_key"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SSHKey"
                      },
                      "type": "array"
                    },
                    "fingerprint": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "fingerprint"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Add and authorize a public key (ed25519, ECDSA, or RSA of 2048 bits or more); answers the keys and the new key's SHA256 fingerprint",
        "x-codes": [
          "already_exists",
          "limit_reached",
          "invalid_input"
        ],
        "x-permission": "hosting:shell:manage"
      }
    },
    "/accounts/{id}/ssh-keys/{name}": {
      "delete": {
        "description": "Requires the `hosting:shell:manage` permission.",
        "operationId": "deleteSSHKey",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "name",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SSHKey"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Deauthorize and delete a key; answers the keys",
        "x-permission": "hosting:shell:manage"
      }
    },
    "/accounts/{id}/traffic": {
      "get": {
        "description": "Requires the `hosting:view` permission. The last reading (every 15 minutes) is served; `refresh=1` reads the server now.",
        "operationId": "getTraffic",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Read the server now instead of serving the last reading.",
            "in": "query",
            "name": "refresh",
            "required": false,
            "schema": {
              "enum": [
                "1",
                "true"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Traffic"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Download traffic of the current period, against the plan's quota, with its overage and a daily breakdown",
        "x-permission": "hosting:view"
      }
    },
    "/accounts/{id}/traffic/settings": {
      "put": {
        "description": "Requires the `hosting:traffic:manage` permission. Refused with 400 confirmation_required unless confirm is true.",
        "operationId": "setTrafficSettings",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "confirm": {
                    "description": "Must be true: the customer confirmed the consequence.",
                    "type": "boolean"
                  },
                  "overage_billing": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "overage_billing",
                  "confirm"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Traffic"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Turn overage billing on or off. On lifts a block at once; off blocks the sites at once when the quota is already exhausted, and charges what was used above it while it was on",
        "x-permission": "hosting:traffic:manage"
      }
    },
    "/accounts/{id}/usage": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "getUsage",
        "parameters": [
          {
            "description": "Hosting account id.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Usage"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Disk and bandwidth use",
        "x-permission": "hosting:view"
      }
    },
    "/actions": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "listActions",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Action"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Your latest operations",
        "x-permission": "hosting:view"
      }
    },
    "/actions/{id}": {
      "get": {
        "description": "Requires the `hosting:view` permission.",
        "operationId": "getAction",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "One operation; poll it until state is success or error",
        "x-permission": "hosting:view"
      }
    },
    "/datacenters": {
      "get": {
        "operationId": "listDatacenters",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Datacenter"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Datacenters of this region, with what their panels can do"
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenAPI",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document."
          }
        },
        "security": [],
        "summary": "This document"
      }
    },
    "/plans": {
      "get": {
        "operationId": "listPlans",
        "parameters": [
          {
            "in": "query",
            "name": "datacenter",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "enum": [
                "shared",
                "reseller"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Plan"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Plans for sale"
      }
    }
  },
  "security": [
    {
      "session": []
    }
  ],
  "servers": [
    {
      "description": "This region",
      "url": "https://hosting.iran-1.ariaservice.net/v1"
    }
  ]
}