{
  "openapi": "3.0.0",
  "info": {
    "title": "Adminbolt API Documentation",
    "version": "0.0.1"
  },
  "paths": {
    "/api": {},
    "/api/admin/generate-sso-token": {
      "post": {
        "tags": [
          "Admin - General"
        ],
        "summary": "Generate SSO token for admin",
        "operationId": "35dd1fd03f123a97333da6c63b0e5743",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "sso_url": {
                      "type": "string",
                      "format": "uri",
                      "example": "https://example.com/api/admin/sso/login/abc123"
                    },
                    "redirect_url": {
                      "type": "string",
                      "format": "uri",
                      "example": "https://panel.example.com"
                    },
                    "token": {
                      "type": "string",
                      "example": "abc123tokenvalue"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unable to generate token"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/metrics/history": {
      "get": {
        "tags": [
          "Admin - Metrics"
        ],
        "summary": "Get metrics history",
        "description": "Returns historical metrics data including CPU and RAM usage over time. Data is cached for 60 seconds.",
        "operationId": "0df5dbcc32c4fb23870c26d56e991110",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Number of records to fetch (default: 15, max: 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 15,
              "maximum": 100,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "description": "Record ID",
                        "type": "integer",
                        "example": 133
                      },
                      "timestamp": {
                        "description": "Unix timestamp in milliseconds",
                        "type": "integer",
                        "example": 1706284800000
                      },
                      "cpu_percent": {
                        "description": "CPU usage percentage",
                        "type": "number",
                        "format": "float",
                        "example": 25.5
                      },
                      "ram_percent": {
                        "description": "RAM usage percentage",
                        "type": "number",
                        "format": "float",
                        "example": 37.5
                      },
                      "ram_total_mb": {
                        "description": "Total RAM in MB",
                        "type": "number",
                        "format": "float",
                        "example": 3559.67
                      },
                      "ram_used_mb": {
                        "description": "Used RAM in MB",
                        "type": "number",
                        "format": "float",
                        "example": 1334.88
                      },
                      "ram_free_mb": {
                        "description": "Free RAM in MB",
                        "type": "number",
                        "format": "float",
                        "example": 2224.79
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unable to retrieve metrics history: Command execution failed"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/metrics/stats": {
      "get": {
        "tags": [
          "Admin - Metrics"
        ],
        "summary": "Get metrics statistics",
        "description": "Returns comprehensive metrics statistics including CPU, RAM, disk, and network statistics with average, minimum, and maximum values. Data is cached for 60 seconds.",
        "operationId": "153134ed781d61db6f93ca62c0d950c8",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cpu": {
                      "properties": {
                        "average": {
                          "type": "number",
                          "format": "float",
                          "example": 25.5
                        },
                        "minimum": {
                          "type": "number",
                          "format": "float",
                          "example": 5.2
                        },
                        "maximum": {
                          "type": "number",
                          "format": "float",
                          "example": 100
                        }
                      },
                      "type": "object"
                    },
                    "cpu_cores": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "average": {
                            "type": "number",
                            "format": "float",
                            "example": 25.5
                          },
                          "core": {
                            "type": "string",
                            "example": "cpu0"
                          },
                          "current": {
                            "type": "number",
                            "format": "float",
                            "example": 15.2
                          },
                          "maximum": {
                            "type": "number",
                            "format": "float",
                            "example": 100
                          },
                          "minimum": {
                            "type": "number",
                            "format": "float",
                            "example": 2.5
                          }
                        },
                        "type": "object"
                      }
                    },
                    "ram": {
                      "properties": {
                        "average": {
                          "type": "number",
                          "format": "float",
                          "example": 37.5
                        },
                        "minimum": {
                          "type": "number",
                          "format": "float",
                          "example": 28.2
                        },
                        "maximum": {
                          "type": "number",
                          "format": "float",
                          "example": 42.8
                        }
                      },
                      "type": "object"
                    },
                    "disks": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "average": {
                            "description": "Average disk usage percentage",
                            "type": "number",
                            "format": "float",
                            "example": 9.5
                          },
                          "avg_used_gb": {
                            "description": "Average used disk space in GB",
                            "type": "number",
                            "format": "float",
                            "example": 4.5
                          },
                          "current_free_gb": {
                            "description": "Current free disk space in GB",
                            "type": "integer",
                            "example": 36
                          },
                          "current_total_gb": {
                            "description": "Total disk space in GB",
                            "type": "integer",
                            "example": 41
                          },
                          "current_used_gb": {
                            "description": "Current used disk space in GB",
                            "type": "integer",
                            "example": 5
                          },
                          "current_used_percentage": {
                            "description": "Current disk usage percentage",
                            "type": "integer",
                            "example": 12
                          },
                          "device": {
                            "description": "Disk device path",
                            "type": "string",
                            "example": "/dev/sda1"
                          },
                          "max_used_gb": {
                            "description": "Maximum used disk space in GB",
                            "type": "integer",
                            "example": 5
                          },
                          "maximum": {
                            "description": "Maximum disk usage percentage",
                            "type": "integer",
                            "example": 12
                          },
                          "minimum": {
                            "description": "Minimum disk usage percentage",
                            "type": "integer",
                            "example": 8
                          },
                          "mounted_on": {
                            "description": "Mount point",
                            "type": "string",
                            "example": "/"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "networks": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "avg_rx_bytes": {
                            "description": "Average received bytes",
                            "type": "number",
                            "format": "float",
                            "example": 1500000000
                          },
                          "avg_rx_packets": {
                            "description": "Average received packets",
                            "type": "number",
                            "format": "float",
                            "example": 5000000
                          },
                          "avg_tx_bytes": {
                            "description": "Average transmitted bytes",
                            "type": "number",
                            "format": "float",
                            "example": 1400000000
                          },
                          "avg_tx_packets": {
                            "description": "Average transmitted packets",
                            "type": "number",
                            "format": "float",
                            "example": 4500000
                          },
                          "current_rx_bytes": {
                            "description": "Current received bytes",
                            "type": "integer",
                            "example": 1800000000
                          },
                          "current_rx_packets": {
                            "description": "Current received packets",
                            "type": "integer",
                            "example": 6000000
                          },
                          "current_tx_bytes": {
                            "description": "Current transmitted bytes",
                            "type": "integer",
                            "example": 1700000000
                          },
                          "current_tx_packets": {
                            "description": "Current transmitted packets",
                            "type": "integer",
                            "example": 5500000
                          },
                          "interface": {
                            "description": "Network interface name",
                            "type": "string",
                            "example": "eth0"
                          },
                          "max_rx_bytes": {
                            "description": "Maximum received bytes",
                            "type": "integer",
                            "example": 2000000000
                          },
                          "max_rx_packets": {
                            "description": "Maximum received packets",
                            "type": "integer",
                            "example": 8000000
                          },
                          "max_tx_bytes": {
                            "description": "Maximum transmitted bytes",
                            "type": "integer",
                            "example": 1900000000
                          },
                          "max_tx_packets": {
                            "description": "Maximum transmitted packets",
                            "type": "integer",
                            "example": 7000000
                          },
                          "total_rx_drops": {
                            "description": "Total received packet drops",
                            "type": "integer",
                            "example": 0
                          },
                          "total_rx_errors": {
                            "description": "Total received errors",
                            "type": "integer",
                            "example": 0
                          },
                          "total_tx_drops": {
                            "description": "Total transmitted packet drops",
                            "type": "integer",
                            "example": 0
                          },
                          "total_tx_errors": {
                            "description": "Total transmitted errors",
                            "type": "integer",
                            "example": 0
                          }
                        },
                        "type": "object"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unable to retrieve metrics stats: Command execution failed"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/metrics/system-info": {
      "get": {
        "tags": [
          "Admin - Metrics"
        ],
        "summary": "Get system information",
        "description": "Returns detailed system information including CPU details, memory, network interfaces, OS distribution, and uptime. Data is cached for 60 seconds.",
        "operationId": "b129732e4f433ac160b4cfc03e2e1f7a",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "arch": {
                      "description": "System architecture",
                      "type": "string",
                      "example": "amd64"
                    },
                    "cpu": {
                      "properties": {
                        "cores": {
                          "type": "integer",
                          "example": 2
                        },
                        "model": {
                          "type": "string",
                          "example": "AMD EPYC-Rome Processor"
                        },
                        "speed": {
                          "description": "CPU speed in MHz",
                          "type": "integer",
                          "example": 2500
                        }
                      },
                      "type": "object"
                    },
                    "distro": {
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "almalinux"
                        },
                        "name": {
                          "type": "string",
                          "example": "AlmaLinux"
                        },
                        "version": {
                          "type": "string",
                          "example": "9.6"
                        }
                      },
                      "type": "object"
                    },
                    "hostname": {
                      "type": "string",
                      "example": "server.example.com"
                    },
                    "kernelVersion": {
                      "type": "string",
                      "example": "5.14.0-570.32.1.el9_6.x86_64"
                    },
                    "memory": {
                      "properties": {
                        "free": {
                          "description": "Free memory in bytes",
                          "type": "integer",
                          "example": 2412345678
                        },
                        "freeGB": {
                          "description": "Free memory in GB (formatted string)",
                          "type": "string",
                          "example": "2.25"
                        },
                        "percent": {
                          "description": "Memory usage percentage (formatted string)",
                          "type": "string",
                          "example": "37.50"
                        },
                        "total": {
                          "description": "Total memory in bytes",
                          "type": "integer",
                          "example": 3732582400
                        },
                        "totalGB": {
                          "description": "Total memory in GB (formatted string)",
                          "type": "string",
                          "example": "3.48"
                        },
                        "used": {
                          "description": "Used memory in bytes",
                          "type": "integer",
                          "example": 1320236722
                        },
                        "usedGB": {
                          "description": "Used memory in GB (formatted string)",
                          "type": "string",
                          "example": "1.23"
                        }
                      },
                      "type": "object"
                    },
                    "networkInterfaces": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "addresses": {
                            "type": "array",
                            "items": {
                              "properties": {
                                "address": {
                                  "type": "string",
                                  "example": "192.168.1.100/24"
                                },
                                "family": {
                                  "type": "string",
                                  "example": "IPv4"
                                },
                                "internal": {
                                  "type": "boolean",
                                  "example": false
                                },
                                "mac": {
                                  "type": "string",
                                  "example": "00:11:22:33:44:55"
                                },
                                "netmask": {
                                  "type": "string",
                                  "example": "255.255.255.0"
                                }
                              },
                              "type": "object"
                            }
                          },
                          "name": {
                            "type": "string",
                            "example": "link/ether"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "nodeVersion": {
                      "type": "string",
                      "example": "N/A (Go go1.25.3)"
                    },
                    "platform": {
                      "type": "string",
                      "example": "linux"
                    },
                    "release": {
                      "type": "string",
                      "example": "5.14.0-570.32.1.el9_6.x86_64"
                    },
                    "uptime": {
                      "properties": {
                        "formatted": {
                          "type": "string",
                          "example": "2 days, 5 hours, 30 minutes"
                        },
                        "seconds": {
                          "description": "Uptime in seconds",
                          "type": "integer",
                          "example": 189000
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unable to retrieve system info: Command execution failed"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/metrics/service-history": {
      "get": {
        "tags": [
          "Admin - Metrics"
        ],
        "summary": "Get service history",
        "description": "Returns service history data showing CPU, memory, and process count metrics for system services over time. Data is cached for 60 seconds.",
        "operationId": "66f3656d98bb10e1b29017131104019c",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Number of records to fetch. If not provided, returns all records.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "description": "Record ID",
                        "type": "integer",
                        "example": 180
                      },
                      "timestamp": {
                        "description": "Unix timestamp in milliseconds",
                        "type": "integer",
                        "example": 1706284800000
                      },
                      "service_name": {
                        "description": "Service name (e.g., nginx, mariadb, php-fpm, redis)",
                        "type": "string",
                        "example": "nginx"
                      },
                      "cpu_percent": {
                        "description": "CPU usage percentage for this service",
                        "type": "number",
                        "format": "float",
                        "example": 2.5
                      },
                      "memory_mb": {
                        "description": "Memory usage in MB",
                        "type": "number",
                        "format": "float",
                        "example": 35.5
                      },
                      "memory_percent": {
                        "description": "Memory usage percentage",
                        "type": "number",
                        "format": "float",
                        "example": 1.25
                      },
                      "process_count": {
                        "description": "Number of processes for this service",
                        "type": "integer",
                        "example": 2
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unable to retrieve service history: Command execution failed"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/metrics/clear-cache": {
      "post": {
        "tags": [
          "Admin - Metrics"
        ],
        "summary": "Clear metrics cache",
        "description": "Clears cached metrics data. By default, clears history cache. Use request body parameters to selectively clear specific cache types.",
        "operationId": "46ffe5e5764bb5fe255adfe009a87ac6",
        "requestBody": {
          "description": "Optional parameters to selectively clear cache",
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "limit": {
                    "description": "Clear cache for specific history limit (e.g., 15, 30). If not provided, clears default history cache.",
                    "type": "integer",
                    "example": 15
                  },
                  "clear_stats": {
                    "description": "Clear stats cache",
                    "type": "boolean",
                    "default": false,
                    "example": false
                  },
                  "clear_system_info": {
                    "description": "Clear system info cache",
                    "type": "boolean",
                    "default": false,
                    "example": false
                  },
                  "clear_service_history": {
                    "description": "Clear service history cache",
                    "type": "boolean",
                    "default": false,
                    "example": false
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cache cleared successfully",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Cache cleared successfully"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unable to clear cache: Cache operation failed"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/account": {
      "get": {
        "tags": [
          "Client - Account"
        ],
        "summary": "Get the caller's account",
        "description": "Returns the single account the API key is scoped to.",
        "operationId": "c76983b708706ee294e393e75b2876ca",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccount"
                }
              }
            }
          },
          "404": {
            "description": "Account no longer exists"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Client - Account"
        ],
        "summary": "Update profile fields on the caller's account",
        "description": "Clients can only update profile/contact fields and the auto-SSL toggle. Plan, SSH access, reseller assignment, username, domain, status and suspension flag are admin-only.",
        "operationId": "a56b412a0ef9c4a28ee8421c73b01062",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "is_auto_ssl_enabled": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "address": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "zip": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "company": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccount"
                }
              }
            }
          },
          "404": {
            "description": "Account no longer exists"
          },
          "422": {
            "description": "Attempt to modify a restricted field"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/account/configure-php": {
      "post": {
        "tags": [
          "Client - Account"
        ],
        "summary": "Change PHP version for a domain on the caller's account",
        "operationId": "8bb07250924a85475da417d47af09fcc",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "php_version_id"
                ],
                "properties": {
                  "domain_id": {
                    "description": "Must belong to the caller's account",
                    "type": "integer"
                  },
                  "php_version_id": {
                    "type": "integer"
                  },
                  "is_php_fpm_enabled": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "PHP version updated"
          },
          "404": {
            "description": "Account or domain not found / not owned by this API key"
          },
          "422": {
            "description": "Validation or update failure"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/account/visitor-stats": {
      "get": {
        "tags": [
          "Client - Account"
        ],
        "summary": "Get visitor statistics for the caller's account",
        "operationId": "106e5e98b8c1c97281383bcf4f5720c2",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "description": "Domain name. Omit to return pre-generated combined stats.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "goaccess JSON report"
          },
          "404": {
            "description": "Account or log not found"
          },
          "422": {
            "description": "goaccess error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/account/usage-details": {
      "get": {
        "tags": [
          "Client - Account"
        ],
        "summary": "Get usage details and statistics for the caller's account",
        "operationId": "2834559d8a78de0174fc272268868375",
        "responses": {
          "200": {
            "description": "Usage details"
          },
          "404": {
            "description": "Account not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/databases": {
      "get": {
        "tags": [
          "Client - Databases"
        ],
        "summary": "List databases on the caller's account",
        "description": "The account is automatically derived from the API key — no parameter required.",
        "operationId": "9a5faf32f51bf89c36c238fed5d90822",
        "responses": {
          "200": {
            "description": "List of databases",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountDatabase"
                  }
                }
              }
            }
          },
          "404": {
            "description": "No databases found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - Databases"
        ],
        "summary": "Create a new database on the caller's account",
        "operationId": "32ef41411859442c3f1441b7c12e51a0",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "database_name"
                ],
                "properties": {
                  "database_name": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Database created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDatabase"
                }
              }
            }
          },
          "422": {
            "description": "Validation or creation failure (e.g. duplicate name, quota reached, invalid characters)"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/databases/{id}": {
      "get": {
        "tags": [
          "Client - Databases"
        ],
        "summary": "Get a single database by ID (must belong to the caller's account)",
        "operationId": "72878f2f0117a0e784e1a719cf9a2fa5",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Database details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDatabase"
                }
              }
            }
          },
          "404": {
            "description": "Database not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Client - Databases"
        ],
        "summary": "Delete a database from the caller's account",
        "operationId": "c60e8294b6d91163686b8542ace47e21",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Database deleted successfully"
          },
          "404": {
            "description": "Database not found"
          },
          "409": {
            "description": "Database still has users assigned"
          },
          "422": {
            "description": "Failed to delete the database"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/database-users": {
      "get": {
        "tags": [
          "Client - Database Users"
        ],
        "summary": "List database users on the caller's account",
        "description": "The account is automatically derived from the API key — no parameter required.",
        "operationId": "397bc9780f663a5092b095f9791cfcec",
        "responses": {
          "200": {
            "description": "List of database users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountDatabaseUser"
                  }
                }
              }
            }
          },
          "404": {
            "description": "No database users found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - Database Users"
        ],
        "summary": "Create a new database user on the caller's account",
        "operationId": "44b0685bf9b261bf824895cf84a8d851",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "username",
                  "password"
                ],
                "properties": {
                  "username": {
                    "description": "Database username",
                    "type": "string",
                    "maxLength": 50
                  },
                  "password": {
                    "description": "Database password",
                    "type": "string",
                    "minLength": 8
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Database user created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDatabaseUser"
                }
              }
            }
          },
          "422": {
            "description": "Validation or creation failure (e.g. duplicate username, invalid characters)"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/database-users/{id}": {
      "get": {
        "tags": [
          "Client - Database Users"
        ],
        "summary": "Get a single database user by ID (must belong to the caller's account)",
        "operationId": "b383c65698ee05d0f37a7fa9c704cdab",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Database user details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDatabaseUser"
                }
              }
            }
          },
          "404": {
            "description": "Database user not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Client - Database Users"
        ],
        "summary": "Delete a database user from the caller's account",
        "operationId": "b4b4ead790db5aa51a3c19a7612bd00f",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Database user deleted successfully"
          },
          "404": {
            "description": "Database user not found"
          },
          "409": {
            "description": "Database user still has databases attached"
          },
          "422": {
            "description": "Failed to delete the database user"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/database-users/{id}/assign-database": {
      "post": {
        "tags": [
          "Client - Database Users"
        ],
        "summary": "Assign a database to this user with privileges",
        "operationId": "c66004d6872fcb7a105d676c8fa04753",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "database_id"
                ],
                "properties": {
                  "database_id": {
                    "type": "integer"
                  },
                  "privileges": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Privileges updated"
          },
          "404": {
            "description": "User or database not found"
          },
          "422": {
            "description": "Invalid privileges or failure"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/database-users/{id}/databases/{database_id}": {
      "delete": {
        "tags": [
          "Client - Database Users"
        ],
        "summary": "Detach a database from this user (revokes privileges, removes the link)",
        "description": "Breaks the link between a database user and a database without deleting either. Required before deleting either side of the pair.",
        "operationId": "f554996309db3ffca926a80ba14c6fd7",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "database_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Database detached from user"
          },
          "404": {
            "description": "User or database not found, or they are not linked"
          },
          "422": {
            "description": "Detach failed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/dns-records": {
      "get": {
        "tags": [
          "Client - DNS Records"
        ],
        "summary": "List DNS records for a domain owned by the caller",
        "description": "Filters by domain_id. The domain must belong to the caller's account (enforced server-side).",
        "operationId": "3111b00b693e6d11f8ec9a67db638ef3",
        "parameters": [
          {
            "name": "domain_id",
            "in": "query",
            "description": "ID of the domain to filter by (must belong to the caller's account)",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of DNS records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DNSRecord"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Domain not found or not owned by this API key"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - DNS Records"
        ],
        "summary": "Create a DNS record on a domain owned by the caller",
        "description": "Type is restricted to A, AAAA, CNAME, MX, TXT, SRV, NS. Provisioning of the zone happens automatically.",
        "operationId": "d666e34c846c5f79a33917332854623a",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "name",
                  "type",
                  "content",
                  "ttl"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "A",
                      "AAAA",
                      "CNAME",
                      "MX",
                      "TXT",
                      "SRV",
                      "NS"
                    ]
                  },
                  "content": {
                    "type": "string"
                  },
                  "ttl": {
                    "type": "integer",
                    "maximum": 86400,
                    "minimum": 60
                  },
                  "priority": {
                    "description": "Required for MX and SRV",
                    "type": "integer"
                  },
                  "weight": {
                    "description": "Required for SRV",
                    "type": "integer"
                  },
                  "port": {
                    "description": "Required for SRV",
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DNSRecord"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found or not owned by this API key"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/dns-records/{id}": {
      "get": {
        "tags": [
          "Client - DNS Records"
        ],
        "summary": "Get a single DNS record by ID (must belong to the caller's account)",
        "operationId": "e179c3beba075d8867068a0d8e054ccd",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DNS record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DNSRecord"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Client - DNS Records"
        ],
        "summary": "Update a DNS record on the caller's account",
        "description": "The record's domain ownership cannot be changed. SOA records cannot be modified.",
        "operationId": "701c4a4c8e478b17affb8c5206d3c92e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "A",
                      "AAAA",
                      "CNAME",
                      "MX",
                      "TXT",
                      "SRV",
                      "NS"
                    ]
                  },
                  "content": {
                    "type": "string"
                  },
                  "ttl": {
                    "type": "integer",
                    "maximum": 86400,
                    "minimum": 60
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "weight": {
                    "type": "integer"
                  },
                  "port": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DNSRecord"
                }
              }
            }
          },
          "403": {
            "description": "SOA records cannot be modified"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Client - DNS Records"
        ],
        "summary": "Delete a DNS record from the caller's account",
        "description": "SOA records cannot be deleted.",
        "operationId": "fc3ca6117c7b46491ec3facf949a10dc",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "403": {
            "description": "SOA records cannot be deleted"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed to delete"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/domains": {
      "get": {
        "tags": [
          "Client - Domains"
        ],
        "summary": "List domains on the caller's account",
        "description": "The account is automatically derived from the API key — no parameter required.",
        "operationId": "7812945c0006d6a30b33d36bae1f797b",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountDomain"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - Domains"
        ],
        "summary": "Create a new domain on the caller's account",
        "operationId": "28ef765bb2d840466e6f0470c33f0df4",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain",
                  "domain_type"
                ],
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "domain_type": {
                    "type": "string",
                    "enum": [
                      "domain",
                      "subdomain",
                      "parked"
                    ]
                  },
                  "domain_path": {
                    "type": "string"
                  },
                  "parent_domain_id": {
                    "type": "integer"
                  },
                  "subdomain": {
                    "type": "string"
                  },
                  "parked_on_domain_id": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDomain"
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/domains/{id}": {
      "get": {
        "tags": [
          "Client - Domains"
        ],
        "summary": "Get a domain by ID (must belong to the caller's account)",
        "operationId": "e40e5663a0aeee99aaa390b4c35e1d8e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDomain"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Client - Domains"
        ],
        "summary": "Update a domain on the caller's account",
        "operationId": "8cdcb016f9bbba30a45c3d148015b395",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingAccountDomain"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDomain"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Client - Domains"
        ],
        "summary": "Delete a domain from the caller's account",
        "operationId": "b349bd23aab715118ef26badc6aed55c",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "404": {
            "description": "Domain not found"
          },
          "422": {
            "description": "Failed to delete"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/email-accounts": {
      "get": {
        "tags": [
          "Client - Email Accounts"
        ],
        "summary": "List email accounts for a domain owned by the caller",
        "description": "Filters by domain_id. The domain must belong to the caller's account (enforced server-side).",
        "operationId": "88d4e9e33ae1ccfb80956d7606bf3606",
        "parameters": [
          {
            "name": "domain_id",
            "in": "query",
            "description": "ID of the domain to filter by (must belong to the caller's account)",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of email accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountEmailAccount"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Domain not found or not owned by this API key"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - Email Accounts"
        ],
        "summary": "Create a new email account on a domain owned by the caller",
        "operationId": "c45ecd6e13f1be4fb24354460099497a",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "username",
                  "password"
                ],
                "properties": {
                  "domain_id": {
                    "description": "Must belong to the caller's account",
                    "type": "integer"
                  },
                  "username": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountEmailAccount"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found or not owned by this API key"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/email-accounts/{id}": {
      "get": {
        "tags": [
          "Client - Email Accounts"
        ],
        "summary": "Get a single email account by ID (must belong to the caller's account)",
        "operationId": "3795bc7b03023e5f4a74b0d345f9f5e9",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email account details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountEmailAccount"
                }
              }
            }
          },
          "404": {
            "description": "Email account not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Client - Email Accounts"
        ],
        "summary": "Update an existing email account on the caller's account",
        "operationId": "9fa6e6242f575b789194df8d214d91c9",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingAccountEmailAccount"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email account updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountEmailAccount"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Client - Email Accounts"
        ],
        "summary": "Delete an email account from the caller's account",
        "operationId": "ba0b3264c8cc9571123bc1476de81991",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email account deleted successfully"
          },
          "404": {
            "description": "Email account not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/error-logs": {
      "get": {
        "tags": [
          "Client - Logs"
        ],
        "summary": "Fetch HTTP error log entries for a domain on the caller's account",
        "description": "Pulls live entries from the BoltAgent log service. Defaults to the account's first domain when 'domain' is omitted. Supports level, search and date-range filters; results are paginated.",
        "operationId": "8d663dee7b85418f6869ae18da1a3b34",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "description": "Domain to fetch logs for (must belong to the caller's account). Defaults to the first available domain.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "description": "Severity level filter",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "EMERGENCY",
                "ALERT",
                "CRITICAL",
                "ERROR",
                "WARNING",
                "NOTICE",
                "INFO",
                "DEBUG"
              ]
            }
          },
          {
            "name": "grep",
            "in": "query",
            "description": "Free-text search applied at the agent level",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Lower time bound (ISO 8601 or any Carbon-parseable date). Local-day boundary is applied.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "until",
            "in": "query",
            "description": "Upper time bound (ISO 8601 or any Carbon-parseable date). Local-day boundary is applied.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lines",
            "in": "query",
            "description": "Max raw lines pulled from the agent before pagination (1-5000, default 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1000,
              "maximum": 5000,
              "minimum": 1
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-based)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Items per page (1-500, default 50)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 500,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated log entries",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "domain": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "created_at": {
                            "description": "Timestamp from the agent (may be null)",
                            "type": "string"
                          },
                          "module": {
                            "type": "string"
                          },
                          "level": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "domain": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "meta": {
                      "properties": {
                        "page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        },
                        "last_page": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found or no domains on this account"
          },
          "422": {
            "description": "Validation error"
          },
          "502": {
            "description": "Failed to retrieve logs from the agent"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ftp-accounts": {
      "get": {
        "tags": [
          "Client - FTP Accounts"
        ],
        "summary": "List FTP accounts on the caller's account",
        "description": "The account is automatically derived from the API key — no parameter required.",
        "operationId": "265c022393396948b29008fcf904d202",
        "responses": {
          "200": {
            "description": "List of FTP accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountFtpAccount"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - FTP Accounts"
        ],
        "summary": "Create a new FTP account on the caller's account",
        "operationId": "9cb3de6df4c64b630fa2da0c3218a1df",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "ftp_username",
                  "ftp_password",
                  "ftp_path"
                ],
                "properties": {
                  "ftp_username": {
                    "type": "string"
                  },
                  "ftp_password": {
                    "type": "string"
                  },
                  "ftp_path": {
                    "description": "Relative path under the account home only (e.g. test). Never pass a full /home/<username>/... path.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "FTP account created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountFtpAccount"
                }
              }
            }
          },
          "422": {
            "description": "Validation or creation failure (e.g. invalid ftp_path, quota reached, duplicate)"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ftp-accounts/{id}": {
      "get": {
        "tags": [
          "Client - FTP Accounts"
        ],
        "summary": "Get a single FTP account by ID (must belong to the caller's account)",
        "operationId": "f64f032cbbd11d9ca28ccef8feb67664",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FTP account details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountFtpAccount"
                }
              }
            }
          },
          "404": {
            "description": "FTP account not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Client - FTP Accounts"
        ],
        "summary": "Update an existing FTP account on the caller's account",
        "operationId": "d61e2ceeb5c147561a19a9ecd8a6c617",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ftp_password": {
                    "type": "string"
                  },
                  "ftp_path": {
                    "description": "Relative path under the account home only (e.g. test). Never pass a full /home/<username>/... path.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "FTP account updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountFtpAccount"
                }
              }
            }
          },
          "404": {
            "description": "FTP account not found"
          },
          "422": {
            "description": "Update failed (e.g. invalid ftp_path)"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Client - FTP Accounts"
        ],
        "summary": "Delete an FTP account from the caller's account",
        "operationId": "517f9cf9100dcee370f6a9c133e78da7",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FTP account deleted successfully"
          },
          "404": {
            "description": "FTP account not found"
          },
          "422": {
            "description": "Failed to delete the FTP account"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ip-blockers": {
      "get": {
        "tags": [
          "Client - IP Blockers"
        ],
        "summary": "List IP blockers on the caller's account",
        "description": "Optionally filter by domain_id. The account is automatically derived from the API key.",
        "operationId": "6e2a168c22c3ea13104b5cdbba79a910",
        "parameters": [
          {
            "name": "domain_id",
            "in": "query",
            "description": "ID of the domain to filter by (must belong to the caller's account)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountIpBlocker"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Domain not found or not owned by this API key"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - IP Blockers"
        ],
        "summary": "Create one or more IP blocker rules for a domain owned by the caller",
        "description": "Accepts a single IPv4, an IP range (e.g. 192.168.0.1-40), CIDR (e.g. 192.168.0.0/24), an implied range (e.g. 192.) or an FQDN. Multiple records may be created from a single value (range/CIDR/FQDN expansion).",
        "operationId": "70d3f8779d2e59d9aac9db51facf2e86",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "blocked_ip"
                ],
                "properties": {
                  "domain_id": {
                    "description": "ID of the domain (must belong to the caller's account)",
                    "type": "integer"
                  },
                  "blocked_ip": {
                    "description": "IPv4, range, CIDR or FQDN",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountIpBlocker"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Domain not found or not owned by this API key"
          },
          "422": {
            "description": "Validation error or unsupported value"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ip-blockers/{id}": {
      "get": {
        "tags": [
          "Client - IP Blockers"
        ],
        "summary": "Get a single IP blocker by ID (must belong to the caller's account)",
        "operationId": "63db3a665a50793a5c2816828a361aa3",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountIpBlocker"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Client - IP Blockers"
        ],
        "summary": "Delete an IP blocker rule from the caller's account",
        "operationId": "3c986ab53da941ad8e5c6672b1dd1a7f",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed to delete"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ssl-certificates": {
      "get": {
        "tags": [
          "Client - SSL Certificates"
        ],
        "summary": "List domains on the caller's account with their SSL certificate state",
        "description": "Returns one row per domain; sslCertificate is null when SSL is disabled.",
        "operationId": "03f7278d1cca6577c8bc27332f72588e",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "domain_id": {
                        "type": "integer"
                      },
                      "domain": {
                        "type": "string"
                      },
                      "ssl_enabled": {
                        "type": "boolean"
                      },
                      "ssl_certificate": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/HostingAccountSslCertificate"
                          }
                        ],
                        "nullable": true
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ssl-certificates/{domain_id}": {
      "get": {
        "tags": [
          "Client - SSL Certificates"
        ],
        "summary": "Get SSL certificate state for a single domain",
        "description": "Combines the local SSL record with live PEM/issuer data fetched from the bolt-agent (when a certificate is installed).",
        "operationId": "ae71c84b6c131187aacaf07017e63844",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "domain_id": {
                      "type": "integer"
                    },
                    "domain": {
                      "type": "string"
                    },
                    "ssl_enabled": {
                      "type": "boolean"
                    },
                    "ssl_certificate": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/HostingAccountSslCertificate"
                        }
                      ],
                      "nullable": true
                    },
                    "agent": {
                      "properties": {
                        "certificate": {
                          "type": "string"
                        },
                        "private_key": {
                          "type": "string"
                        },
                        "certificate_chain": {
                          "type": "string"
                        },
                        "issuer": {
                          "type": "string"
                        },
                        "valid_to": {
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "nullable": true
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Client - SSL Certificates"
        ],
        "summary": "Disable SSL for a domain",
        "description": "Removes the certificate on the bolt-agent and deletes the local SSL record. HTTPS will no longer be served for this domain.",
        "operationId": "d72d17dded81be65e0281b40520a25d8",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Disabled"
          },
          "404": {
            "description": "Domain not found"
          },
          "422": {
            "description": "Disable failed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ssl-certificates/{domain_id}/issue": {
      "post": {
        "tags": [
          "Client - SSL Certificates"
        ],
        "summary": "Issue a free SSL certificate for a domain",
        "description": "Equivalent to the 'Enable Free SSL' action. Defaults to the configured general.certificate_provider.",
        "operationId": "3e8269725f4e25e7160982c68278c6df",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "LetsEncrypt",
                      "ZeroSSL"
                    ],
                    "nullable": true
                  },
                  "force": {
                    "description": "Bypass validation/precondition checks",
                    "type": "boolean",
                    "default": false
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Issued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountSslCertificate"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found"
          },
          "422": {
            "description": "Issue failed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ssl-certificates/{domain_id}/reissue": {
      "post": {
        "tags": [
          "Client - SSL Certificates"
        ],
        "summary": "Reissue the existing SSL certificate using its current provider",
        "description": "Only valid when the active certificate was issued through Let's Encrypt or ZeroSSL (i.e. type !== 'own').",
        "operationId": "9de38976844c34487f455de69177dcde",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "force": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reissued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountSslCertificate"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found"
          },
          "409": {
            "description": "Certificate is not reissuable"
          },
          "422": {
            "description": "Reissue failed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ssl-certificates/{domain_id}/upload": {
      "post": {
        "tags": [
          "Client - SSL Certificates"
        ],
        "summary": "Upload a custom SSL certificate (PEM)",
        "operationId": "1ff775e4bae7974e5a7688dd66bcf5ae",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "certificate",
                  "private_key"
                ],
                "properties": {
                  "certificate": {
                    "description": "PEM-encoded certificate",
                    "type": "string"
                  },
                  "private_key": {
                    "description": "PEM-encoded private key",
                    "type": "string"
                  },
                  "certificate_chain": {
                    "description": "PEM-encoded chain (optional, defaults to certificate)",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Uploaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountSslCertificate"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found"
          },
          "422": {
            "description": "Upload failed / validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/ssl-certificates/{domain_id}/self-signed": {
      "post": {
        "tags": [
          "Client - SSL Certificates"
        ],
        "summary": "Generate a self-signed certificate for a domain",
        "description": "When 'apply' is true (default), the certificate is also uploaded and activated for the domain. When false, the generated PEM material is returned without persisting it.",
        "operationId": "6084cb1fd70305751b7d0727d94ecaf6",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "apply": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "certificate": {
                      "type": "string"
                    },
                    "private_key": {
                      "type": "string"
                    },
                    "certificate_chain": {
                      "type": "string"
                    },
                    "ssl_certificate": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/HostingAccountSslCertificate"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found"
          },
          "422": {
            "description": "Upload failed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress": {
      "get": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "List all WordPress installations on the caller's account",
        "description": "Scans every domain on the account for wp-config.php files.",
        "operationId": "473e7033469a7033a56a1a5e01285a2d",
        "responses": {
          "200": {
            "description": "List of installations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "domain": {
                        "type": "string"
                      },
                      "path": {
                        "description": "Install subdirectory, '/' for root",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Start a new WordPress installation (async)",
        "description": "Dispatches a background install job. Poll /api/client/wordpress/install-status with the returned job_key to track progress.",
        "operationId": "0f212143803f759312e0db8ced5d3138",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "site_title",
                  "admin_username",
                  "admin_email",
                  "admin_password"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "install_path": {
                    "description": "Subdirectory (e.g. 'blog'). Empty for root.",
                    "type": "string",
                    "nullable": true
                  },
                  "site_title": {
                    "type": "string"
                  },
                  "site_description": {
                    "type": "string"
                  },
                  "allow_search_engines": {
                    "type": "boolean",
                    "default": true
                  },
                  "admin_username": {
                    "type": "string"
                  },
                  "admin_email": {
                    "type": "string",
                    "format": "email"
                  },
                  "admin_password": {
                    "type": "string",
                    "minLength": 8,
                    "writeOnly": true
                  },
                  "admin_first_name": {
                    "type": "string"
                  },
                  "admin_last_name": {
                    "type": "string"
                  },
                  "enable_debug": {
                    "type": "boolean",
                    "default": false
                  },
                  "clean_existing_files": {
                    "type": "boolean",
                    "default": false
                  },
                  "language": {
                    "type": "string",
                    "default": "en_US"
                  },
                  "timezone": {
                    "type": "string",
                    "default": "UTC"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Install job dispatched",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "job_key": {
                      "type": "string"
                    },
                    "status_url": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found on this account"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Uninstall a WordPress site (files + database)",
        "operationId": "6dee5c1ef72a89e78120d25c41d24f89",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "description": "Install subdirectory; omit or '/' for root",
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Uninstalled"
          },
          "404": {
            "description": "Domain not found"
          },
          "422": {
            "description": "Failure"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/install-status": {
      "get": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Poll the progress of an install job",
        "operationId": "c142b0062e40188abf2ae08eea607aa5",
        "parameters": [
          {
            "name": "job_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Progress",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "step": {
                      "type": "integer"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "label": {
                      "type": "string"
                    },
                    "completed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string",
                      "nullable": true
                    },
                    "conflict": {
                      "type": "boolean"
                    },
                    "summary": {
                      "type": "object",
                      "nullable": true
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Job key unknown or expired"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/info": {
      "get": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Get core version, available update and site stats",
        "operationId": "25cc0d1b6a03892c77f85af04ebf42a0",
        "parameters": [
          {
            "name": "domain_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Info",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "update_available": {
                      "type": "string",
                      "nullable": true
                    },
                    "site_name": {
                      "type": "string"
                    },
                    "site_indexed": {
                      "type": "boolean"
                    },
                    "posts_count": {
                      "type": "integer"
                    },
                    "pages_count": {
                      "type": "integer"
                    },
                    "drafts_count": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Domain or installation not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/update-core": {
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Update WordPress core to the latest version",
        "operationId": "a1e7584e062c9ed64bc1f63213d724aa",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "version": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "422": {
            "description": "Update failed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/sso": {
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Generate a one-time SSO admin login URL",
        "operationId": "45b108924b1f077d1be833f8901e76fb",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "SSO link",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/plugins": {
      "get": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "List plugins",
        "operationId": "ed54e6cc94f6e0b806ebc28491a86352",
        "parameters": [
          {
            "name": "domain_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of plugins",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "version": {
                        "type": "string"
                      },
                      "update": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Install a plugin (from the wp.org repo)",
        "operationId": "7b203098d415ac2f8c2bd741a8abe02d",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "slug"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  },
                  "slug": {
                    "type": "string"
                  },
                  "activate": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Installed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/plugins/{slug}/activate": {
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Activate a plugin",
        "operationId": "b3da4c0f26d2260e16dcb93d31c2440f",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Activated"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/plugins/{slug}/deactivate": {
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Deactivate a plugin",
        "operationId": "a2dfc0bdfbab0a8ed0b40fd1be8db614",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deactivated"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/plugins/{slug}/update": {
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Update a plugin to the latest version",
        "operationId": "b19d516c482f6e371fa0988b43692697",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/plugins/{slug}": {
      "delete": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Delete a plugin",
        "operationId": "ffa9ceeabef881ef42237b971f845670",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deleted"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/themes": {
      "get": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "List themes",
        "operationId": "98c1450ebbd2a942bf47df2823838327",
        "parameters": [
          {
            "name": "domain_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of themes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "version": {
                        "type": "string"
                      },
                      "update": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Install a theme",
        "operationId": "3d5e70cb26f61558b7c00b4255605445",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "slug"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  },
                  "slug": {
                    "type": "string"
                  },
                  "activate": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Installed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/themes/{slug}/activate": {
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Activate a theme",
        "operationId": "3d887f6a7efb8b123d12cf1937056cac",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Activated"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/themes/{slug}/update": {
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Update a theme to the latest version",
        "operationId": "a4bb89660ec5578c09469e7e69571c34",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/themes/{slug}": {
      "delete": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Delete a theme",
        "operationId": "2573c6bf359a260d81dba47f6c25c1ea",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deleted"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/posts": {
      "get": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "List recent posts and pages",
        "operationId": "524c3227d88917401acaec9e061495b9",
        "parameters": [
          {
            "name": "domain_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "ID": {
                        "type": "integer"
                      },
                      "post_title": {
                        "type": "string"
                      },
                      "post_status": {
                        "type": "string"
                      },
                      "post_type": {
                        "type": "string"
                      },
                      "post_date": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Create a new post or page",
        "operationId": "67545d2d09b3d64a798dd5d49ed76428",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "title"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  },
                  "title": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "default": "publish",
                    "enum": [
                      "publish",
                      "draft",
                      "private",
                      "pending"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "default": "post",
                    "enum": [
                      "post",
                      "page"
                    ]
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/posts/{id}/status": {
      "patch": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Change a post's status",
        "operationId": "932e858c5bf292981135d839356bd550",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "status"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "publish",
                      "draft",
                      "private",
                      "pending"
                    ]
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/client/wordpress/posts/{id}": {
      "delete": {
        "tags": [
          "Client - WordPress"
        ],
        "summary": "Delete a post (force, skips trash)",
        "operationId": "11ba97fd497f600dc5632db69f0eecd3",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "path": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deleted"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/health": {
      "get": {
        "tags": [
          "Admin - Health"
        ],
        "summary": "Check API health status",
        "description": "Returns the health status of the API",
        "operationId": "9b09e89d95cbd4cd0db9600a14f9495e",
        "responses": {
          "200": {
            "description": "API is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts": {
      "get": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "List all hosting accounts",
        "description": "Display a listing of the resource.",
        "operationId": "624f9eca32fbff383b079e6dd5a50599",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccount"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Create a new hosting account",
        "description": "Store a newly created resource in storage.",
        "operationId": "0043cec20504b1edee5720aa6bef1650",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingAccount"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccount"
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}": {
      "get": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Get a hosting account by ID",
        "description": "Display the specified resource.",
        "operationId": "c316c01785380ad079fd02c5d8fed38f",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccount"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Update a hosting account",
        "description": "Update the specified resource in storage.",
        "operationId": "74d46380ce693fded7a1a96f835683a0",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "hosting_plan_id": {
                    "description": "ID of the hosting plan",
                    "type": "integer"
                  },
                  "ssh_access": {
                    "description": "SSH access enabled",
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Account holder name",
                    "type": "string"
                  },
                  "phone": {
                    "description": "Phone number",
                    "type": "string"
                  },
                  "address": {
                    "description": "Street address",
                    "type": "string"
                  },
                  "city": {
                    "description": "City",
                    "type": "string"
                  },
                  "state": {
                    "description": "State/Province",
                    "type": "string"
                  },
                  "zip": {
                    "description": "Postal/ZIP code",
                    "type": "string"
                  },
                  "country": {
                    "description": "Country",
                    "type": "string"
                  },
                  "company": {
                    "description": "Company name",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccount"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Delete a hosting account",
        "description": "Remove the specified resource from storage.",
        "operationId": "21077ee155d0351d2cba92ac419ba482",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "422": {
            "description": "Failed to delete"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}/suspend": {
      "post": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Suspend a hosting account",
        "description": "Suspend a hosting account.",
        "operationId": "a23c5f9f5199980f005707d586d452bf",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Suspended"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed to suspend"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}/unsuspend": {
      "post": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Unsuspend a hosting account",
        "description": "Unsuspend a hosting account.",
        "operationId": "03f05f42266672e5e0018c8e668dcd08",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unsuspended"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed to unsuspend"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}/change-password": {
      "post": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Change password for a hosting account",
        "description": "Change password for a hosting account.",
        "operationId": "469569ade1ec9676d1d0271bc22b9c17",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "description": "New password for the hosting account",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Password changed successfully"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed to change password"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}/generate-sso-token": {
      "post": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Generate an SSO token for a hosting account",
        "description": "Generate an SSO token for a hosting account.",
        "operationId": "69612002454953abd5719b610e21953f",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Token generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "redirect_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "sso_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "token": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Hosting account not found"
          },
          "422": {
            "description": "Failed to generate token"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}/usage-details": {
      "get": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Get usage details and statistics for a hosting account",
        "description": "Get usage details for a hosting account.",
        "operationId": "daea9262ca8870c5539d4ec901e70cb3",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Hosting statistic returned success."
                    },
                    "usageDetails": {
                      "properties": {
                        "diskUsage": {
                          "description": "Current disk usage in MB",
                          "type": "number"
                        },
                        "totalDiskUsage": {
                          "description": "Total disk space allocated in MB",
                          "type": "number"
                        },
                        "diskUsageWarning": {
                          "description": "Whether disk usage is at warning level",
                          "type": "boolean"
                        },
                        "databaseDiskUsage": {
                          "description": "Database disk usage in MB",
                          "type": "number"
                        },
                        "totalDatabaseDiskUsage": {
                          "description": "Total database disk space in MB",
                          "type": "number"
                        },
                        "bandwidth": {
                          "description": "Current bandwidth usage",
                          "type": "number"
                        },
                        "totalBandwidth": {
                          "description": "Total bandwidth allocated",
                          "type": "number"
                        },
                        "addonDomains": {
                          "description": "Current number of addon domains",
                          "type": "integer"
                        },
                        "totalAddonDomains": {
                          "description": "Maximum addon domains allowed",
                          "type": "integer"
                        },
                        "subdomains": {
                          "description": "Current number of subdomains",
                          "type": "integer"
                        },
                        "totalSubdomains": {
                          "description": "Maximum subdomains allowed",
                          "type": "integer"
                        },
                        "aliasDomains": {
                          "description": "Current number of alias/parked domains",
                          "type": "integer"
                        },
                        "totalAliasDomains": {
                          "description": "Maximum alias/parked domains allowed",
                          "type": "integer"
                        },
                        "ftpAccounts": {
                          "description": "Current number of FTP accounts",
                          "type": "integer"
                        },
                        "totalFtpAccounts": {
                          "description": "Maximum FTP accounts allowed",
                          "type": "integer"
                        },
                        "databases": {
                          "description": "Current number of databases",
                          "type": "integer"
                        },
                        "totalDatabases": {
                          "description": "Maximum databases allowed",
                          "type": "integer"
                        },
                        "emailAccounts": {
                          "description": "Current number of email accounts",
                          "type": "integer"
                        },
                        "totalEmailAccounts": {
                          "description": "Maximum email accounts allowed",
                          "type": "integer"
                        },
                        "emailAutoresponders": {
                          "description": "Current number of email autoresponders",
                          "type": "integer"
                        },
                        "totalEmailAutoresponders": {
                          "description": "Maximum email autoresponders allowed",
                          "type": "integer"
                        },
                        "emailForwarders": {
                          "description": "Current number of email forwarders",
                          "type": "integer"
                        },
                        "totalEmailForwarders": {
                          "description": "Maximum email forwarders allowed",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}/configure-php": {
      "post": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Change PHP version for a domain",
        "description": "Configure PHP version for a domain via bolt-agent.",
        "operationId": "66c2e57c33ad830d146781bb140747bc",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "domain_id",
                  "php_version_id"
                ],
                "properties": {
                  "domain_id": {
                    "type": "integer"
                  },
                  "php_version_id": {
                    "type": "integer"
                  },
                  "is_php_fpm_enabled": {
                    "description": "Optionally enable/disable PHP-FPM",
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "PHP version updated"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}/visitor-stats": {
      "get": {
        "tags": [
          "Admin - Hosting Accounts"
        ],
        "summary": "Get visitor statistics for a domain",
        "description": "Get visitor statistics for a hosting account domain via goaccess.",
        "operationId": "ffe8e5cf72f1777ce5767fadaa5461a5",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "description": "Domain name. Omit to return pre-generated combined stats.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "goaccess JSON report"
          },
          "404": {
            "description": "Not found or no log file"
          },
          "422": {
            "description": "goaccess error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/databases": {
      "get": {
        "tags": [
          "Admin - Hosting Account Databases"
        ],
        "summary": "List all databases. Filter by hosting_account_id.",
        "operationId": "e4961f3c244fd827b10b0d2eaf513e1c",
        "parameters": [
          {
            "name": "hosting_account_id",
            "in": "query",
            "description": "ID of the hosting account to filter by",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of databases",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountDatabase"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Hosting account ID is required"
          },
          "403": {
            "description": "Unauthorized access to hosting account"
          },
          "404": {
            "description": "No databases found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin - Hosting Account Databases"
        ],
        "summary": "Create a new database",
        "operationId": "4028d09d7561ef7920ce77ec76380ed5",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "hosting_account_id",
                  "database_name"
                ],
                "properties": {
                  "hosting_account_id": {
                    "type": "integer"
                  },
                  "database_name": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Database created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDatabase"
                }
              }
            }
          },
          "400": {
            "description": "Hosting account ID and database name are required"
          },
          "403": {
            "description": "Unauthorized access to hosting account"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/databases/{id}": {
      "get": {
        "tags": [
          "Admin - Hosting Account Databases"
        ],
        "summary": "Get a single database by ID",
        "operationId": "89095603205482a6d647a30de5ba4787",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the database",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Database details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDatabase"
                }
              }
            }
          },
          "404": {
            "description": "Database not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin - Hosting Account Databases"
        ],
        "summary": "Delete a database",
        "operationId": "35006c53a2419ecbe66334cc6d4b8f6b",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the database",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "hosting_account_id"
                ],
                "properties": {
                  "hosting_account_id": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Database deleted successfully"
          },
          "400": {
            "description": "Hosting account ID is required"
          },
          "403": {
            "description": "Unauthorized access to hosting account"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/database-users": {
      "get": {
        "tags": [
          "Admin - Hosting Account Database Users"
        ],
        "summary": "List all database users. Filter by hosting_account_id.",
        "operationId": "99e949217f8b107108bf50803b29b2a1",
        "parameters": [
          {
            "name": "hosting_account_id",
            "in": "query",
            "description": "ID of the hosting account to filter by",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of database users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountDatabaseUser"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Hosting account ID is required"
          },
          "403": {
            "description": "Unauthorized access to hosting account"
          },
          "404": {
            "description": "No database users found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin - Hosting Account Database Users"
        ],
        "summary": "Create a new database user",
        "operationId": "05c2b70e99e551637526f05d1e5dc2a6",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "username",
                  "password",
                  "hosting_account_id"
                ],
                "properties": {
                  "username": {
                    "description": "Database username",
                    "type": "string",
                    "maxLength": 50
                  },
                  "password": {
                    "description": "Database password",
                    "type": "string",
                    "minLength": 8
                  },
                  "hosting_account_id": {
                    "description": "ID of the hosting account",
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Database user created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDatabaseUser"
                }
              }
            }
          },
          "400": {
            "description": "Validation error or hosting account ID is required"
          },
          "403": {
            "description": "Unauthorized access to hosting account"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/database-users/{id}": {
      "get": {
        "tags": [
          "Admin - Hosting Account Database Users"
        ],
        "summary": "Get a single database user by ID",
        "operationId": "cbcb9142a0145d44ee96147b85b353a6",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the database user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Database user details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDatabaseUser"
                }
              }
            }
          },
          "404": {
            "description": "Database user not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin - Hosting Account Database Users"
        ],
        "summary": "Delete a database user",
        "operationId": "5d514ee4761f8af9ac50ed5af1e39f4f",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the database user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "hosting_account_id"
                ],
                "properties": {
                  "hosting_account_id": {
                    "description": "ID of the hosting account",
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Database user deleted successfully"
          },
          "400": {
            "description": "Hosting account ID is required"
          },
          "403": {
            "description": "Unauthorized access to hosting account"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/domains": {
      "get": {
        "tags": [
          "Admin - Hosting Account Domains"
        ],
        "summary": "List all domains for a hosting account",
        "operationId": "cc3dc02bd26dcb9024fb16d218e53c41",
        "parameters": [
          {
            "name": "hosting_account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountDomain"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin - Hosting Account Domains"
        ],
        "summary": "Create a new domain",
        "operationId": "c8368e16ca521ddbef7715d7c916bca0",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingAccountDomain"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDomain"
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/domains/{id}": {
      "get": {
        "tags": [
          "Admin - Hosting Account Domains"
        ],
        "summary": "Get a domain by ID",
        "operationId": "a6449701a7b51af67f15f39be79268e3",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDomain"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Admin - Hosting Account Domains"
        ],
        "summary": "Update a domain",
        "operationId": "24f306dbb435bf80ea4029b6858722d5",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingAccountDomain"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountDomain"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin - Hosting Account Domains"
        ],
        "summary": "Delete a domain",
        "operationId": "c099d342d7d71713ec3e98a836643e41",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "422": {
            "description": "Failed to delete"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/email-accounts": {
      "get": {
        "tags": [
          "Admin - Hosting Account Email Accounts"
        ],
        "summary": "List all email accounts for a domain.",
        "operationId": "bd180f81d6995214d9a2806ecde32018",
        "parameters": [
          {
            "name": "domain_id",
            "in": "query",
            "description": "ID of the domain to filter by",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of email accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountEmailAccount"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin - Hosting Account Email Accounts"
        ],
        "summary": "Create a new email account",
        "operationId": "7a4c0837530e00ab2e7610391bbb1f9d",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingAccountEmailAccount"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountEmailAccount"
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/email-accounts/{id}": {
      "get": {
        "tags": [
          "Admin - Hosting Account Email Accounts"
        ],
        "summary": "Get a single email account by ID",
        "operationId": "086135154ae83b169d797ed6d55d6edf",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the email account",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email account details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountEmailAccount"
                }
              }
            }
          },
          "404": {
            "description": "Email account not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Admin - Hosting Account Email Accounts"
        ],
        "summary": "Update an existing email account",
        "operationId": "6a31d89d4f9691eb07824c9aa6b91363",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the email account",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingAccountEmailAccount"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email account updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountEmailAccount"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin - Hosting Account Email Accounts"
        ],
        "summary": "Delete an email account",
        "operationId": "c8cfcec59904b32573ed23868c554e0a",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the email account",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email account deleted successfully"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}/export": {
      "post": {
        "tags": [
          "Admin - Hosting Account Export"
        ],
        "summary": "Export hosting account backup (JSON)",
        "description": "Creates a full backup of the hosting account (plan, domains, databases, mail, DNS, etc.) as JSON and returns a temporary download URL for the JSON file.",
        "operationId": "7de62fa529d1f0e919b5137d4a1f1da0",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "exclude_sensitive": {
                    "description": "Exclude or mask sensitive data (e.g. passwords)",
                    "type": "boolean"
                  },
                  "export_reason": {
                    "description": "Reason for export (audit)",
                    "type": "string"
                  },
                  "export_method": {
                    "description": "Export method label (e.g. manual, api)",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Backup created; use download_url to fetch the JSON file",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Backup created successfully"
                    },
                    "download_url": {
                      "description": "Temporary URL to download the backup JSON (valid 5 minutes)",
                      "type": "string",
                      "format": "uri"
                    },
                    "expires_in": {
                      "description": "Seconds until download URL expires",
                      "type": "integer",
                      "example": 300
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Export failed"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/{id}/export/download": {
      "get": {
        "tags": [
          "Admin - Hosting Account Export"
        ],
        "summary": "Download hosting account backup (JSON)",
        "description": "Returns the backup as a JSON file. Requires a valid token from the export endpoint (valid 5 minutes).",
        "operationId": "e70c9109c022bab96238fa6b20faecfa",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Backup JSON file (application/json)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not found or invalid/expired token"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/export-list": {
      "get": {
        "tags": [
          "Admin - Hosting Account Export List"
        ],
        "summary": "List exported account backups",
        "description": "Returns backups found under the configured export path (e.g. /var/bolt/backups). Each entry has account name, backup date and json_path.",
        "operationId": "a8a50ff8750c2c65369f2774d4a135c2",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 1
                      },
                      "account": {
                        "type": "string",
                        "example": "username"
                      },
                      "backup_date": {
                        "type": "string",
                        "example": "2025-02-04"
                      },
                      "json_path": {
                        "type": "string",
                        "example": "/var/bolt/backups/username/backup_2025-02-04/output.json"
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/ftp-accounts": {
      "get": {
        "tags": [
          "Admin - Hosting Account FTP Accounts"
        ],
        "summary": "List all FTP accounts. Optionally filter by hosting_account_id.",
        "operationId": "a8e164647cacc312c8e7c1d8c4254076",
        "parameters": [
          {
            "name": "hosting_account_id",
            "in": "query",
            "description": "ID of the hosting account to filter by",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of FTP accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccountFtpAccount"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin - Hosting Account FTP Accounts"
        ],
        "summary": "Create a new FTP account",
        "operationId": "4bf8678fa670af32094df6fac6f4224c",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "hosting_account_id",
                  "ftp_username",
                  "ftp_password",
                  "ftp_path"
                ],
                "properties": {
                  "hosting_account_id": {
                    "type": "integer"
                  },
                  "ftp_username": {
                    "type": "string"
                  },
                  "ftp_password": {
                    "type": "string"
                  },
                  "ftp_path": {
                    "description": "Relative path under the account home only (e.g. test). Never pass a full /home/<username>/... path.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "FTP account created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountFtpAccount"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-account/ftp-accounts/{id}": {
      "get": {
        "tags": [
          "Admin - Hosting Account FTP Accounts"
        ],
        "summary": "Get a single FTP account by ID",
        "operationId": "774626b4b39132de126c5b5263d2f386",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the FTP account",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FTP account details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountFtpAccount"
                }
              }
            }
          },
          "404": {
            "description": "FTP account not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Admin - Hosting Account FTP Accounts"
        ],
        "summary": "Update an existing FTP account",
        "operationId": "2ef126a6bc9ec6c494e3be93ed7b83f9",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the FTP account",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ftp_password": {
                    "type": "string"
                  },
                  "ftp_path": {
                    "description": "Relative path under the account home only (e.g. test). Never pass a full /home/<username>/... path.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "FTP account updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccountFtpAccount"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin - Hosting Account FTP Accounts"
        ],
        "summary": "Delete an FTP account",
        "operationId": "15bbe54377fa21096819ffa2eddf8bf2",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the FTP account",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FTP account deleted successfully"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-accounts/import": {
      "post": {
        "tags": [
          "Admin - Hosting Account Import"
        ],
        "summary": "Import hosting account backup (JSON)",
        "description": "Send backup as JSON: either Content-Type: application/json with the backup object as body, or multipart with a .json file. Single-account backups create one account; multi-account backups import each in turn.",
        "operationId": "876051beb7e8c22b392322a7b44912a2",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "description": "Backup JSON object (when Content-Type is application/json)"
              }
            },
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "description": "Backup .json file only",
                    "type": "string",
                    "format": "binary"
                  },
                  "regenerate_passwords": {
                    "description": "Regenerate passwords for imported accounts",
                    "type": "boolean"
                  },
                  "validate_manifest": {
                    "description": "Validate backup checksum (default true)",
                    "type": "boolean"
                  },
                  "validate_hashes": {
                    "description": "Validate record integrity hashes (default true)",
                    "type": "boolean"
                  },
                  "check_compatibility": {
                    "description": "Check backup compatibility (default true)",
                    "type": "boolean"
                  },
                  "validate_password_security": {
                    "description": "Validate password security (default true)",
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Import completed (single or multiple accounts)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "description": "Single account result",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "example": "success"
                        },
                        "summary": {
                          "properties": {
                            "username": {
                              "type": "string"
                            },
                            "hosting_account_id": {
                              "type": "integer"
                            },
                            "domains": {
                              "type": "integer"
                            },
                            "databases": {
                              "type": "integer"
                            },
                            "email_accounts": {
                              "type": "integer"
                            },
                            "dns_records": {
                              "type": "integer"
                            },
                            "ftp_accounts": {
                              "type": "integer",
                              "nullable": true
                            },
                            "cron_jobs": {
                              "type": "integer",
                              "nullable": true
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    {
                      "description": "Multiple accounts result",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "success_count": {
                          "type": "integer"
                        },
                        "failed_count": {
                          "type": "integer"
                        },
                        "results": {
                          "type": "array",
                          "items": {
                            "properties": {
                              "status": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "summary": {
                                "type": "object",
                                "nullable": true
                              },
                              "error": {
                                "type": "object",
                                "nullable": true
                              }
                            },
                            "type": "object"
                          }
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation or import failed",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-plans": {
      "get": {
        "tags": [
          "Admin - Hosting Plans"
        ],
        "summary": "Get list of hosting plans",
        "operationId": "7dbd9e1c3f163a17d5cbd22e5ae8ebdc",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingPlan"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin - Hosting Plans"
        ],
        "summary": "Create a new hosting plan",
        "operationId": "3e024d057657a1f39eed5d44325b7788",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingPlan"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingPlan"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/hosting-plans/{id}": {
      "get": {
        "tags": [
          "Admin - Hosting Plans"
        ],
        "summary": "Get a hosting plan by ID",
        "operationId": "011ec5a254d5b6755d7c692e861e7b0b",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingPlan"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Admin - Hosting Plans"
        ],
        "summary": "Update a hosting plan",
        "operationId": "b2f51db751e3d0e8cf6ff68cf9aa735d",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingPlan"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingPlan"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin - Hosting Plans"
        ],
        "summary": "Delete a hosting plan",
        "operationId": "c196d4e851a5e3f61a5a33872c5835aa",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/health": {
      "get": {
        "tags": [
          "Reseller - Health"
        ],
        "summary": "Check API health status",
        "description": "Returns the health status of the API",
        "operationId": "50fffd521ccaa720fcf9f7af2fca1ac5",
        "responses": {
          "200": {
            "description": "API is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/hosting-accounts": {
      "get": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "List all hosting accounts",
        "description": "Display a listing of the resource.",
        "operationId": "bad9987bd80ce6dd748c220c61b875e6",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingAccount"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "Create a new hosting account",
        "description": "Store a newly created resource in storage.",
        "operationId": "66202a14e830758f3e3c7808231910f7",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingAccount"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccount"
                }
              }
            }
          },
          "404": {
            "description": "Hosting plan not found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/hosting-accounts/{id}": {
      "get": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "Get a hosting account by ID",
        "description": "Display the specified resource.",
        "operationId": "473fa3ee7d6e3b83015b329bcc49790e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccount"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "Update a hosting account",
        "description": "Update the specified resource in storage.",
        "operationId": "4ec6f27c20cfc5edcf11bac8be241146",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "hosting_plan_id": {
                    "description": "ID of the hosting plan",
                    "type": "integer"
                  },
                  "ssh_access": {
                    "description": "SSH access enabled",
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Account holder name",
                    "type": "string"
                  },
                  "phone": {
                    "description": "Phone number",
                    "type": "string"
                  },
                  "address": {
                    "description": "Street address",
                    "type": "string"
                  },
                  "city": {
                    "description": "City",
                    "type": "string"
                  },
                  "state": {
                    "description": "State/Province",
                    "type": "string"
                  },
                  "zip": {
                    "description": "Postal/ZIP code",
                    "type": "string"
                  },
                  "country": {
                    "description": "Country",
                    "type": "string"
                  },
                  "company": {
                    "description": "Company name",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingAccount"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "Delete a hosting account",
        "description": "Remove the specified resource from storage.",
        "operationId": "b438575c011ef523dce4831e1a463636",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed to delete"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/hosting-accounts/{id}/suspend": {
      "post": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "Suspend a hosting account",
        "description": "Suspend a hosting account.",
        "operationId": "5be7088e12db3418a9903d56af93410a",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Suspended"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed to suspend"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/hosting-accounts/{id}/unsuspend": {
      "post": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "Unsuspend a hosting account",
        "description": "Unsuspend a hosting account.",
        "operationId": "ad8dfae5541ce0eae53806614fc280ff",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unsuspended"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed to unsuspend"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/hosting-accounts/{id}/change-password": {
      "post": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "Change password for a hosting account",
        "description": "Change password for a hosting account.",
        "operationId": "d197e124c8053967973b0077ab6192c4",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "description": "New password for the hosting account",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Password changed successfully"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Failed to change password"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/hosting-accounts/{id}/generate-sso-token": {
      "post": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "Generate an SSO token for a hosting account",
        "description": "Generate an SSO token for a hosting account.",
        "operationId": "bf84c720d8198cfe5b94e36c5f7214bb",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Token generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "redirect_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "sso_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "token": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Hosting account not found"
          },
          "422": {
            "description": "Failed to generate token"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/hosting-accounts/{id}/usage-details": {
      "get": {
        "tags": [
          "Reseller - Hosting Accounts"
        ],
        "summary": "Get usage details and statistics for a hosting account",
        "description": "Get usage details for a hosting account.",
        "operationId": "4131415912c90394fdbb5889793cbd44",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Hosting statistic returned success."
                    },
                    "usageDetails": {
                      "properties": {
                        "diskUsage": {
                          "description": "Current disk usage in MB",
                          "type": "number"
                        },
                        "totalDiskUsage": {
                          "description": "Total disk space allocated in MB",
                          "type": "number"
                        },
                        "diskUsageWarning": {
                          "description": "Whether disk usage is at warning level",
                          "type": "boolean"
                        },
                        "databaseDiskUsage": {
                          "description": "Database disk usage in MB",
                          "type": "number"
                        },
                        "totalDatabaseDiskUsage": {
                          "description": "Total database disk space in MB",
                          "type": "number"
                        },
                        "bandwidth": {
                          "description": "Current bandwidth usage",
                          "type": "number"
                        },
                        "totalBandwidth": {
                          "description": "Total bandwidth allocated",
                          "type": "number"
                        },
                        "addonDomains": {
                          "description": "Current number of addon domains",
                          "type": "integer"
                        },
                        "totalAddonDomains": {
                          "description": "Maximum addon domains allowed",
                          "type": "integer"
                        },
                        "subdomains": {
                          "description": "Current number of subdomains",
                          "type": "integer"
                        },
                        "totalSubdomains": {
                          "description": "Maximum subdomains allowed",
                          "type": "integer"
                        },
                        "aliasDomains": {
                          "description": "Current number of alias/parked domains",
                          "type": "integer"
                        },
                        "totalAliasDomains": {
                          "description": "Maximum alias/parked domains allowed",
                          "type": "integer"
                        },
                        "ftpAccounts": {
                          "description": "Current number of FTP accounts",
                          "type": "integer"
                        },
                        "totalFtpAccounts": {
                          "description": "Maximum FTP accounts allowed",
                          "type": "integer"
                        },
                        "databases": {
                          "description": "Current number of databases",
                          "type": "integer"
                        },
                        "totalDatabases": {
                          "description": "Maximum databases allowed",
                          "type": "integer"
                        },
                        "emailAccounts": {
                          "description": "Current number of email accounts",
                          "type": "integer"
                        },
                        "totalEmailAccounts": {
                          "description": "Maximum email accounts allowed",
                          "type": "integer"
                        },
                        "emailAutoresponders": {
                          "description": "Current number of email autoresponders",
                          "type": "integer"
                        },
                        "totalEmailAutoresponders": {
                          "description": "Maximum email autoresponders allowed",
                          "type": "integer"
                        },
                        "emailForwarders": {
                          "description": "Current number of email forwarders",
                          "type": "integer"
                        },
                        "totalEmailForwarders": {
                          "description": "Maximum email forwarders allowed",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/hosting-plans": {
      "get": {
        "tags": [
          "Reseller - Hosting Plans"
        ],
        "summary": "Get list of hosting plans",
        "operationId": "198a0969236570a95631da08ce7f1de5",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HostingPlan"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Reseller - Hosting Plans"
        ],
        "summary": "Create a new hosting plan",
        "operationId": "1f7b3c23229b60182e7e9a45531f4b07",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingPlan"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingPlan"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/reseller/hosting-plans/{id}": {
      "get": {
        "tags": [
          "Reseller - Hosting Plans"
        ],
        "summary": "Get a hosting plan by ID",
        "operationId": "81303621760885d43f1fc839972bb9ea",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingPlan"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Reseller - Hosting Plans"
        ],
        "summary": "Update a hosting plan",
        "operationId": "42bbd1d97e05710560c09e390e7d09c9",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostingPlan"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostingPlan"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Reseller - Hosting Plans"
        ],
        "summary": "Delete a hosting plan",
        "operationId": "21f3215c4f045a6e7ad5e9a3c8d89a0c",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "404": {
            "description": "Not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/resellers": {
      "get": {
        "tags": [
          "Admin - Resellers"
        ],
        "summary": "Get list of resellers",
        "operationId": "4dc6c863b6de97387bd9659b7479299b",
        "responses": {
          "200": {
            "description": "Successful operation"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin - Resellers"
        ],
        "summary": "Create a new reseller",
        "operationId": "2fda03f8d78a5bfc8a7166dd6d496de6",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Reseller"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Reseller created"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/resellers/{id}": {
      "get": {
        "tags": [
          "Admin - Resellers"
        ],
        "summary": "Get reseller by ID",
        "operationId": "d61f0bca23ee214f43f35fb891ccc93d",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "404": {
            "description": "Reseller not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Admin - Resellers"
        ],
        "summary": "Update a reseller",
        "operationId": "5cfd987e96db88af3af2c13ca22dd50f",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Reseller"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reseller updated"
          },
          "404": {
            "description": "Reseller not found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Admin - Resellers"
        ],
        "summary": "Delete a reseller",
        "operationId": "0f1b1af99cc56fa22d78e73ff2ff8a2e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Reseller deleted"
          },
          "404": {
            "description": "Reseller not found"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/services": {
      "get": {
        "tags": [
          "Admin - Services"
        ],
        "summary": "Get services health status",
        "description": "Returns a list of all services with their health status, name, and installation status. Optionally filter by server ID.",
        "operationId": "97de511018def32ca0ccbc800756c538",
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "description": "Optional server ID to filter services. If not provided or 0, returns localhost services.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "name": {
                            "description": "Service name",
                            "type": "string",
                            "example": "BoltAgent"
                          },
                          "status": {
                            "description": "Service status (running, not running, etc.)",
                            "type": "string",
                            "example": "running"
                          },
                          "installed": {
                            "description": "Installation status (installed, not installed)",
                            "type": "string",
                            "example": "installed"
                          },
                          "category": {
                            "description": "Service category",
                            "type": "string",
                            "example": "Bolt"
                          }
                        },
                        "type": "object"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Invalid server_id parameter"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    },
    "/api/admin/statistics": {
      "get": {
        "tags": [
          "Admin - Statistics"
        ],
        "summary": "Get system statistics",
        "description": "Returns comprehensive statistics about the hosting system including accounts, domains, databases, resellers, and servers",
        "operationId": "efdc1df1f45da3d8d4084c9aec0f7c66",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "hosting_accounts": {
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 150
                        },
                        "active": {
                          "type": "integer",
                          "example": 145
                        },
                        "suspended": {
                          "type": "integer",
                          "example": 5
                        }
                      },
                      "type": "object"
                    },
                    "domains": {
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 320
                        },
                        "main_domains": {
                          "type": "integer",
                          "example": 150
                        },
                        "addon_domains": {
                          "type": "integer",
                          "example": 120
                        },
                        "subdomains": {
                          "type": "integer",
                          "example": 50
                        }
                      },
                      "type": "object"
                    },
                    "databases": {
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 280
                        }
                      },
                      "type": "object"
                    },
                    "resellers": {
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 12
                        },
                        "active": {
                          "type": "integer",
                          "example": 10
                        }
                      },
                      "type": "object"
                    },
                    "servers": {
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 5
                        },
                        "active": {
                          "type": "integer",
                          "example": 4
                        },
                        "connected": {
                          "type": "integer",
                          "example": 3
                        }
                      },
                      "type": "object"
                    },
                    "recent_accounts": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "username": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "type": "object"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unable to retrieve statistics"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DNSRecord": {
        "title": "DNSRecord",
        "description": "DNS record attached to a domain or hostname",
        "properties": {
          "id": {
            "type": "integer"
          },
          "dnsable_id": {
            "description": "ID of the owning record (domain or hostname)",
            "type": "integer"
          },
          "dnsable_type": {
            "type": "string",
            "enum": [
              "domain",
              "hostname"
            ]
          },
          "name": {
            "description": "Record name (use '@' for the zone apex)",
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "A",
              "AAAA",
              "CNAME",
              "MX",
              "TXT",
              "PTR",
              "SRV",
              "NS",
              "SOA"
            ]
          },
          "content": {
            "description": "Record content (IP, hostname, TXT value, etc.)",
            "type": "string"
          },
          "ttl": {
            "type": "integer",
            "maximum": 86400,
            "minimum": 60
          },
          "priority": {
            "description": "Required for MX and SRV",
            "type": "integer",
            "nullable": true
          },
          "weight": {
            "description": "Required for SRV",
            "type": "integer",
            "nullable": true
          },
          "port": {
            "description": "Required for SRV",
            "type": "integer",
            "nullable": true
          },
          "is_manual": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "HostingAccountDatabase": {
        "title": "HostingAccountDatabase",
        "description": "Database model for HostingAccount",
        "properties": {
          "id": {
            "description": "ID of the database",
            "type": "integer"
          },
          "hosting_account_id": {
            "description": "ID of the related hosting account",
            "type": "integer"
          },
          "database_name": {
            "description": "Name of the database",
            "type": "string"
          },
          "database_name_prefix": {
            "description": "Prefix for the database name",
            "type": "string"
          },
          "description": {
            "description": "Description of the database (nullable)",
            "type": "string",
            "nullable": true
          }
        },
        "type": "object"
      },
      "HostingAccountDatabaseUser": {
        "title": "HostingAccountDatabaseUser",
        "description": "Database user model for HostingAccount",
        "properties": {
          "id": {
            "description": "ID of the database user",
            "type": "integer"
          },
          "hosting_account_id": {
            "description": "ID of the related hosting account",
            "type": "integer"
          },
          "username": {
            "description": "Database username",
            "type": "string"
          },
          "username_prefix": {
            "description": "Prefix for the database username",
            "type": "string"
          }
        },
        "type": "object"
      },
      "HostingAccount": {
        "required": [
          "domain",
          "hosting_plan_id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "example": 1
          },
          "domain": {
            "type": "string",
            "example": "example.com"
          },
          "hosting_plan_id": {
            "type": "integer",
            "example": 1
          },
          "reseller_id": {
            "type": "integer",
            "example": 1
          },
          "username": {
            "type": "string",
            "example": "user123"
          },
          "ssh_access": {
            "type": "boolean",
            "example": true
          },
          "password": {
            "description": "Write-only. Never returned in responses.",
            "type": "string",
            "writeOnly": true,
            "example": "VerrySecurePasswordX1!2#3z4"
          },
          "description": {
            "type": "string",
            "example": "Main account"
          },
          "setup_date": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T00:00:00Z"
          },
          "expiry_date": {
            "type": "string",
            "format": "date-time",
            "example": "2025-01-01T00:00:00Z"
          },
          "renewal_date": {
            "type": "string",
            "format": "date-time",
            "example": "2024-12-01T00:00:00Z"
          },
          "is_auto_ssl_enabled": {
            "type": "boolean",
            "example": true
          },
          "is_suspended": {
            "type": "boolean",
            "example": false
          },
          "name": {
            "type": "string",
            "example": "John Doe"
          },
          "phone": {
            "type": "string",
            "example": "+123456789"
          },
          "address": {
            "type": "string",
            "example": "123 Main St"
          },
          "city": {
            "type": "string",
            "example": "New York"
          },
          "state": {
            "type": "string",
            "example": "NY"
          },
          "zip": {
            "type": "string",
            "example": "10001"
          },
          "country": {
            "type": "string",
            "example": "US"
          },
          "company": {
            "type": "string",
            "example": "Acme Inc."
          }
        },
        "type": "object"
      },
      "HostingAccountDomain": {
        "title": "HostingAccountDomain",
        "description": "Domain model for HostingAccount",
        "properties": {
          "id": {
            "description": "ID of the domain record",
            "type": "integer",
            "deprecated": true
          },
          "domain": {
            "description": "Domain name",
            "type": "string",
            "deprecated": true
          },
          "domain_root": {
            "description": "Domain root directory",
            "type": "string",
            "deprecated": true
          },
          "document_root": {
            "description": "Document root directory",
            "type": "string",
            "deprecated": true
          },
          "inherit_document_root": {
            "description": "Whether to inherit document root",
            "type": "boolean",
            "deprecated": true
          },
          "subdomain": {
            "description": "Subdomain name",
            "type": "string",
            "deprecated": true
          },
          "domain_type": {
            "description": "Type of domain (main, subdomain, addon, parked)",
            "type": "string",
            "deprecated": true
          },
          "ip": {
            "description": "IP address associated with the domain",
            "type": "string",
            "deprecated": true
          },
          "hosting_account_id": {
            "description": "ID of the related hosting account",
            "type": "integer",
            "deprecated": true
          },
          "php_version": {
            "description": "@deprecated Legacy PHP version short string. Use php_version_id (and the phpVersion relation) instead.",
            "type": "string",
            "deprecated": true
          },
          "is_php_fpm_enabled": {
            "description": "Is PHP-FPM enabled",
            "type": "boolean",
            "deprecated": true
          },
          "php_fpm_pm": {
            "description": "PHP-FPM process manager type",
            "type": "string",
            "deprecated": true
          },
          "php_fpm_pm_max_children": {
            "description": "Maximum number of child processes",
            "type": "integer",
            "deprecated": true
          },
          "php_fpm_pm_start_servers": {
            "description": "Number of child processes created on startup",
            "type": "integer",
            "deprecated": true
          },
          "php_fpm_pm_min_spare_servers": {
            "description": "Minimum number of idle processes",
            "type": "integer",
            "deprecated": true
          },
          "php_fpm_pm_max_spare_servers": {
            "description": "Maximum number of idle processes",
            "type": "integer",
            "deprecated": true
          },
          "php_fpm_pm_max_requests": {
            "description": "Number of requests each child process handles",
            "type": "integer",
            "deprecated": true
          },
          "php_fpm_pm_status_path": {
            "description": "Path for status page",
            "type": "string",
            "deprecated": true
          },
          "php_fpm_ping_path": {
            "description": "Path for ping page",
            "type": "string",
            "deprecated": true
          },
          "php_fpm_ping_response": {
            "description": "Response for ping requests",
            "type": "string",
            "deprecated": true
          },
          "php_fpm_access_log": {
            "description": "Access log file path",
            "type": "string",
            "deprecated": true
          },
          "php_fpm_access_format": {
            "description": "Access log format string",
            "type": "string",
            "deprecated": true
          },
          "php_fpm_slowlog": {
            "description": "Slow log file path",
            "type": "string",
            "deprecated": true
          },
          "php_fpm_request_slowlog_timeout": {
            "description": "Slow log timeout in seconds",
            "type": "integer",
            "deprecated": true
          },
          "php_fpm_request_terminate_timeout": {
            "description": "Request termination timeout in seconds",
            "type": "integer",
            "deprecated": true
          },
          "php_fpm_rlimit_files": {
            "description": "File descriptor limit",
            "type": "integer",
            "deprecated": true
          },
          "php_fpm_rlimit_core": {
            "description": "Core file size limit",
            "type": "integer",
            "deprecated": true
          },
          "php_fpm_chroot": {
            "description": "Chroot directory path",
            "type": "string",
            "deprecated": true
          },
          "php_fpm_chdir": {
            "description": "Change directory path",
            "type": "string",
            "deprecated": true
          },
          "php_fpm_env": {
            "description": "Environment variables for PHP-FPM processes",
            "type": "object",
            "deprecated": true
          },
          "php_fpm_catch_workers_output": {
            "description": "Whether to catch worker output",
            "type": "boolean",
            "deprecated": true
          },
          "status": {
            "description": "Status of the domain (active, suspended, etc.)",
            "type": "string",
            "deprecated": true
          },
          "domain_type_friendly_name": {
            "description": "Human-friendly domain type name",
            "type": "string",
            "readOnly": true,
            "deprecated": true
          },
          "redirect_to_text": {
            "description": "Redirect status as text",
            "type": "string",
            "readOnly": true,
            "deprecated": true
          }
        },
        "type": "object"
      },
      "HostingAccountEmailAccount": {
        "title": "HostingAccountEmailAccount",
        "description": "Email Account model for HostingAccount",
        "properties": {
          "id": {
            "description": "ID of the email account",
            "type": "integer"
          },
          "hosting_account_id": {
            "description": "ID of the related hosting account",
            "type": "integer"
          },
          "domain_id": {
            "description": "ID of the related domain",
            "type": "integer"
          },
          "username": {
            "description": "Email username (local part)",
            "type": "string"
          },
          "name": {
            "description": "Display name for the email account",
            "type": "string"
          },
          "receive_incoming_email": {
            "description": "Whether the account can receive incoming email",
            "type": "boolean"
          },
          "sending_outgoing_email": {
            "description": "Whether the account can send outgoing email",
            "type": "boolean"
          },
          "logging_in": {
            "description": "Whether login is enabled for this account",
            "type": "boolean"
          },
          "storage_space_settings": {
            "description": "Storage space settings (raw value)",
            "type": "string"
          },
          "quota": {
            "description": "Quota for the email account (in MB or bytes)",
            "type": "string"
          },
          "automatically_create_folders": {
            "description": "Whether to automatically create folders for the account",
            "type": "boolean"
          },
          "send_welcome_email": {
            "description": "Whether to send a welcome email on creation",
            "type": "boolean"
          },
          "status": {
            "description": "Status of the email account (active, suspended, etc.)",
            "type": "string"
          },
          "full_email": {
            "description": "Full email address (username@domain)",
            "type": "string",
            "readOnly": true
          }
        },
        "type": "object"
      },
      "HostingAccountFtpAccount": {
        "title": "HostingAccountFtpAccount",
        "description": "FTP Account model for HostingAccount",
        "properties": {
          "id": {
            "description": "ID of the FTP account",
            "type": "integer"
          },
          "hosting_account_id": {
            "description": "ID of the related hosting account",
            "type": "integer"
          },
          "domain_id": {
            "description": "ID of the related domain (nullable)",
            "type": "integer",
            "nullable": true
          },
          "ftp_username": {
            "description": "FTP username",
            "type": "string"
          },
          "ftp_username_prefix": {
            "description": "FTP username prefix (nullable)",
            "type": "string",
            "nullable": true
          },
          "ftp_path": {
            "description": "Subdirectory under the hosting account home only (e.g. public_html or test). Do not send /home/<username>/... or home/<username>/...; the system adds the account home root.",
            "type": "string",
            "nullable": true
          },
          "ftp_quota": {
            "description": "FTP quota in MB (nullable)",
            "type": "integer",
            "nullable": true
          },
          "ftp_quota_type": {
            "description": "FTP quota type (nullable)",
            "type": "string",
            "nullable": true
          },
          "ftp_username_with_prefix": {
            "description": "FTP username with prefix",
            "type": "string",
            "readOnly": true
          },
          "ftp_host_text": {
            "description": "FTP host address",
            "type": "string",
            "readOnly": true
          },
          "ftp_port_text": {
            "description": "FTP port number",
            "type": "string",
            "readOnly": true
          },
          "ftp_path_text": {
            "description": "FTP path",
            "type": "string",
            "readOnly": true
          },
          "ftp_quota_text": {
            "description": "FTP quota as text",
            "type": "string",
            "readOnly": true
          }
        },
        "type": "object"
      },
      "HostingAccountIpBlocker": {
        "title": "HostingAccountIpBlocker",
        "description": "IP blocker rule attached to a hosting account domain",
        "properties": {
          "id": {
            "description": "ID of the IP blocker record",
            "type": "integer"
          },
          "hosting_account_id": {
            "description": "ID of the related hosting account",
            "type": "integer"
          },
          "domain_id": {
            "description": "ID of the domain the rule applies to",
            "type": "integer"
          },
          "blocked_ip": {
            "description": "Blocked value: IPv4, range, CIDR or FQDN",
            "type": "string"
          },
          "beginning_ip": {
            "description": "First IP in the block range (IPv4)",
            "type": "string"
          },
          "ending_ip": {
            "description": "Last IP in the block range (IPv4)",
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "HostingAccountSslCertificate": {
        "title": "HostingAccountSslCertificate",
        "description": "SSL certificate record attached to a domain",
        "properties": {
          "id": {
            "type": "integer"
          },
          "hosting_account_id": {
            "type": "integer"
          },
          "domain_id": {
            "type": "integer"
          },
          "type": {
            "description": "Provider name (e.g. LetsEncrypt, ZeroSSL) or null for uploaded/self-signed",
            "type": "string",
            "nullable": true
          },
          "path": {
            "type": "string",
            "nullable": true
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "auto_renew": {
            "type": "boolean"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "HostingPlan": {
        "required": [
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "example": 1
          },
          "reseller_id": {
            "type": "integer",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "Basic Plan"
          },
          "description": {
            "type": "string",
            "example": "A basic hosting plan"
          },
          "disk_space": {
            "description": "Disk space in MB",
            "type": "integer",
            "example": 10240
          },
          "bandwidth": {
            "description": "Bandwidth in MB",
            "type": "integer",
            "example": 51200
          },
          "databases": {
            "type": "integer",
            "example": 5
          },
          "ftp_accounts": {
            "type": "integer",
            "example": 10
          },
          "email_accounts": {
            "type": "integer",
            "example": 10
          },
          "email_account_quota": {
            "description": "Quota per email account in MB",
            "type": "integer",
            "example": 1024
          },
          "email_hostname": {
            "type": "string",
            "example": "mail.example.com"
          },
          "email_forwarders": {
            "type": "integer",
            "example": 5
          },
          "email_boxes": {
            "type": "integer",
            "example": 10
          },
          "email_box_default_quota": {
            "type": "integer",
            "example": 512
          },
          "email_box_max_quota": {
            "type": "integer",
            "example": 2048
          },
          "email_autoresponders": {
            "type": "integer",
            "example": 2
          },
          "email_filters": {
            "type": "integer",
            "example": 3
          },
          "mailing_lists": {
            "type": "integer",
            "example": 1
          },
          "subdomains": {
            "type": "integer",
            "example": 3
          },
          "parked_domains": {
            "type": "integer",
            "example": 1
          },
          "addon_domains": {
            "type": "integer",
            "example": 2
          },
          "ssl_certificates": {
            "type": "integer",
            "example": 1
          },
          "daily_backups": {
            "type": "boolean",
            "example": true
          },
          "free_domain": {
            "type": "boolean",
            "example": false
          },
          "additional_services": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "php_version_id": {
            "type": "integer",
            "example": 1
          },
          "is_php_fpm_enabled": {
            "type": "boolean",
            "example": true
          },
          "is_system_plan": {
            "type": "boolean",
            "example": false
          }
        },
        "type": "object"
      },
      "Reseller": {
        "title": "Reseller",
        "required": [
          "name",
          "username",
          "password",
          "email"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "John Doe"
          },
          "username": {
            "type": "string",
            "example": "johndoe"
          },
          "password": {
            "description": "Write-only. Never returned in responses.",
            "type": "string",
            "format": "password",
            "writeOnly": true,
            "example": "secret"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "john@example.com"
          },
          "phone": {
            "type": "string",
            "example": "+1234567890"
          },
          "address": {
            "type": "string",
            "example": "123 Main St"
          },
          "city": {
            "type": "string",
            "example": "New York"
          },
          "state": {
            "type": "string",
            "example": "NY"
          },
          "zip": {
            "type": "string",
            "example": "10001"
          },
          "country": {
            "type": "string",
            "example": "USA"
          },
          "company": {
            "type": "string",
            "example": "Acme Corp"
          },
          "email_verified_at": {
            "type": "string",
            "format": "date-time",
            "example": "2023-01-01T00:00:00Z",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "example": "2023-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "example": "2023-01-02T00:00:00Z"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "description": "API Key required in the header. Must be used together with a valid API Secret as a pair.",
        "name": "X-API-Key",
        "in": "header"
      },
      "ApiSecretAuth": {
        "type": "apiKey",
        "description": "API Secret required in the header. Must be used together with a valid API Key as a pair.",
        "name": "X-API-Secret",
        "in": "header"
      },
      "HostingAccountHeader": {
        "type": "apiKey",
        "description": "Only for admin and reseller API keys calling Client endpoints: names the hosting account (numeric id or username) the request acts on. Required for these keys on every /api/client/* route - they never act on an account implicitly. Reseller keys can only name accounts they own. Hosting-account-scoped keys ignore this header; they always act on their own account.",
        "name": "X-Hosting-Account",
        "in": "header"
      }
    }
  },
  "tags": [
    {
      "name": "Admin - General",
      "description": "Admin: SSO token generation and global utilities"
    },
    {
      "name": "Admin - Health",
      "description": "Admin: API health check"
    },
    {
      "name": "Admin - Statistics",
      "description": "Admin: global statistics"
    },
    {
      "name": "Admin - Metrics",
      "description": "Admin: Bolt system metrics"
    },
    {
      "name": "Admin - Services",
      "description": "Admin: server services info"
    },
    {
      "name": "Admin - Resellers",
      "description": "Admin: reseller management"
    },
    {
      "name": "Admin - Hosting Plans",
      "description": "Admin: hosting plan management"
    },
    {
      "name": "Admin - Hosting Accounts",
      "description": "Admin: hosting account management"
    },
    {
      "name": "Admin - Hosting Account Domains",
      "description": "Admin: hosting account domains"
    },
    {
      "name": "Admin - Hosting Account Databases",
      "description": "Admin: hosting account databases"
    },
    {
      "name": "Admin - Hosting Account Database Users",
      "description": "Admin: hosting account database users"
    },
    {
      "name": "Admin - Hosting Account Email Accounts",
      "description": "Admin: hosting account email accounts"
    },
    {
      "name": "Admin - Hosting Account FTP Accounts",
      "description": "Admin: hosting account FTP accounts"
    },
    {
      "name": "Admin - Hosting Account Export",
      "description": "Admin: hosting account export operations"
    },
    {
      "name": "Admin - Hosting Account Export List",
      "description": "Admin: hosting account export listings"
    },
    {
      "name": "Admin - Hosting Account Import",
      "description": "Admin: hosting account imports"
    },
    {
      "name": "Reseller - Health",
      "description": "Reseller: API health check"
    },
    {
      "name": "Reseller - Hosting Plans",
      "description": "Reseller: hosting plan management"
    },
    {
      "name": "Reseller - Hosting Accounts",
      "description": "Reseller: hosting account management"
    },
    {
      "name": "Client - Account",
      "description": "Client: own account profile & settings"
    },
    {
      "name": "Client - Domains",
      "description": "Client: own domains"
    },
    {
      "name": "Client - Databases",
      "description": "Client: own databases"
    },
    {
      "name": "Client - Database Users",
      "description": "Client: own database users"
    },
    {
      "name": "Client - Email Accounts",
      "description": "Client: own email accounts"
    },
    {
      "name": "Client - FTP Accounts",
      "description": "Client: own FTP accounts"
    },
    {
      "name": "Client - WordPress",
      "description": "Client: WordPress installations, core, plugins, themes & posts"
    },
    {
      "name": "Client - IP Blockers",
      "description": "Client: htaccess-based IP block rules"
    },
    {
      "name": "Client - DNS Records",
      "description": "Client: DNS zone records for own domains"
    },
    {
      "name": "Client - Logs",
      "description": "Client: HTTP error / access logs served by BoltAgent"
    },
    {
      "name": "Client - SSL Certificates",
      "description": "Client - SSL Certificates"
    }
  ]
}