# Auto-generated from internal/core/apidocs/api_endpoints.json by generate_openapi.py.
# To update: regenerate rather than hand-editing this file directly.
openapi: 3.0.3
info:
  title: OpenPanel API
  version: 2.0.2
  description: |-
    REST API for OpenPanel, a self-hosted web hosting control panel. Every feature available in the panel's web UI can also be accessed programmatically.

    All endpoints require a Bearer token obtained from `POST /api/login`. Beyond authentication, each endpoint also requires its documented feature to be enabled on the account's hosting plan.

    Success responses are JSON objects (`200`) unless noted otherwise (a handful of endpoints stream a file download instead). Error responses always include an `error` field and use standard HTTP status codes (400, 401, 403, 404, 409, 500, 503, 504).
  contact:
    name: OpenPanel
    url: https://openpanel.com
  license:
    name: OpenPanel EULA
    url: https://openpanel.com/LICENSE
servers:
- url: https://panel.example.com
  description: Your OpenPanel installation (default port 2083)
tags:
- name: Authentication
  description: Requires the `api` feature to be enabled on the account's plan.
- name: MySQL
  description: Requires the `mysql` feature to be enabled on the account's plan.
- name: MySQL Root Password
  description: Requires the `mysql_root_password` feature to be enabled on the account's plan.
- name: phpMyAdmin
  description: Requires the `phpmyadmin` feature to be enabled on the account's plan.
- name: PostgreSQL
  description: Requires the `postgresql` feature to be enabled on the account's plan.
- name: Domains
  description: Requires the `domains` feature to be enabled on the account's plan.
- name: Email
  description: Requires the `emails` feature to be enabled on the account's plan.
- name: Email Migration
  description: Requires the `email_migrate` feature to be enabled on the account's plan.
- name: FTP
  description: Requires the `ftp` feature to be enabled on the account's plan.
- name: Cron Jobs
  description: Requires the `crons` feature to be enabled on the account's plan.
- name: Cache Services
  description: Requires the `redis` feature to be enabled on the account's plan.
- name: Docker / Containers
  description: Requires the `docker` feature to be enabled on the account's plan.
- name: Switch MySQL Type
  description: Requires the `change_db` feature to be enabled on the account's plan.
- name: Switch WebServer
  description: Requires the `change_ws` feature to be enabled on the account's plan.
- name: Change Container Image Tag
  description: Requires the `change_image` feature to be enabled on the account's plan.
- name: WAF
  description: Requires the `waf` feature to be enabled on the account's plan.
- name: AI & Bot Control
  description: Requires the `bot_control` feature to be enabled on the account's plan.
- name: IP Blocker
  description: Requires the `ip_blocker` feature to be enabled on the account's plan.
- name: PHP
  description: Requires the `php_ini` feature to be enabled on the account's plan.
- name: PHP App Manager
  description: Requires the `php` feature to be enabled on the account's plan.
- name: Account
  description: Requires the `account` feature to be enabled on the account's plan.
- name: Passkeys
  description: Requires the `passkeys` feature to be enabled on the account's plan.
- name: Two-Factor Authentication
  description: Requires the `twofa` feature to be enabled on the account's plan.
- name: MCP Tokens
  description: Requires the `mcp` feature to be enabled on the account's plan.
- name: Favorites
  description: Requires the `favorites` feature to be enabled on the account's plan.
- name: Language
  description: Requires the `locale` feature to be enabled on the account's plan.
- name: Login History
  description: Requires the `login_history` feature to be enabled on the account's plan.
- name: Notifications
  description: Requires the `notifications` feature to be enabled on the account's plan.
- name: Resource Usage
  description: Requires the `usage` feature to be enabled on the account's plan.
- name: Hosting Info
  description: Requires the `info` feature to be enabled on the account's plan.
- name: Disk & Inodes
  description: Requires the `disk_usage` feature to be enabled on the account's plan.
- name: Malware Scanner
  description: Requires the `malware_scan` feature to be enabled on the account's plan.
- name: Backup Wizard
  description: Requires the `backup_wizard` feature to be enabled on the account's plan.
- name: File Manager
  description: Requires the `filemanager` feature to be enabled on the account's plan.
- name: Trash
  description: Requires the `trash` feature to be enabled on the account's plan.
- name: Webserver Config
  description: Requires the `webserver_conf` feature to be enabled on the account's plan.
- name: Git
  description: Requires the `git` feature to be enabled on the account's plan.
- name: Process Manager
  description: Requires the `process_manager` feature to be enabled on the account's plan.
- name: Fix Permissions
  description: Requires the `fix_permissions` feature to be enabled on the account's plan.
- name: Sites & Websites
  description: Requires the `websites` feature to be enabled on the account's plan.
- name: Drupal
  description: Requires the `drupal` feature to be enabled on the account's plan.
- name: Joomla
  description: Requires the `joomla` feature to be enabled on the account's plan.
- name: OpenCart
  description: Requires the `opencart` feature to be enabled on the account's plan.
- name: Nextcloud
  description: Requires the `nextcloud` feature to be enabled on the account's plan.
- name: PrestaShop
  description: Requires the `prestashop` feature to be enabled on the account's plan.
- name: Flarum
  description: Requires the `flarum` feature to be enabled on the account's plan.
- name: Matomo
  description: Requires the `matomo` feature to be enabled on the account's plan.
- name: Moodle
  description: Requires the `moodle` feature to be enabled on the account's plan.
- name: MediaWiki
  description: Requires the `mediawiki` feature to be enabled on the account's plan.
- name: DokuWiki
  description: Requires the `dokuwiki` feature to be enabled on the account's plan.
- name: SofaWiki
  description: Requires the `sofawiki` feature to be enabled on the account's plan.
- name: phpBB
  description: Requires the `phpbb` feature to be enabled on the account's plan.
- name: TinyPhotoGallery
  description: Requires the `tinyphotogallery` feature to be enabled on the account's plan.
- name: TinyFileManager
  description: Requires the `tinyfilemanager` feature to be enabled on the account's plan.
- name: OJS
  description: Requires the `ojs` feature to be enabled on the account's plan.
- name: WordPress
  description: Requires the `wordpress` feature to be enabled on the account's plan.
- name: Node.js / Python Apps
  description: Requires the `nodejs or python` feature to be enabled on the account's plan.
- name: App Installer
  description: Requires the `nodejs or python or java or ruby` feature to be enabled on the account's
    plan.
- name: Helpers
  description: Requires the `helpers` feature to be enabled on the account's plan.
- name: API
  description: Requires the `api` feature to be enabled on the account's plan.
- name: Auto Installer
  description: Requires the `autoinstaller` feature to be enabled on the account's plan.
- name: Dynamic DNS
  description: Requires the `dynamic_dns` feature to be enabled on the account's plan.
- name: DNS Zone Editor
  description: Requires the `dns` feature to be enabled on the account's plan.
- name: Traffic Stats (GoAccess)
  description: Requires the `goaccess` feature to be enabled on the account's plan.
- name: Error Logs
  description: Requires the `error_logs` feature to be enabled on the account's plan.
- name: System Services
  description: Requires the `services` feature to be enabled on the account's plan.
- name: Webmail
  description: Requires the `webmail` feature to be enabled on the account's plan.
- name: Website Builder
  description: Requires the `website_builder` feature to be enabled on the account's plan.
- name: Dashboard
  description: Requires the `dashboard` feature to be enabled on the account's plan.
- name: Search
  description: Requires the `search` feature to be enabled on the account's plan.
- name: Activity Log
  description: Requires the `activity` feature to be enabled on the account's plan.
- name: Backups
  description: Requires the `backups` feature to be enabled on the account's plan.
paths:
  /api/login:
    post:
      summary: Obtain a JWT Bearer token.
      operationId: login
      tags:
      - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: user
                password:
                  type: string
                  example: pass
              example:
                username: user
                password: pass
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/databases:
    get:
      summary: List all databases (with assigned users).
      operationId: get_mysql_databases
      tags:
      - MySQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create a new database.
      operationId: post_mysql_databases
      tags:
      - MySQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: mydb
              example:
                name: mydb
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/databases/{db_name}:
    delete:
      summary: Drop database.
      operationId: mysql_databases_db_name
      tags:
      - MySQL
      parameters:
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/databases/{db_name}/tables:
    get:
      summary: List tables with row/size info for database.
      operationId: mysql_databases_db_name_tables
      tags:
      - MySQL
      parameters:
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/databases/{db_name}/optimize:
    post:
      summary: Run OPTIMIZE TABLE on every table in the database.
      operationId: mysql_databases_db_name_optimize
      tags:
      - MySQL
      parameters:
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/databases/{db_name}/repair:
    post:
      summary: Run REPAIR TABLE on every table in the database.
      operationId: mysql_databases_db_name_repair
      tags:
      - MySQL
      parameters:
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/databases/{db_name}/export:
    get:
      summary: Download a database dump (sql or gzip).
      operationId: mysql_databases_db_name_export
      tags:
      - MySQL
      parameters:
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      - name: format
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: File download.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/users:
    get:
      summary: List all database users.
      operationId: get_mysql_users
      tags:
      - MySQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create a database user.
      operationId: post_mysql_users
      tags:
      - MySQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                password:
                  type: string
                  example: p
                host:
                  type: string
                  example: '%'
              example:
                username: u
                password: p
                host: '%'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/users/{db_user}:
    delete:
      summary: Delete a database user.
      operationId: mysql_users_db_user
      tags:
      - MySQL
      parameters:
      - name: db_user
        in: path
        required: true
        schema:
          type: string
      - name: host
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/users/{db_user}/password:
    patch:
      summary: Change a database user's password.
      operationId: mysql_users_db_user_password
      tags:
      - MySQL
      parameters:
      - name: db_user
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  example: newpass
                host:
                  type: string
                  example: '%'
              example:
                password: newpass
                host: '%'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/users/{db_user}/privileges/{db_name}:
    get:
      summary: Get a user's privileges on a database.
      operationId: mysql_users_db_user_privileges_db_name
      tags:
      - MySQL
      parameters:
      - name: db_user
        in: path
        required: true
        schema:
          type: string
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      - name: host
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/grants:
    post:
      summary: Grant privileges to a user on a database.
      operationId: post_mysql_grants
      tags:
      - MySQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                database:
                  type: string
                  example: mydb
                privileges:
                  type: array
                  items:
                    type: string
                    example: ALL PRIVILEGES
                  example:
                  - ALL PRIVILEGES
                host:
                  type: string
                  example: '%'
              example:
                username: u
                database: mydb
                privileges:
                - ALL PRIVILEGES
                host: '%'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Revoke all privileges from a user on a database.
      operationId: delete_mysql_grants
      tags:
      - MySQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                database:
                  type: string
                  example: mydb
                host:
                  type: string
                  example: '%'
              example:
                username: u
                database: mydb
                host: '%'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/info:
    get:
      summary: Get databases, users, and assigned-databases summary.
      operationId: mysql_info
      tags:
      - MySQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/processlist:
    get:
      summary: Show full MySQL processlist.
      operationId: mysql_processlist
      tags:
      - MySQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/processlist/{id}/kill:
    post:
      summary: Kill a running MySQL query (KILL QUERY).
      description: Only entries whose command is Query can be killed. System threads are refused.
      operationId: mysql_kill_query
      tags:
      - MySQL
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Query killed.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Invalid process ID.
        '403':
          description: System threads can not be killed.
        '404':
          description: Process not found or no longer running a query.
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/remote-access:
    get:
      summary: Get remote access status, port, and per-user hosts.
      operationId: get_mysql_remote_access
      tags:
      - MySQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Enable/disable remote access.
      operationId: post_mysql_remote_access
      tags:
      - MySQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: enable
              example:
                action: enable
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/remote-access/entries:
    post:
      summary: Grant a user remote access from a host.
      operationId: post_mysql_remote_access_entries
      tags:
      - MySQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                host:
                  type: string
                  example: 1.2.3.4
                password:
                  type: string
                  example: p
              example:
                username: u
                host: 1.2.3.4
                password: p
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    patch:
      summary: Change the host a remote access entry is valid from.
      operationId: patch_mysql_remote_access_entries
      tags:
      - MySQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                old_host:
                  type: string
                  example: 1.2.3.4
                new_host:
                  type: string
                  example: 5.6.7.8
              example:
                username: u
                old_host: 1.2.3.4
                new_host: 5.6.7.8
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Remove a remote access entry.
      operationId: delete_mysql_remote_access_entries
      tags:
      - MySQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                host:
                  type: string
                  example: 1.2.3.4
              example:
                username: u
                host: 1.2.3.4
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/configuration:
    get:
      summary: Get MySQL server configuration.
      operationId: get_mysql_configuration
      tags:
      - MySQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Update MySQL server configuration (restarts the service).
      operationId: put_mysql_configuration
      tags:
      - MySQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                max_connections:
                  type: string
                  example: '200'
              example:
                max_connections: '200'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/configuration/recommendations:
    get:
      summary: Get tuning recommendations for the MySQL server configuration.
      description: Checks the live server (memory limit, data per storage engine, status counters, connections
        and error log) and returns suggested values for the configurable keys, with the reason for each
        and the facts they are based on.
      operationId: get_mysql_configuration_recommendations
      tags:
      - MySQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '503':
          description: The database service could not be reached.
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/databases/{db_name}/import:
    post:
      summary: Import a SQL dump into the database (multipart/form-data, field name 'file').
      operationId: mysql_databases_db_name_import
      tags:
      - MySQL
      parameters:
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
              - file
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/size:
    get:
      summary: Get per-database disk usage.
      operationId: mysql_size
      tags:
      - MySQL
      parameters:
      - name: unit
        in: query
        required: false
        schema:
          type: string
      - name: show_all
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mysql/root-password:
    put:
      summary: Set the MySQL root password.
      operationId: mysql_root_password
      tags:
      - MySQL Root Password
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  example: newRootPass123
              example:
                password: newRootPass123
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/phpmyadmin:
    get:
      summary: Get a phpMyAdmin autologin link, valid until a new one is generated.
      operationId: phpmyadmin
      tags:
      - phpMyAdmin
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/databases:
    get:
      summary: List all databases (with assigned users).
      operationId: get_postgresql_databases
      tags:
      - PostgreSQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create a new database.
      operationId: post_postgresql_databases
      tags:
      - PostgreSQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: mydb
              example:
                name: mydb
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/databases/{db_name}:
    delete:
      summary: Drop database.
      operationId: postgresql_databases_db_name
      tags:
      - PostgreSQL
      parameters:
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/databases/{db_name}/export:
    get:
      summary: Download a database dump (sql).
      operationId: postgresql_databases_db_name_export
      tags:
      - PostgreSQL
      parameters:
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: File download.
          content:
            application/sql:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/databases/{db_name}/import:
    post:
      summary: Import a SQL dump into the database (multipart/form-data, field name 'file').
      operationId: postgresql_databases_db_name_import
      tags:
      - PostgreSQL
      parameters:
      - name: db_name
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
              - file
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/users:
    get:
      summary: List all PostgreSQL users.
      operationId: get_postgresql_users
      tags:
      - PostgreSQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create PostgreSQL user.
      operationId: post_postgresql_users
      tags:
      - PostgreSQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                password:
                  type: string
                  example: p
              example:
                username: u
                password: p
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/users/{db_user}:
    delete:
      summary: Drop PostgreSQL user (revokes access from all databases first).
      operationId: postgresql_users_db_user
      tags:
      - PostgreSQL
      parameters:
      - name: db_user
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/users/{db_user}/password:
    patch:
      summary: Change a PostgreSQL user's password.
      operationId: postgresql_users_db_user_password
      tags:
      - PostgreSQL
      parameters:
      - name: db_user
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  example: newpass
              example:
                password: newpass
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/grants:
    post:
      summary: Grant all privileges on a database to a user.
      operationId: post_postgresql_grants
      tags:
      - PostgreSQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                database:
                  type: string
                  example: mydb
              example:
                username: u
                database: mydb
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Revoke all privileges from a user on a database.
      operationId: delete_postgresql_grants
      tags:
      - PostgreSQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                database:
                  type: string
                  example: mydb
              example:
                username: u
                database: mydb
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/info:
    get:
      summary: Get databases, users, and assigned-databases summary.
      operationId: postgresql_info
      tags:
      - PostgreSQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/processlist:
    get:
      summary: Show active connections (pg_stat_activity).
      operationId: postgresql_processlist
      tags:
      - PostgreSQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/processlist/{pid}/kill:
    post:
      summary: Cancel a running PostgreSQL query (pg_cancel_backend).
      description: Only active client backend queries can be cancelled. The connection stays open.
      operationId: postgresql_kill_query
      tags:
      - PostgreSQL
      parameters:
      - name: pid
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Query cancelled.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Invalid process ID.
        '403':
          description: Only user queries can be cancelled.
        '404':
          description: Process not found or no longer running a query.
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/remote-access:
    get:
      summary: Get remote access status and port.
      operationId: get_postgresql_remote_access
      tags:
      - PostgreSQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Enable/disable remote access.
      operationId: post_postgresql_remote_access
      tags:
      - PostgreSQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: enable
              example:
                action: enable
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/configuration:
    get:
      summary: Get PostgreSQL server configuration.
      operationId: get_postgresql_configuration
      tags:
      - PostgreSQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Update PostgreSQL server configuration (restarts the service).
      operationId: put_postgresql_configuration
      tags:
      - PostgreSQL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                max_connections:
                  type: string
                  example: '200'
              example:
                max_connections: '200'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/postgresql/configuration/recommendations:
    get:
      summary: Get tuning recommendations for the PostgreSQL server configuration.
      description: Checks the live server (memory and CPU limits, data size, statistics, connections and
        log) and returns suggested values for the configurable keys, with the reason for each and the
        facts they are based on.
      operationId: get_postgresql_configuration_recommendations
      tags:
      - PostgreSQL
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '503':
          description: The database service could not be reached.
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains:
    get:
      summary: List all domains.
      operationId: get_domains
      tags:
      - Domains
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Add a new domain (docroot defaults to /var/www/html/<domain>; .onion domains also require
        hs_ed25519_public_key and hs_ed25519_secret_key).
      operationId: post_domains
      tags:
      - Domains
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  example: example.com
              example:
                domain: example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}:
    delete:
      summary: Remove a domain.
      operationId: domains_domain
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/status:
    get:
      summary: Get SSL/suspend/redirect status for a domain.
      operationId: domains_domain_status
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/suspend:
    post:
      summary: Suspend a domain.
      operationId: domains_domain_suspend
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/unsuspend:
    post:
      summary: Unsuspend a domain.
      operationId: domains_domain_unsuspend
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/docroot:
    get:
      summary: Get the domain's document root.
      operationId: get_domains_domain_docroot
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Change the domain's document root (must be inside /var/www/html/).
      operationId: put_domains_domain_docroot
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                docroot:
                  type: string
                  example: /var/www/html/example.com
              example:
                docroot: /var/www/html/example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/redirect:
    get:
      summary: Get the domain's redirect URL, if any.
      operationId: get_domains_domain_redirect
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Set a redirect for the domain.
      operationId: put_domains_domain_redirect
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                redirect_url:
                  type: string
                  example: https://example.com
              example:
                redirect_url: https://example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Remove the domain's redirect.
      operationId: delete_domains_domain_redirect
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/ssl:
    get:
      summary: Get SSL status.
      operationId: get_domains_domain_ssl
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: 'Issue/renew SSL cert (action: autossl, generate, switch_and_generate, or custom; custom
        also requires public_path and private_path).'
      operationId: post_domains_domain_ssl
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: autossl
              example:
                action: autossl
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/vhost:
    get:
      summary: Get the domain's VHost config content.
      operationId: get_domains_domain_vhost
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Save the domain's VHost config content.
      operationId: put_domains_domain_vhost
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                vhost:
                  type: string
                  example: '...vhost content...'
              example:
                vhost: '...vhost content...'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/dns:
    get:
      summary: Get parsed DNS records + serial for the domain's zone.
      operationId: get_domains_domain_dns
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Save raw DNS zone content.
      operationId: put_domains_domain_dns
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                zone_content:
                  type: string
                  example: |-
                    $ORIGIN example.com.
                    ...
              example:
                zone_content: |-
                  $ORIGIN example.com.
                  ...
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/dns/records:
    post:
      summary: Add a DNS record.
      operationId: domains_domain_dns_records
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: www
                ttl:
                  type: string
                  example: '3600'
                type:
                  type: string
                  example: A
                value:
                  type: string
                  example: 1.2.3.4
              example:
                name: www
                ttl: '3600'
                type: A
                value: 1.2.3.4
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/dns/records/{row_id}:
    put:
      summary: Update a DNS record by line number.
      operationId: put_domains_domain_dns_records_row_id
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: row_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  example: www 3600 IN A 5.6.7.8
                end_row_id:
                  type: integer
                  example: 5
                serial:
                  type: string
                  example: '2025010101'
              example:
                content: www 3600 IN A 5.6.7.8
                end_row_id: 5
                serial: '2025010101'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Delete a DNS record by line number.
      operationId: delete_domains_domain_dns_records_row_id
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: row_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                end_row_id:
                  type: integer
                  example: 5
              example:
                end_row_id: 5
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/dns/restart:
    post:
      summary: Reset the domain's DNS zone to the default template.
      operationId: domains_domain_dns_restart
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/dns/export:
    get:
      summary: Export the domain's zone file.
      operationId: domains_domain_dns_export
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: File download.
          content:
            text/plain:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/logs:
    get:
      summary: Get access logs for the domain.
      operationId: domains_domain_logs
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: page
        in: query
        required: false
        schema:
          type: string
      - name: show_all
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/capitalize:
    get:
      summary: Get the domain's display-case override.
      operationId: get_domains_domain_capitalize
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Set the domain's display-case override.
      operationId: put_domains_domain_capitalize
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                capitalized_domain:
                  type: string
                  example: Example.com
              example:
                capitalized_domain: Example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/domains/{domain}/tlsa-hash:
    get:
      summary: Get the TLSA record hash for the domain's SSL certificate.
      operationId: domains_domain_tlsa_hash
      tags:
      - Domains
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails:
    get:
      summary: List all mailboxes.
      operationId: get_emails
      tags:
      - Email
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create mailbox (optional gb + format for a custom quota, send_welcome to drop a mail client
        setup guide into the new mailbox).
      operationId: post_emails
      tags:
      - Email
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  example: b.com
                username:
                  type: string
                  example: a
                password:
                  type: string
                  example: p
                send_welcome:
                  type: boolean
                  example: true
              example:
                domain: b.com
                username: a
                password: p
                send_welcome: true
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/{email}:
    get:
      summary: Get mailbox details.
      operationId: get_emails_email
      tags:
      - Email
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    patch:
      summary: Update mailbox (any of gb+format, incoming, outgoing, password — at least one required).
      operationId: patch_emails_email
      tags:
      - Email
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  example: newpass
              example:
                password: newpass
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Delete mailbox.
      operationId: delete_emails_email
      tags:
      - Email
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/configuration/{config_type}/{account}:
    get:
      summary: 'Download mail client config (config_type: thunderbird, outlook, apple).'
      operationId: emails_configuration_config_type_account
      tags:
      - Email
      parameters:
      - name: config_type
        in: path
        required: true
        schema:
          type: string
      - name: account
        in: path
        required: true
        schema:
          type: string
      - name: ssl
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: File download.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/aliases:
    get:
      summary: List email aliases.
      operationId: get_emails_aliases
      tags:
      - Email
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create alias.
      operationId: post_emails_aliases
      tags:
      - Email
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: a
                domain:
                  type: string
                  example: b.com
                target:
                  type: string
                  example: c@d.com
              example:
                username: a
                domain: b.com
                target: c@d.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/aliases/{email}:
    get:
      summary: Get targets for one alias.
      operationId: get_emails_aliases_email
      tags:
      - Email
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Add a target to an existing alias.
      operationId: post_emails_aliases_email
      tags:
      - Email
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target:
                  type: string
                  example: c@d.com
              example:
                target: c@d.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Delete one target ({"target":...}), or the whole alias ({"delete_all":true}).
      operationId: delete_emails_aliases_email
      tags:
      - Email
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target:
                  type: string
                  example: c@d.com
              example:
                target: c@d.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/default/{domain}:
    get:
      summary: Get catch-all address.
      operationId: get_emails_default_domain
      tags:
      - Email
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Set catch-all address (omit/empty destination to remove it).
      operationId: put_emails_default_domain
      tags:
      - Email
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                destination:
                  type: string
                  example: catch@example.com
              example:
                destination: catch@example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/deliverability:
    get:
      summary: Check SPF/DKIM/DMARC for all domains.
      operationId: emails_deliverability
      tags:
      - Email
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/deliverability/{domain}:
    get:
      summary: Check deliverability for a domain.
      operationId: emails_deliverability_domain
      tags:
      - Email
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/filters/{email}:
    get:
      summary: Get Sieve mail filters (raw script + parsed rules).
      operationId: get_emails_filters_email
      tags:
      - Email
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Update Sieve filters.
      operationId: put_emails_filters_email
      tags:
      - Email
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  example: '...sieve script...'
              example:
                content: '...sieve script...'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/export:
    get:
      summary: Export mailboxes as CSV.
      operationId: emails_export
      tags:
      - Email
      responses:
        '200':
          description: File download.
          content:
            text/csv:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/import:
    post:
      summary: Validate a CSV upload and preview the import (multipart/form-data, field name 'file').
      operationId: emails_import
      tags:
      - Email
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
              - file
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/import/confirm:
    post:
      summary: Confirm a previewed import and create the mailboxes.
      operationId: emails_import_confirm
      tags:
      - Email
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                import_token:
                  type: string
                  example: '...'
              example:
                import_token: '...'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/migrate/test:
    post:
      summary: Test the source IMAP login and the destination mailbox login before a migration, waits
        for the result.
      operationId: emails_migrate_test
      tags:
      - Email Migration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source_host:
                  type: string
                  example: imap.oldhost.com
                source_port:
                  type: integer
                  example: 993
                source_security:
                  type: string
                  example: ssl
                source_user:
                  type: string
                  example: info@example.com
                source_password:
                  type: string
                  example: '...'
                destination:
                  type: string
                  example: info@example.com
                destination_password:
                  type: string
                  example: '...'
              example:
                source_host: imap.oldhost.com
                source_port: 993
                source_security: ssl
                source_user: info@example.com
                source_password: '...'
                destination: info@example.com
                destination_password: '...'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/migrate:
    post:
      summary: Start an IMAP migration (imapsync) into one of your mailboxes in the background, same body
        as /api/emails/migrate/test. source_security is ssl (default), starttls or none; exclude_junk
        (default true) skips Spam, Junk and Trash. One migration at a time per account.
      operationId: post_emails_migrate
      tags:
      - Email Migration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source_host:
                  type: string
                  example: imap.oldhost.com
                source_port:
                  type: integer
                  example: 993
                source_security:
                  type: string
                  example: ssl
                source_user:
                  type: string
                  example: info@example.com
                source_password:
                  type: string
                  example: '...'
                destination:
                  type: string
                  example: info@example.com
                destination_password:
                  type: string
                  example: '...'
                exclude_junk:
                  type: boolean
                  example: true
              example:
                source_host: imap.oldhost.com
                source_port: 993
                source_security: ssl
                source_user: info@example.com
                source_password: '...'
                destination: info@example.com
                destination_password: '...'
                exclude_junk: true
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    get:
      summary: Status of the running migration and the last 10 migrations (running, completed, failed
        or cancelled), with the end of the newest log.
      operationId: get_emails_migrate
      tags:
      - Email Migration
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/migrate/cancel:
    post:
      summary: Cancel the running migration, messages copied so far are kept.
      operationId: emails_migrate_cancel
      tags:
      - Email Migration
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/emails/migrate/log/{id}:
    get:
      summary: Full log of one migration.
      operationId: emails_migrate_log_id
      tags:
      - Email Migration
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ftp:
    get:
      summary: List FTP accounts.
      operationId: get_ftp
      tags:
      - FTP
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create FTP account (path must start with /var/www/html/).
      operationId: post_ftp
      tags:
      - FTP
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: u
                password:
                  type: string
                  example: p
                domain:
                  type: string
                  example: example.com
                path:
                  type: string
                  example: /var/www/html/
              example:
                username: u
                password: p
                domain: example.com
                path: /var/www/html/
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ftp/{username}:
    delete:
      summary: Delete FTP account.
      operationId: ftp_username
      tags:
      - FTP
      parameters:
      - name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ftp/{username}/password:
    patch:
      summary: Change FTP password.
      operationId: ftp_username_password
      tags:
      - FTP
      parameters:
      - name: username
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  example: newpass
              example:
                password: newpass
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ftp/{username}/path:
    patch:
      summary: Change FTP home path.
      operationId: ftp_username_path
      tags:
      - FTP
      parameters:
      - name: username
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                path:
                  type: string
                  example: /var/www/html
              example:
                path: /var/www/html
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ftp/{username}/quota:
    patch:
      summary: 'Set the FTP account''s disk quota: a number of MB, a value like 500M or 2G, or unlimited.'
      operationId: ftp_username_quota
      tags:
      - FTP
      parameters:
      - name: username
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                quota:
                  type: string
                  example: 2G
              example:
                quota: 2G
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ftp/connections:
    get:
      summary: List active FTP connections.
      operationId: ftp_connections
      tags:
      - FTP
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ftp/configuration/{config_type}/{account}:
    get:
      summary: 'Download FTP client config (config_type: cyberduck, filezilla).'
      operationId: ftp_configuration_config_type_account
      tags:
      - FTP
      parameters:
      - name: config_type
        in: path
        required: true
        schema:
          type: string
      - name: account
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: File download.
          content:
            application/xml:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/crons:
    get:
      summary: List all cron jobs.
      operationId: get_crons
      tags:
      - Cron Jobs
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create cron job (comment defaults to the container name).
      operationId: post_crons
      tags:
      - Cron Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                schedule:
                  type: string
                  example: 0 0 * * * *
                command:
                  type: string
                  example: /usr/bin/php script.php
                container:
                  type: string
                  example: php-fpm-8.1
                comment:
                  type: string
                  example: my job
              example:
                schedule: 0 0 * * * *
                command: /usr/bin/php script.php
                container: php-fpm-8.1
                comment: my job
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    patch:
      summary: Edit cron job. All original_* fields must match the existing job exactly.
      operationId: patch_crons
      tags:
      - Cron Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                original_schedule:
                  type: string
                  example: 0 0 * * * *
                original_command:
                  type: string
                  example: '...'
                original_container:
                  type: string
                  example: php-fpm-8.1
                original_comment:
                  type: string
                  example: my job
                schedule:
                  type: string
                  example: 30 * * * *
                command:
                  type: string
                  example: '...'
                container:
                  type: string
                  example: php-fpm-8.1
                comment:
                  type: string
                  example: my job
              example:
                original_schedule: 0 0 * * * *
                original_command: '...'
                original_container: php-fpm-8.1
                original_comment: my job
                schedule: 30 * * * *
                command: '...'
                container: php-fpm-8.1
                comment: my job
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Delete cron job (all fields must match the existing job exactly).
      operationId: delete_crons
      tags:
      - Cron Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                schedule:
                  type: string
                  example: 0 0 * * * *
                command:
                  type: string
                  example: '...'
                container:
                  type: string
                  example: php-fpm-8.1
                comment:
                  type: string
                  example: my job
              example:
                schedule: 0 0 * * * *
                command: '...'
                container: php-fpm-8.1
                comment: my job
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/crons/raw:
    get:
      summary: Get the raw cron file.
      operationId: get_crons_raw
      tags:
      - Cron Jobs
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Save the raw cron file, one [job-exec "name"] section per job with a 6-field schedule.
      operationId: put_crons_raw
      tags:
      - Cron Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  example: |
                    [job-exec "my job"]
                    schedule = 0 0 * * * *
                    container = php-fpm-8.3
                    command = /usr/bin/php script.php
              example:
                content: |
                  [job-exec "my job"]
                  schedule = 0 0 * * * *
                  container = php-fpm-8.3
                  command = /usr/bin/php script.php
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/crons/timezone:
    get:
      summary: Get the time zone the cron service runs schedules in.
      description: The time zone the cron service runs schedules in, from its TZ, the server zone when
        /etc/localtime is mounted, or UTC.
      operationId: get_crons_timezone
      tags:
      - Cron Jobs
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  timezone:
                    type: string
                    example: Europe/Belgrade
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Set the cron time zone and recreate the cron service.
      description: Sets TZ on the cron service in docker-compose.yml and recreates the service when a
        job is enabled.
      operationId: put_crons_timezone
      tags:
      - Cron Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                timezone:
                  type: string
                  example: Europe/Belgrade
              example:
                timezone: Europe/Belgrade
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/crons/log:
    get:
      summary: Tail cron log.
      operationId: crons_log
      tags:
      - Cron Jobs
      parameters:
      - name: lines
        in: query
        required: false
        schema:
          type: string
      - name: job
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/cache/redis:
    get:
      summary: Redis status.
      operationId: get_cache_redis
      tags:
      - Cache Services
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Enable/disable/restart Redis.
      operationId: post_cache_redis
      tags:
      - Cache Services
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: enable
              example:
                action: enable
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/cache/valkey:
    get:
      summary: Valkey status.
      operationId: get_cache_valkey
      tags:
      - Cache Services
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Enable/disable/restart Valkey.
      operationId: post_cache_valkey
      tags:
      - Cache Services
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: disable
              example:
                action: disable
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/cache/memcached:
    get:
      summary: Memcached status.
      operationId: get_cache_memcached
      tags:
      - Cache Services
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Enable/disable/restart Memcached.
      operationId: post_cache_memcached
      tags:
      - Cache Services
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: enable
              example:
                action: enable
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/cache/elasticsearch:
    get:
      summary: Elasticsearch status.
      operationId: get_cache_elasticsearch
      tags:
      - Cache Services
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Enable/disable/restart Elasticsearch.
      operationId: post_cache_elasticsearch
      tags:
      - Cache Services
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: enable
              example:
                action: enable
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/cache/opensearch:
    get:
      summary: OpenSearch status.
      operationId: get_cache_opensearch
      tags:
      - Cache Services
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Enable/disable/restart OpenSearch.
      operationId: post_cache_opensearch
      tags:
      - Cache Services
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: enable
              example:
                action: enable
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/cache/varnish:
    get:
      summary: Varnish status + domain list.
      operationId: get_cache_varnish
      tags:
      - Cache Services
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Enable/disable Varnish.
      operationId: post_cache_varnish
      tags:
      - Cache Services
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: enable
              example:
                action: enable
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/cache/varnish/stats:
    get:
      summary: Varnish hit ratio and traffic stats.
      operationId: cache_varnish_stats
      tags:
      - Cache Services
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/cache/varnish/domains:
    get:
      summary: Per-domain Varnish status.
      operationId: cache_varnish_domains
      tags:
      - Cache Services
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/cache/varnish/domains/{domain}:
    post:
      summary: Toggle Varnish for domain.
      operationId: cache_varnish_domains_domain
      tags:
      - Cache Services
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  example: 'On'
              example:
                status: 'On'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers:
    get:
      summary: List compose services.
      operationId: get_containers
      tags:
      - Docker / Containers
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Add a new compose service.
      operationId: post_containers
      tags:
      - Docker / Containers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                service_name:
                  type: string
                  example: myservice
                image:
                  type: string
                  example: myimage:tag
                cpu:
                  type: string
                  example: '1'
                ram:
                  type: string
                  example: 512m
              example:
                service_name: myservice
                image: myimage:tag
                cpu: '1'
                ram: 512m
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/status:
    get:
      summary: List running container names.
      operationId: containers_status
      tags:
      - Docker / Containers
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/{service}/status:
    get:
      summary: Get container state and health.
      operationId: containers_service_status
      tags:
      - Docker / Containers
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/{service}/start:
    post:
      summary: Start container.
      operationId: containers_service_start
      tags:
      - Docker / Containers
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pull:
                  type: boolean
                  example: false
              example:
                pull: false
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/{service}/stop:
    post:
      summary: Stop container.
      operationId: containers_service_stop
      tags:
      - Docker / Containers
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/{service}/restart:
    post:
      summary: Restart container.
      operationId: containers_service_restart
      tags:
      - Docker / Containers
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/{service}/resources:
    patch:
      summary: Update CPU/RAM/PIDs limits.
      operationId: containers_service_resources
      tags:
      - Docker / Containers
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cpu:
                  type: string
                  example: '1'
                ram:
                  type: string
                  example: 512m
                pids:
                  type: string
                  example: '512'
              example:
                cpu: '1'
                ram: 512m
                pids: '512'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/{service}/logs:
    get:
      summary: Tail container logs.
      operationId: containers_service_logs
      tags:
      - Docker / Containers
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      - name: lines
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/{service}:
    patch:
      summary: Edit a compose service's definition.
      operationId: patch_containers_service
      tags:
      - Docker / Containers
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cpu:
                  type: string
                  example: '1'
                ram:
                  type: string
                  example: 512m
              example:
                cpu: '1'
                ram: 512m
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Remove a compose service.
      operationId: delete_containers_service
      tags:
      - Docker / Containers
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/mysql:
    post:
      summary: Switch the MySQL/MariaDB variant (wipes the old data volume).
      operationId: containers_mysql
      tags:
      - Switch MySQL Type
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                new_sql:
                  type: string
                  example: mysql:8.0
              example:
                new_sql: mysql:8.0
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/webserver:
    post:
      summary: Switch the active webserver.
      operationId: containers_webserver
      tags:
      - Switch WebServer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                new_ws:
                  type: string
                  example: nginx
              example:
                new_ws: nginx
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/containers/{service}/image:
    patch:
      summary: Change a service's image.
      operationId: containers_service_image
      tags:
      - Change Container Image Tag
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                new_tag:
                  type: string
                  example: myimage:tag
              example:
                new_tag: myimage:tag
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/waf:
    get:
      summary: WAF status for all domains.
      operationId: waf
      tags:
      - WAF
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/waf/{domain}:
    get:
      summary: WAF status + excluded rules for domain.
      operationId: get_waf_domain
      tags:
      - WAF
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Set WAF On, Off or DetectionOnly (monitor only, logs but never blocks).
      operationId: post_waf_domain
      tags:
      - WAF
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  example: 'On'
                  enum:
                  - 'On'
                  - 'Off'
                  - DetectionOnly
              example:
                status: 'On'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/waf/{domain}/rules:
    put:
      summary: Update excluded rule IDs/tags.
      operationId: waf_domain_rules
      tags:
      - WAF
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                remove_by_id:
                  type: array
                  items:
                    type: string
                    example: '920170'
                  example:
                  - '920170'
                remove_by_tag:
                  type: array
                  items:
                    type: string
                  example: []
              example:
                remove_by_id:
                - '920170'
                remove_by_tag: []
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/waf/log/{domain}:
    get:
      summary: Paginated WAF log entries.
      operationId: waf_log_domain
      tags:
      - WAF
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: page
        in: query
        required: false
        schema:
          type: string
      - name: per_page
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/waf/stats/{domain}:
    get:
      summary: Block/check counts for domain.
      operationId: waf_stats_domain
      tags:
      - WAF
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: seconds
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/waf/ids/ids:
    get:
      summary: List all WAF rule IDs.
      operationId: waf_ids_ids
      tags:
      - WAF
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/waf/ids/tags:
    get:
      summary: List all WAF rule tags.
      operationId: waf_ids_tags
      tags:
      - WAF
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/bot-control:
    get:
      summary: 'AI crawler policy (allow, ratelimit or block) of every domain on the account, plus rate_limit:
        the requests per minute a crawler gets on a rate-limited domain, set by the server administrator.'
      operationId: bot_control
      tags:
      - AI & Bot Control
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/bot-control/{domain}:
    post:
      summary: 'Set the AI crawler policy of a domain: allow, ratelimit (crawlers get rate_limit requests
        per minute, then HTTP 429) or block (HTTP 403). Caddy is reloaded and the old config is put back
        if it rejects the change.'
      operationId: bot_control_domain
      tags:
      - AI & Bot Control
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                policy:
                  type: string
                  example: block
              example:
                policy: block
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/bot-control/{domain}/stats:
    get:
      summary: 'Policy, rate_limit and the "Who''s hitting me" report of a domain from its Caddy access
        log: top bots and user agents, networks and hit URLs.'
      operationId: bot_control_domain_stats
      tags:
      - AI & Bot Control
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: window
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ip-blocker:
    get:
      summary: List all blocked IPs.
      operationId: get_ip_blocker
      tags:
      - IP Blocker
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Block IPs.
      operationId: post_ip_blocker
      tags:
      - IP Blocker
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ips:
                  type: array
                  items:
                    type: string
                    example: 1.2.3.4
                  example:
                  - 1.2.3.4
                  - 5.6.7.8
              example:
                ips:
                - 1.2.3.4
                - 5.6.7.8
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Unblock all IPs.
      operationId: delete_ip_blocker
      tags:
      - IP Blocker
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/versions:
    get:
      summary: List installed PHP versions.
      operationId: php_versions
      tags:
      - PHP
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/{version}/ini:
    get:
      summary: Get php.ini content.
      operationId: get_php_version_ini
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Save php.ini.
      operationId: put_php_version_ini
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  example: '...ini content...'
              example:
                content: '...ini content...'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/{version}/options:
    get:
      summary: Get PHP option keys + values.
      operationId: get_php_version_options
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Update specific PHP options.
      operationId: put_php_version_options
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                memory_limit:
                  type: string
                  example: 256M
                upload_max_filesize:
                  type: string
                  example: 64M
              example:
                memory_limit: 256M
                upload_max_filesize: 64M
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/{version}/options/recommendations:
    get:
      summary: Get tuning recommendations for a PHP version's options.
      description: Checks the PHP service (memory limit, workers, log), the domains and WordPress sites
        using this version and the current options, and returns suggested values with the reason for each.
      operationId: get_php_options_recommendations
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Invalid PHP version.
        '404':
          description: PHP version not installed.
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/{version}/extensions:
    get:
      summary: List extensions with state.
      operationId: get_php_version_extensions
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Enable/disable an extension (restarts PHP-FPM).
      operationId: post_php_version_extensions
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                extension:
                  type: string
                  example: imagick
                enable:
                  type: boolean
                  example: true
              example:
                extension: imagick
                enable: true
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/{version}/extensions/available:
    get:
      summary: List all supported extensions.
      operationId: php_version_extensions_available
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/{version}/extensions/install:
    post:
      summary: Install one or more extensions (async — poll the status endpoint).
      operationId: php_version_extensions_install
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                extensions:
                  type: array
                  items:
                    type: string
                    example: imagick
                  example:
                  - imagick
              example:
                extensions:
                - imagick
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/{version}/extensions/install/status:
    get:
      summary: Poll install progress.
      operationId: php_version_extensions_install_status
      tags:
      - PHP
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      - name: install_id
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/default:
    get:
      summary: Get the server-wide default PHP version.
      operationId: get_php_default
      tags:
      - PHP
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Set the server-wide default PHP version.
      operationId: put_php_default
      tags:
      - PHP
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                version:
                  type: string
                  example: '8.2'
              example:
                version: '8.2'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/domains:
    get:
      summary: List every domain with its assigned PHP version.
      operationId: get_php_domains
      tags:
      - PHP
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Change a domain's PHP version.
      operationId: put_php_domains
      tags:
      - PHP
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  example: example.com
                version:
                  type: string
                  example: '8.2'
              example:
                domain: example.com
                version: '8.2'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/install:
    post:
      summary: Install a Composer-based PHP project into an existing domain's docroot (form-encoded body;
        response streams newline-delimited JSON progress events).
      operationId: php_install
      tags:
      - PHP App Manager
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/apps/composer-install/{site_name}:
    post:
      summary: Re-run `composer install` for an already-installed PHP app.
      operationId: php_apps_composer_install_site_name
      tags:
      - PHP App Manager
      parameters:
      - name: site_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/apps/composer-update/{site_name}:
    post:
      summary: Re-run `composer update` for an already-installed PHP app.
      operationId: php_apps_composer_update_site_name
      tags:
      - PHP App Manager
      parameters:
      - name: site_name
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                optimize_autoloader:
                  type: string
                  example: 'true'
              example:
                optimize_autoloader: 'true'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/apps/logs/{site_name}:
    get:
      summary: Get the Composer run log for a PHP app.
      operationId: php_apps_logs_site_name
      tags:
      - PHP App Manager
      parameters:
      - name: site_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/php/apps/{site_name}:
    delete:
      summary: Remove a PHP app's tracking entry and .env settings. Docroot files and the database, if
        any, are left untouched.
      operationId: php_apps_site_name
      tags:
      - PHP App Manager
      parameters:
      - name: site_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account:
    get:
      summary: Get account info.
      operationId: get_account
      tags:
      - Account
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    patch:
      summary: Update email/password/username.
      operationId: patch_account
      tags:
      - Account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  example: new@example.com
              example:
                email: new@example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/sessions:
    get:
      summary: List active sessions.
      operationId: account_sessions
      tags:
      - Account
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/sessions/{token}:
    delete:
      summary: Terminate a session.
      operationId: account_sessions_token
      tags:
      - Account
      parameters:
      - name: token
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/passkeys:
    get:
      summary: List registered passkeys.
      operationId: account_passkeys
      tags:
      - Passkeys
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/passkeys/{id}:
    delete:
      summary: Revoke a passkey.
      operationId: account_passkeys_id
      tags:
      - Passkeys
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/2fa:
    get:
      summary: Get 2FA status.
      operationId: get_account_2fa
      tags:
      - Two-Factor Authentication
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Disable 2FA.
      operationId: delete_account_2fa
      tags:
      - Two-Factor Authentication
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/2fa/setup:
    post:
      summary: Generate a pending TOTP secret.
      operationId: account_2fa_setup
      tags:
      - Two-Factor Authentication
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/2fa/confirm:
    post:
      summary: Confirm setup and enable 2FA.
      operationId: account_2fa_confirm
      tags:
      - Two-Factor Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                otp_code:
                  type: string
                  example: '123456'
              example:
                otp_code: '123456'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/mcp:
    get:
      summary: List MCP tokens.
      operationId: get_account_mcp
      tags:
      - MCP Tokens
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create an MCP token.
      operationId: post_account_mcp
      tags:
      - MCP Tokens
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: my token
                read_only:
                  type: boolean
                  example: true
                expires_in_days:
                  type: integer
                  example: 30
              example:
                name: my token
                read_only: true
                expires_in_days: 30
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/mcp/{id}:
    delete:
      summary: Revoke an MCP token.
      operationId: account_mcp_id
      tags:
      - MCP Tokens
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/favorites:
    get:
      summary: List favorites.
      operationId: get_account_favorites
      tags:
      - Favorites
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Add a favorite.
      operationId: post_account_favorites
      tags:
      - Favorites
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                link:
                  type: string
                  example: dashboard
                title:
                  type: string
                  example: Dashboard
              example:
                link: dashboard
                title: Dashboard
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Remove a favorite.
      operationId: delete_account_favorites
      tags:
      - Favorites
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                link:
                  type: string
                  example: dashboard
              example:
                link: dashboard
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/language:
    get:
      summary: Get available locales and the current language.
      operationId: get_account_language
      tags:
      - Language
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Set the preferred UI language.
      operationId: put_account_language
      tags:
      - Language
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                locale:
                  type: string
                  example: de
              example:
                locale: de
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/login-history:
    get:
      summary: Get recent login attempts.
      operationId: account_login_history
      tags:
      - Login History
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/notifications:
    get:
      summary: Get notification preferences.
      operationId: get_account_notifications
      tags:
      - Notifications
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Update notification preferences.
      operationId: put_account_notifications
      tags:
      - Notifications
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                preferences:
                  type: object
                  properties:
                    notify_account_login:
                      type: boolean
                      example: false
                  example:
                    notify_account_login: false
              example:
                preferences:
                  notify_account_login: false
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/usage:
    get:
      summary: Latest resource snapshot (CPU, RAM, bandwidth).
      operationId: usage
      tags:
      - Resource Usage
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/usage/history:
    get:
      summary: Paginated usage history.
      operationId: usage_history
      tags:
      - Resource Usage
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: string
      - name: per_page
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/hosting/info:
    get:
      summary: Get general hosting/server info.
      operationId: hosting_info
      tags:
      - Hosting Info
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/hosting/plan:
    get:
      summary: Get hosting plan details.
      operationId: hosting_plan
      tags:
      - Hosting Info
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/hosting/ports:
    get:
      summary: Get allocated remote-access ports.
      operationId: hosting_ports
      tags:
      - Hosting Info
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/server/info:
    get:
      summary: Get combined server info, hosting plan, and remote-access ports in one call.
      operationId: server_info
      tags:
      - Hosting Info
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/disk-usage:
    get:
      summary: Disk usage per top-level subdirectory.
      operationId: disk_usage
      tags:
      - Disk & Inodes
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/disk-usage/{path}:
    get:
      summary: Disk usage for a specific path.
      operationId: disk_usage_path
      tags:
      - Disk & Inodes
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/inodes:
    get:
      summary: Inode count per top-level subdirectory.
      operationId: inodes
      tags:
      - Disk & Inodes
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/inodes/{path}:
    get:
      summary: Inode counts for a specific path.
      operationId: inodes_path
      tags:
      - Disk & Inodes
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/malware-scanner/quarantine:
    get:
      summary: List quarantined files.
      operationId: malware_scanner_quarantine
      tags:
      - Malware Scanner
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/malware-scanner/logs:
    get:
      summary: List past malware scans.
      description: Scans from the panel, the API and cron, newest first. The last 50 are kept.
      operationId: malware_scanner_logs
      tags:
      - Malware Scanner
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/malware-scanner/scan:
    post:
      summary: Run ClamAV scan.
      operationId: malware_scanner_scan
      tags:
      - Malware Scanner
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                directory:
                  type: string
                  example: /var/www/html
              example:
                directory: /var/www/html
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backup-wizard/status:
    get:
      summary: Get backup status and list existing backups.
      operationId: backup_wizard_status
      tags:
      - Backup Wizard
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backup-wizard/create:
    post:
      summary: Start a full-account backup.
      operationId: backup_wizard_create
      tags:
      - Backup Wizard
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backup-wizard/download/{filename}:
    get:
      summary: Download a backup archive.
      operationId: backup_wizard_download_filename
      tags:
      - Backup Wizard
      parameters:
      - name: filename
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: File download.
          content:
            application/gzip:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/files:
    get:
      summary: List the docroot root.
      operationId: files
      tags:
      - File Manager
      parameters:
      - name: hidden_files
        in: query
        required: false
        schema:
          type: string
      - name: page
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/files/{path}:
    get:
      summary: List a directory.
      operationId: files_path
      tags:
      - File Manager
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/folders:
    get:
      summary: List the docroot root's subfolders (for a copy/move destination picker).
      operationId: folders
      tags:
      - File Manager
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/folders/{path}:
    get:
      summary: List subfolders (for a copy/move destination picker).
      operationId: folders_path
      tags:
      - File Manager
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/new-file:
    post:
      summary: Create a file.
      operationId: file_manager_new_file
      tags:
      - File Manager
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                path:
                  type: string
                  example: subdir
                filename:
                  type: string
                  example: notes.txt
              example:
                path: subdir
                filename: notes.txt
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/new-directory:
    post:
      summary: Create a directory.
      operationId: file_manager_new_directory
      tags:
      - File Manager
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                path:
                  type: string
                  example: subdir
                foldername:
                  type: string
                  example: images
              example:
                path: subdir
                foldername: images
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/upload:
    post:
      summary: Upload files (multipart/form-data, field name 'files').
      operationId: file_manager_upload
      tags:
      - File Manager
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                path_param:
                  type: string
              required:
              - files
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/rename:
    post:
      summary: Rename a file or directory.
      operationId: file_manager_rename
      tags:
      - File Manager
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                path:
                  type: string
                  example: subdir
                old_name:
                  type: string
                  example: old.txt
                new_name:
                  type: string
                  example: new.txt
              example:
                path: subdir
                old_name: old.txt
                new_name: new.txt
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/delete:
    delete:
      summary: Delete a file or directory (permanently, or move to trash).
      operationId: file_manager_delete
      tags:
      - File Manager
      parameters:
      - name: filename
        in: query
        required: false
        schema:
          type: string
      - name: path_param
        in: query
        required: false
        schema:
          type: string
      - name: item_type
        in: query
        required: false
        schema:
          type: string
      - name: mode
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/permissions:
    post:
      summary: Change permissions on one or more files.
      operationId: file_manager_permissions
      tags:
      - File Manager
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                path:
                  type: string
                  example: subdir
                filenames:
                  type: array
                  items:
                    type: string
                    example: a.txt
                  example:
                  - a.txt
                permissions:
                  type: string
                  example: '644'
              example:
                path: subdir
                filenames:
                - a.txt
                permissions: '644'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/copy:
    post:
      summary: Copy a file or directory.
      operationId: file_manager_copy
      tags:
      - File Manager
      parameters:
      - name: item_name
        in: query
        required: false
        schema:
          type: string
      - name: item_type
        in: query
        required: false
        schema:
          type: string
      - name: path_param
        in: query
        required: false
        schema:
          type: string
      - name: destination_path
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/move:
    post:
      summary: Move a file or directory.
      operationId: file_manager_move
      tags:
      - File Manager
      parameters:
      - name: item_name
        in: query
        required: false
        schema:
          type: string
      - name: path_param
        in: query
        required: false
        schema:
          type: string
      - name: destination_path
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/edit-file/{path}:
    get:
      summary: Get a file's content.
      operationId: get_file_manager_edit_file_path
      tags:
      - File Manager
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Save a file's content.
      operationId: put_file_manager_edit_file_path
      tags:
      - File Manager
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  example: new file content
              example:
                content: new file content
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/download-file/{path}:
    get:
      summary: Download a file.
      operationId: file_manager_download_file_path
      tags:
      - File Manager
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/view-file/{path}:
    get:
      summary: View a file's raw content.
      operationId: file_manager_view_file_path
      tags:
      - File Manager
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/extract-archive:
    post:
      summary: Extract an archive.
      operationId: file_manager_extract_archive
      tags:
      - File Manager
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                archive_name:
                  type: string
                  example: backup.zip
                path:
                  type: string
                  example: subdir
                extract_destination:
                  type: string
                  example: subdir/extracted
              example:
                archive_name: backup.zip
                path: subdir
                extract_destination: subdir/extracted
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/create-archive:
    post:
      summary: Create an archive from selected files.
      operationId: file_manager_create_archive
      tags:
      - File Manager
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                archive_name:
                  type: string
                  example: backup
                extension:
                  type: string
                  example: zip
                path:
                  type: string
                  example: subdir
                selected_files:
                  type: array
                  items:
                    type: string
                    example: a.txt
                  example:
                  - a.txt
                  - b.txt
              example:
                archive_name: backup
                extension: zip
                path: subdir
                selected_files:
                - a.txt
                - b.txt
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/wget:
    post:
      summary: Download a file from a URL (multipart/form-data).
      operationId: file_manager_wget
      tags:
      - File Manager
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                path_param:
                  type: string
              required:
              - url
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/file-manager/wget/status/{download_id}:
    get:
      summary: Poll a URL download's progress.
      operationId: file_manager_wget_status_download_id
      tags:
      - File Manager
      parameters:
      - name: download_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/trash:
    get:
      summary: List trashed items at the trash root.
      operationId: trash
      tags:
      - Trash
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/trash/{path}:
    get:
      summary: List trashed items.
      operationId: trash_path
      tags:
      - Trash
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/trash/restore:
    post:
      summary: Restore one item from trash.
      operationId: trash_restore
      tags:
      - Trash
      parameters:
      - name: filename
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/trash/delete:
    delete:
      summary: Permanently delete one item from trash.
      operationId: trash_delete
      tags:
      - Trash
      parameters:
      - name: filename
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/trash/restore-all:
    post:
      summary: Restore every item in trash.
      operationId: trash_restore_all
      tags:
      - Trash
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/trash/delete-all:
    post:
      summary: Empty the trash.
      operationId: trash_delete_all
      tags:
      - Trash
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/webserver-conf:
    get:
      summary: Get webserver config file content.
      operationId: get_webserver_conf
      tags:
      - Webserver Config
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Save webserver config and restart service.
      operationId: put_webserver_conf
      tags:
      - Webserver Config
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  example: '...conf content...'
              example:
                content: '...conf content...'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/webserver-conf/litespeed-license:
    get:
      summary: LiteSpeed Enterprise license status (only when the account's web server is litespeed).
      operationId: get_webserver_conf_litespeed_license
      tags:
      - Webserver Config
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: 'Set a LiteSpeed Enterprise serial ({"serial": "..."}) or go back to a trial license ({"trial":
        true}).'
      operationId: post_webserver_conf_litespeed_license
      tags:
      - Webserver Config
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serial:
                  type: string
                  example: XXXX-XXXX-XXXX-XXXX
              example:
                serial: XXXX-XXXX-XXXX-XXXX
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/git:
    get:
      summary: List the account's git repositories with branch, deploy mode, target folder, last pull/deploy
        and webhook URL. Optional ?domain= filters by domain.
      operationId: get_git
      tags:
      - Git
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: 'Run a repository action: create (source remote or local, name, remote_url, remote_user,
        remote_pass, branch, domain, target_dir, deploy_mode automatic|manual|none, actions), pull, deploy,
        settings, reset_password or delete (repo = repository name). create and reset_password return
        push_password once.'
      operationId: post_git
      tags:
      - Git
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: deploy
                repo:
                  type: string
                  example: mysite
              example:
                action: deploy
                repo: mysite
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/process-manager:
    get:
      summary: List running container processes.
      operationId: process_manager
      tags:
      - Process Manager
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/process-manager/{pid}:
    delete:
      summary: Kill a process by PID.
      operationId: process_manager_pid
      tags:
      - Process Manager
      parameters:
      - name: pid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/fix-permissions:
    post:
      summary: Fix ownership and permissions (files 664, folders 775, FTP account folders) for a directory
        under /var/www/html/, omit directory or pass / to fix the whole account.
      operationId: post_fix_permissions
      tags:
      - Fix Permissions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                directory:
                  type: string
                  example: /var/www/html/example.com
              example:
                directory: /var/www/html/example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites:
    get:
      summary: List all websites.
      operationId: sites
      tags:
      - Sites & Websites
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}:
    get:
      summary: Get website details.
      operationId: sites_domain
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}/safebrowsing:
    get:
      summary: Google Safe Browsing check.
      operationId: sites_domain_safebrowsing
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}/pagespeed:
    get:
      summary: Get PageSpeed data.
      operationId: get_sites_domain_pagespeed
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Trigger PageSpeed refresh.
      operationId: post_sites_domain_pagespeed
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}/wp-vulnerability:
    get:
      summary: Get WP vulnerability data.
      operationId: get_sites_domain_wp_vulnerability
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Run vulnerability scan.
      operationId: post_sites_domain_wp_vulnerability
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}/temporary-link:
    get:
      summary: Generate a temporary preview link for a site.
      operationId: sites_domain_temporary_link
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}/visitors:
    get:
      summary: Get recent unique visitors for a domain.
      operationId: sites_domain_visitors
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: seconds
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}/wp-info:
    get:
      summary: Get PHP/MySQL/WordPress versions and database credentials for a WordPress site.
      operationId: sites_domain_wp_info
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/wp-cli/{action}:
    get:
      summary: Site-manager scoped WP-CLI passthrough (site info, debug flags, update preferences) - distinct
        action set from POST /api/wp-cli/<action>.
      operationId: sites_wp_cli_action
      tags:
      - Sites & Websites
      parameters:
      - name: action
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}/favicon:
    get:
      summary: Redirect to the site's favicon (Google favicon service, or a configured favicon proxy).
      operationId: sites_domain_favicon
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}/screenshot:
    get:
      summary: Get a cached screenshot of the site (fetches and caches one if not already cached).
      operationId: get_sites_domain_screenshot
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Force-refresh the cached screenshot.
      operationId: post_sites_domain_screenshot
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/database-size:
    get:
      summary: Get a WordPress install's on-disk DB size (via `wp db size`) or a raw database's size,
        depending on which query parameter is supplied.
      operationId: sites_database_size
      tags:
      - Sites & Websites
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/{domain}/packages/{install_type}:
    post:
      summary: Re-run the package install (pip/npm/pnpm) for an already-created Node.js/Python app.
      operationId: sites_domain_packages_install_type
      tags:
      - Sites & Websites
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: install_type
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sites/bulk:
    post:
      summary: Run a bulk action on several sites, only detach is available via the API (update/backup/delete
        return 501).
      operationId: sites_bulk
      tags:
      - Sites & Websites
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: detach
                  enum:
                  - detach
                  - update
                  - backup
                  - delete
                sites:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 42
                      site_name:
                        type: string
                        example: example.com
                    example:
                      id: 42
                      site_name: example.com
                  example:
                  - id: 42
                    site_name: example.com
              example:
                action: detach
                sites:
                - id: 42
                  site_name: example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Invalid request body or no sites selected.
        '501':
          description: Only the detach action is available via the API.
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/drupal/install:
    post:
      summary: Install Drupal on a domain via `composer create-project drupal/recommended-project` + `drush
        site:install`. Streams newline-delimited JSON progress events as the install runs (Composer project
        creation, database setup, drush install).
      operationId: drupal_install
      tags:
      - Drupal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                site_name:
                  type: string
                  example: My Drupal Site
                drupal_version:
                  type: string
                  example: ''
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                site_name: My Drupal Site
                drupal_version: ''
                admin_username: admin
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/drupal/sites/{id}:
    delete:
      summary: 'Uninstall Drupal: drops the database and user, deletes every file in the docroot, and
        removes it from Site Manager.'
      operationId: drupal_sites_id
      tags:
      - Drupal
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/drupal/sites/{id}/clone:
    post:
      summary: Clone this Drupal site to another domain (or subdirectory). Requires target_domain and
        source_db; returns a single JSON response.
      operationId: drupal_sites_id_clone
      tags:
      - Drupal
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                source_db:
                  type: string
                  example: drupal_source
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                drupal_version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                source_db: drupal_source
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                drupal_version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/drupal/sites/{id}/update:
    post:
      summary: Update Drupal to the latest version via drush. Streams newline-delimited JSON progress
        events, ending with {"status":"Update completed!","version":"..."} or an {"error":"..."} line.
      operationId: drupal_sites_id_update
      tags:
      - Drupal
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/drupal/sites/{id}/cache:
    post:
      summary: Rebuild the Drupal cache via drush cache:rebuild. Returns {"message":"Cache rebuilt successfully."}.
      operationId: drupal_sites_id_cache
      tags:
      - Drupal
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/joomla/install:
    post:
      summary: Install Joomla on a domain by downloading the release archive from GitHub and running Joomla's
        own `installation/joomla.php install` CLI installer. Streams newline-delimited JSON progress events
        as the install runs (download, extraction, database setup, CLI install).
      operationId: joomla_install
      tags:
      - Joomla
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                site_name:
                  type: string
                  example: My Joomla Site
                joomla_version:
                  type: string
                  example: ''
                admin_name:
                  type: string
                  example: Administrator
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                site_name: My Joomla Site
                joomla_version: ''
                admin_name: Administrator
                admin_username: admin
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/joomla/clone:
    post:
      summary: Clone a Joomla site to another domain or subdirectory, blank fields fall back to generated
        values.
      operationId: joomla_clone
      tags:
      - Joomla
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source_domain:
                  type: string
                  example: example.com
                target_domain:
                  type: string
                  example: clone.example.com
                source_db:
                  type: string
                  example: joomla_a1b2c3
                source_folder:
                  type: string
                  example: ''
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
              example:
                source_domain: example.com
                target_domain: clone.example.com
                source_db: joomla_a1b2c3
                source_folder: ''
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/joomla/sites/{id}:
    delete:
      summary: 'Uninstall Joomla: drops the database and user, deletes every file in the docroot, and
        removes it from Site Manager.'
      operationId: joomla_sites_id
      tags:
      - Joomla
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/joomla/sites/{id}/cache:
    post:
      summary: Clear the Joomla cache. Returns {"message":"Cache cleared successfully."}.
      operationId: joomla_sites_id_cache
      tags:
      - Joomla
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/opencart/install:
    post:
      summary: Install OpenCart on a domain by downloading the release archive from GitHub and running
        OpenCart's own `install/cli_install.php install` CLI installer. Streams newline-delimited JSON
        progress events as the install runs (download, extraction, database setup, CLI install).
      operationId: opencart_install
      tags:
      - OpenCart
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                opencart_version:
                  type: string
                  example: ''
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                opencart_version: ''
                admin_username: admin
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/opencart/sites/{id}:
    delete:
      summary: 'Uninstall OpenCart: drops the database and user, deletes every file in the docroot, and
        removes it from Site Manager.'
      operationId: opencart_sites_id
      tags:
      - OpenCart
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/opencart/sites/{id}/clone:
    post:
      summary: Clone this OpenCart site to another domain (or subdirectory). source_db is derived automatically
        from the site's config.php; only target_domain is required. Returns a single JSON response.
      operationId: opencart_sites_id_clone
      tags:
      - OpenCart
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                opencart_version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                opencart_version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/opencart/sites/{id}/cache:
    post:
      summary: Clear the OpenCart cache. Returns {"message":"Cache cleared successfully."}.
      operationId: opencart_sites_id_cache
      tags:
      - OpenCart
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/nextcloud/install:
    post:
      summary: Install Nextcloud on a domain by downloading the release archive from download.nextcloud.com
        and running Nextcloud's own `occ maintenance:install` CLI installer. Streams newline-delimited
        JSON progress events as the install runs (download, extraction, database setup, CLI install, trusted
        domain configuration).
      operationId: nextcloud_install
      tags:
      - Nextcloud
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                nextcloud_version:
                  type: string
                  example: ''
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                nextcloud_version: ''
                admin_username: admin
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/nextcloud/sites/{id}:
    delete:
      summary: 'Uninstall Nextcloud: drops the database and user, deletes every file in the docroot, and
        removes it from Site Manager.'
      operationId: nextcloud_sites_id
      tags:
      - Nextcloud
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/nextcloud/sites/{id}/clone:
    post:
      summary: Clone this Nextcloud site to another domain (or subdirectory). Requires target_domain and
        source_db; returns a single JSON response.
      operationId: nextcloud_sites_id_clone
      tags:
      - Nextcloud
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                source_db:
                  type: string
                  example: nextcloud_source
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                nextcloud_version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                source_db: nextcloud_source
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                nextcloud_version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/nextcloud/sites/{id}/update:
    post:
      summary: Update Nextcloud to the latest version via occ upgrade. Streams newline-delimited JSON
        progress events, ending with {"status":"Update completed!","version":"..."} or an {"error":"..."}
        line.
      operationId: nextcloud_sites_id_update
      tags:
      - Nextcloud
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/nextcloud/sites/{id}/cache:
    post:
      summary: Clear the Nextcloud cache. Returns {"message":"Cache cleared successfully."}.
      operationId: nextcloud_sites_id_cache
      tags:
      - Nextcloud
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/prestashop/install:
    post:
      summary: Install PrestaShop on a domain by downloading the release archive from GitHub and running
        PrestaShop's own `install/index_cli.php` CLI installer. Streams newline-delimited JSON progress
        events as the install runs (download, extraction, database setup, CLI install, admin directory
        rename).
      operationId: prestashop_install
      tags:
      - PrestaShop
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                prestashop_version:
                  type: string
                  example: ''
                admin_firstname:
                  type: string
                  example: Admin
                admin_lastname:
                  type: string
                  example: User
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                prestashop_version: ''
                admin_firstname: Admin
                admin_lastname: User
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/prestashop/sites/{id}:
    delete:
      summary: 'Uninstall PrestaShop: drops the database and user, deletes every file in the docroot,
        and removes it from Site Manager.'
      operationId: prestashop_sites_id
      tags:
      - PrestaShop
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/prestashop/sites/{id}/clone:
    post:
      summary: Clone this PrestaShop site to another domain (or subdirectory). source_db is derived automatically
        from the site's app/config/parameters.php; only target_domain is required. Returns a single JSON
        response.
      operationId: prestashop_sites_id_clone
      tags:
      - PrestaShop
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                prestashop_version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                prestashop_version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/prestashop/sites/{id}/cache:
    post:
      summary: Clear the PrestaShop cache. Returns {"message":"Cache cleared successfully."}.
      operationId: prestashop_sites_id_cache
      tags:
      - PrestaShop
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/flarum/install:
    post:
      summary: Install Flarum on a domain. Streams newline-delimited JSON progress events as the install
        runs (composer create-project, database setup, flarum install).
      operationId: flarum_install
      tags:
      - Flarum
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                site_name:
                  type: string
                  example: My Flarum Forum
                flarum_version:
                  type: string
                  example: ''
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                site_name: My Flarum Forum
                flarum_version: ''
                admin_username: admin
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/flarum/sites/{id}:
    delete:
      summary: 'Uninstall Flarum: drops the database and user, deletes every file in the docroot, and
        removes it from Site Manager.'
      operationId: flarum_sites_id
      tags:
      - Flarum
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/flarum/sites/{id}/clone:
    post:
      summary: Clone this Flarum site to another domain (or subdirectory). Requires target_domain and
        source_db; returns a single JSON response.
      operationId: flarum_sites_id_clone
      tags:
      - Flarum
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                source_db:
                  type: string
                  example: flarum_source
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                flarum_version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                source_db: flarum_source
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                flarum_version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/flarum/sites/{id}/update:
    post:
      summary: Update Flarum to the latest version via composer require + flarum migrate. Streams newline-delimited
        JSON progress events, ending with {"status":"Update completed!","version":"..."} or an {"error":"..."}
        line.
      operationId: flarum_sites_id_update
      tags:
      - Flarum
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/flarum/sites/{id}/cache:
    post:
      summary: Clear the Flarum cache. Returns {"message":"Cache cleared successfully."}.
      operationId: flarum_sites_id_cache
      tags:
      - Flarum
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/matomo/install:
    post:
      summary: Install Matomo on a domain. Streams newline-delimited JSON progress events as the install
        runs (download, extraction, database setup, CLI install).
      operationId: matomo_install
      tags:
      - Matomo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                matomo_version:
                  type: string
                  example: ''
                admin_login:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                matomo_version: ''
                admin_login: admin
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/matomo/sites/{id}:
    delete:
      summary: 'Uninstall Matomo: drops the database and user, deletes every file in the docroot, and
        removes it from Site Manager.'
      operationId: matomo_sites_id
      tags:
      - Matomo
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/matomo/sites/{id}/clone:
    post:
      summary: Clone this Matomo site to another domain (or subdirectory). Requires target_domain and
        source_db; returns a single JSON response.
      operationId: matomo_sites_id_clone
      tags:
      - Matomo
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                source_db:
                  type: string
                  example: matomo_source
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                matomo_version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                source_db: matomo_source
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                matomo_version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/matomo/sites/{id}/update:
    post:
      summary: Update Matomo to the latest version via console core:update. Streams newline-delimited
        JSON progress events, ending with {"status":"Update completed!","version":"..."} or an {"error":"..."}
        line.
      operationId: matomo_sites_id_update
      tags:
      - Matomo
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/matomo/sites/{id}/cache:
    post:
      summary: Clear the Matomo cache. Returns {"message":"Cache cleared successfully."}.
      operationId: matomo_sites_id_cache
      tags:
      - Matomo
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/moodle/install:
    post:
      summary: Install Moodle on a domain. Streams newline-delimited JSON progress events as the install
        runs (download, extraction, database setup, admin/cli/install.php).
      operationId: moodle_install
      tags:
      - Moodle
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                moodle_version:
                  type: string
                  example: ''
                site_name:
                  type: string
                  example: My Moodle Site
                site_shortname:
                  type: string
                  example: moodle
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                moodle_version: ''
                site_name: My Moodle Site
                site_shortname: moodle
                admin_username: admin
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/moodle/sites/{id}:
    delete:
      summary: 'Uninstall Moodle: drops the database and user, deletes every file in the docroot, and
        removes it from Site Manager.'
      operationId: moodle_sites_id
      tags:
      - Moodle
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/moodle/sites/{id}/clone:
    post:
      summary: Clone this Moodle site to another domain (or subdirectory). Requires target_domain and
        source_db; returns a single JSON response.
      operationId: moodle_sites_id_clone
      tags:
      - Moodle
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                source_db:
                  type: string
                  example: moodle_source
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                moodle_version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                source_db: moodle_source
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                moodle_version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/moodle/sites/{id}/update:
    post:
      summary: Update Moodle to the latest version via admin/cli/upgrade.php. Streams newline-delimited
        JSON progress events, ending with {"status":"Update completed!","version":"..."} or an {"error":"..."}
        line.
      operationId: moodle_sites_id_update
      tags:
      - Moodle
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/moodle/sites/{id}/cache:
    post:
      summary: Purge the Moodle caches. Returns {"message":"Caches purged successfully."}.
      operationId: moodle_sites_id_cache
      tags:
      - Moodle
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mediawiki/install:
    post:
      summary: Install MediaWiki on a domain. Streams newline-delimited JSON progress events as the install
        runs (download, extraction, database setup, CLI install).
      operationId: mediawiki_install
      tags:
      - MediaWiki
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                mediawiki_version:
                  type: string
                  example: ''
                site_name:
                  type: string
                  example: My Wiki
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                mediawiki_version: ''
                site_name: My Wiki
                admin_username: admin
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mediawiki/sites/{id}:
    delete:
      summary: 'Uninstall MediaWiki: drops the database and user, deletes every file in the docroot, and
        removes it from Site Manager.'
      operationId: mediawiki_sites_id
      tags:
      - MediaWiki
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mediawiki/sites/{id}/clone:
    post:
      summary: Clone this MediaWiki site to another domain (or subdirectory). source_db is derived automatically
        from the site's LocalSettings.php; only target_domain is required. Returns a single JSON response.
      operationId: mediawiki_sites_id_clone
      tags:
      - MediaWiki
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                mediawiki_version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                mediawiki_version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/mediawiki/sites/{id}/update:
    post:
      summary: Update MediaWiki to the latest version via maintenance/update.php. Streams newline-delimited
        JSON progress events, ending with {"status":"Update completed!","version":"..."} or an {"error":"..."}
        line.
      operationId: mediawiki_sites_id_update
      tags:
      - MediaWiki
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dokuwiki/install:
    post:
      summary: Install DokuWiki on a domain. DokuWiki is a flat-file CMS, so no database fields are needed.
        Streams newline-delimited JSON progress events as the install runs (download, extraction, admin
        account setup).
      operationId: dokuwiki_install
      tags:
      - DokuWiki
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                admin_user:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_full_name:
                  type: string
                  example: Admin User
                site_title:
                  type: string
                  example: My DokuWiki
              example:
                domain_id: '42'
                subdirectory: ''
                admin_email: admin@example.com
                admin_user: admin
                admin_password: changeme
                admin_full_name: Admin User
                site_title: My DokuWiki
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dokuwiki/sites/{id}:
    delete:
      summary: 'Uninstall DokuWiki: deletes every file in the docroot and removes it from Site Manager.'
      operationId: dokuwiki_sites_id
      tags:
      - DokuWiki
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dokuwiki/sites/{id}/clone:
    post:
      summary: Clone this DokuWiki site to another domain (or subdirectory). DokuWiki is a flat-file CMS,
        so no database fields are needed; only target_domain is required. Returns a single JSON response.
      operationId: dokuwiki_sites_id_clone
      tags:
      - DokuWiki
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                subdirectory:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
              example:
                target_domain: clone.example.com
                subdirectory: ''
                admin_email: admin@example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dokuwiki/sites/{id}/update:
    post:
      summary: Update DokuWiki to the latest release. Streams newline-delimited JSON progress events,
        ending with {"status":"Update completed!","version":"..."} (or {"status":"Already running the
        latest version (...)","version":"..."} if already current) or an {"error":"..."} line.
      operationId: dokuwiki_sites_id_update
      tags:
      - DokuWiki
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sofawiki/install:
    post:
      summary: Install SofaWiki on a domain. SofaWiki is a flat-file CMS, so no database fields are needed.
        Streams newline-delimited JSON progress events as the install runs.
      operationId: sofawiki_install
      tags:
      - SofaWiki
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
              example:
                domain_id: '42'
                subdirectory: ''
                admin_email: admin@example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sofawiki/sites/{id}:
    delete:
      summary: 'Uninstall SofaWiki: deletes every file in the docroot and removes it from Site Manager.'
      operationId: sofawiki_sites_id
      tags:
      - SofaWiki
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/sofawiki/sites/{id}/clone:
    post:
      summary: Clone this SofaWiki site to another domain (or subdirectory). SofaWiki is a flat-file CMS,
        so no database fields are needed; only target_domain is required. Returns a single JSON response.
      operationId: sofawiki_sites_id_clone
      tags:
      - SofaWiki
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                subdirectory:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
              example:
                target_domain: clone.example.com
                subdirectory: ''
                admin_email: admin@example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/phpbb/install:
    post:
      summary: Install phpBB on a domain. Streams newline-delimited JSON progress events as the install
        runs (download, extraction, database setup, CLI install).
      operationId: phpbb_install
      tags:
      - phpBB
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                board_name:
                  type: string
                  example: My Board
                board_description:
                  type: string
                  example: A phpBB forum
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
              example:
                domain_id: '42'
                subdirectory: ''
                board_name: My Board
                board_description: A phpBB forum
                admin_username: admin
                admin_password: changeme
                admin_email: admin@example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/phpbb/sites/{id}:
    delete:
      summary: 'Uninstall phpBB: drops the database and user, deletes every file in the docroot, and removes
        it from Site Manager.'
      operationId: phpbb_sites_id
      tags:
      - phpBB
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/phpbb/sites/{id}/clone:
    post:
      summary: Clone this phpBB site to another domain (or subdirectory). source_db is derived automatically
        from the site's config.php; only target_domain is required. Returns a single JSON response.
      operationId: phpbb_sites_id_clone
      tags:
      - phpBB
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/tinyphotogallery/install:
    post:
      summary: 'Install TinyPhotoGallery on a domain: downloads a single index.php file and creates an
        empty photos/ directory next to it. No database, no admin account, no versioning. Streams newline-delimited
        JSON progress events as the install runs.'
      operationId: tinyphotogallery_install
      tags:
      - TinyPhotoGallery
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/tinyphotogallery/sites/{id}:
    delete:
      summary: 'Uninstall TinyPhotoGallery: deletes every file in the docroot and removes it from Site
        Manager.'
      operationId: tinyphotogallery_sites_id
      tags:
      - TinyPhotoGallery
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/tinyfilemanager/install:
    post:
      summary: 'Install TinyFileManager on a domain: downloads a single tinyfilemanager.php file and writes
        the given admin username/password (bcrypt-hashed) directly into its $auth_users array. No database,
        no versioning. Streams newline-delimited JSON progress events as the install runs.'
      operationId: tinyfilemanager_install
      tags:
      - TinyFileManager
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
              example:
                domain_id: '42'
                subdirectory: ''
                admin_username: admin
                admin_password: changeme
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/tinyfilemanager/sites/{id}:
    delete:
      summary: 'Uninstall TinyFileManager: deletes every file in the docroot and removes it from Site
        Manager.'
      operationId: tinyfilemanager_sites_id
      tags:
      - TinyFileManager
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ojs/install:
    post:
      summary: Install Open Journal Systems (OJS) on a domain, downloading the official release package
        (not a GitHub archive - the repo uses submodules a plain archive would omit) and running its CLI
        installer non-interactively. Requires PHP 8.2+; the required 'ftp' PHP extension is installed
        automatically if missing. Streams newline-delimited JSON progress events as the install runs.
      operationId: ojs_install
      tags:
      - OJS
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                subdirectory:
                  type: string
                  example: ''
                ojs_version:
                  type: string
                  example: ''
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                admin_email:
                  type: string
                  example: admin@example.com
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
              example:
                domain_id: '42'
                subdirectory: ''
                ojs_version: ''
                admin_username: admin
                admin_password: changeme
                admin_email: admin@example.com
                db_name: ''
                db_user: ''
                db_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ojs/sites/{id}:
    delete:
      summary: 'Uninstall OJS: drops the database and user, deletes every file, removes the scheduled-tasks
        cron job, and removes it from Site Manager.'
      operationId: ojs_sites_id
      tags:
      - OJS
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ojs/sites/{id}/clone:
    post:
      summary: Clone this OJS site to another domain (or subdirectory). Requires target_domain and source_db;
        returns a single JSON response.
      operationId: ojs_sites_id_clone
      tags:
      - OJS
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_domain:
                  type: string
                  example: clone.example.com
                subdirectory:
                  type: string
                  example: ''
                source_db:
                  type: string
                  example: ojs_source
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
                admin_email:
                  type: string
                  example: admin@example.com
                ojs_version:
                  type: string
                  example: ''
              example:
                target_domain: clone.example.com
                subdirectory: ''
                source_db: ojs_source
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
                admin_email: admin@example.com
                ojs_version: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ojs/sites/{id}/update:
    post:
      summary: Update OJS to the latest version via its own CLI upgrade tool. Streams newline-delimited
        JSON progress events, ending with a completion or error line.
      operationId: ojs_sites_id_update
      tags:
      - OJS
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ojs/sites/{id}/cache:
    post:
      summary: Clear OJS's cache/ directory. Returns {"message":"Caches purged successfully!"}.
      operationId: ojs_sites_id_cache
      tags:
      - OJS
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress:
    get:
      summary: List all WordPress installations.
      operationId: wordpress
      tags:
      - WordPress
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/install:
    post:
      summary: Install WordPress on a domain. Streams newline-delimited JSON progress events as the install
        runs (download, extract, DB setup, wp core install, plugin/theme sets), same as the panel's own
        install page.
      operationId: wordpress_install
      tags:
      - WordPress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                  example: '42'
                admin_email:
                  type: string
                  example: admin@example.com
                website_name:
                  type: string
                  example: My Blog
                site_description:
                  type: string
                  example: My WordPress Blog
                admin_username:
                  type: string
                  example: admin
                admin_password:
                  type: string
                  example: changeme
                wordpress_version:
                  type: string
                  example: latest
                subdirectory:
                  type: string
                  example: ''
                db_name:
                  type: string
                  example: ''
                db_user:
                  type: string
                  example: ''
                db_password:
                  type: string
                  example: ''
                db_prefix:
                  type: string
                  example: wp_
              example:
                domain_id: '42'
                admin_email: admin@example.com
                website_name: My Blog
                site_description: My WordPress Blog
                admin_username: admin
                admin_password: changeme
                wordpress_version: latest
                subdirectory: ''
                db_name: ''
                db_user: ''
                db_password: ''
                db_prefix: wp_
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/clone:
    post:
      summary: Clone an existing WordPress site to another domain (or subdirectory).
      operationId: wordpress_clone
      tags:
      - WordPress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source_domain:
                  type: string
                  example: example.com
                target_domain:
                  type: string
                  example: clone.example.com
                source_db:
                  type: string
                  example: wp_source
                source_folder:
                  type: string
                  example: ''
                subdirectory:
                  type: string
                  example: ''
                target_db:
                  type: string
                  example: ''
                target_db_user:
                  type: string
                  example: ''
                target_db_user_password:
                  type: string
                  example: ''
              example:
                source_domain: example.com
                target_domain: clone.example.com
                source_db: wp_source
                source_folder: ''
                subdirectory: ''
                target_db: ''
                target_db_user: ''
                target_db_user_password: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/scan:
    get:
      summary: Scan the filesystem for WordPress installations not yet tracked by WP Manager and register
        any found. Distinct from POST /api/wordpress/reload, which only refreshes info for installations
        already tracked.
      operationId: wordpress_scan
      tags:
      - WordPress
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/{domain}/backups:
    get:
      summary: List available backups.
      operationId: get_wordpress_domain_backups
      tags:
      - WordPress
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create backup.
      operationId: post_wordpress_domain_backups
      tags:
      - WordPress
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                backup_database:
                  type: boolean
                  example: true
                backup_files:
                  type: boolean
                  example: true
              example:
                backup_database: true
                backup_files: true
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/{domain}/restore:
    post:
      summary: Restore a backup.
      operationId: wordpress_domain_restore
      tags:
      - WordPress
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                backup_date:
                  type: string
                  example: 2025-01-15_12-00-00
              example:
                backup_date: 2025-01-15_12-00-00
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/secure:
    get:
      summary: List available hardening rules.
      operationId: wordpress_secure
      tags:
      - WordPress
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/{domain}/secure:
    get:
      summary: Get active hardening rules.
      operationId: get_wordpress_domain_secure
      tags:
      - WordPress
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Apply/remove hardening rules.
      operationId: put_wordpress_domain_secure
      tags:
      - WordPress
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: string
                    example: wp_manager_xmlrpc
                  example:
                  - wp_manager_xmlrpc
                disable_all:
                  type: boolean
                  example: false
              example:
                rules:
                - wp_manager_xmlrpc
                disable_all: false
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/sites/{id}:
    delete:
      summary: Uninstall WordPress (removes files + DB).
      operationId: wordpress_sites_id
      tags:
      - WordPress
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/sites/{id}/detach:
    post:
      summary: Detach from WordPress Manager (keeps files).
      operationId: wordpress_sites_id_detach
      tags:
      - WordPress
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wordpress/reload:
    post:
      summary: Rescan filesystem to refresh WP data.
      operationId: wordpress_reload
      tags:
      - WordPress
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/wp-cli/{action}:
    post:
      summary: Run a WP-CLI action.
      operationId: wp_cli_action
      tags:
      - WordPress
      parameters:
      - name: action
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  example: example.com
              example:
                domain: example.com
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/pm2/{domain}/logs:
    get:
      summary: Tail app logs.
      operationId: pm2_domain_logs
      tags:
      - Node.js / Python Apps
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: lines
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/pm2/{domain}/start:
    post:
      summary: Start application container.
      operationId: pm2_domain_start
      tags:
      - Node.js / Python Apps
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/pm2/{domain}/stop:
    post:
      summary: Stop application container.
      operationId: pm2_domain_stop
      tags:
      - Node.js / Python Apps
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/pm2/{domain}/restart:
    post:
      summary: Pull latest image and restart.
      operationId: pm2_domain_restart
      tags:
      - Node.js / Python Apps
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/pm2/{domain}:
    patch:
      summary: Update app settings.
      operationId: patch_pm2_domain
      tags:
      - Node.js / Python Apps
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                version:
                  type: string
                  example: '20'
                cpu:
                  type: string
                  example: '1'
                ram:
                  type: string
                  example: '1'
              example:
                version: '20'
                cpu: '1'
                ram: '1'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Delete app and remove from compose.
      operationId: delete_pm2_domain
      tags:
      - Node.js / Python Apps
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/nodejs/install:
    post:
      summary: Install a new Node.js app (form-encoded body; response streams newline-delimited JSON progress
        events).
      operationId: nodejs_install
      tags:
      - App Installer
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                service_name:
                  type: string
                startup_file:
                  type: string
                cpu_limit:
                  type: string
                mem_limit:
                  type: string
                pids_limit:
                  type: integer
                port:
                  type: integer
                subdirectory:
                  type: string
                version:
                  type: string
                  default: latest
                custom_cmd:
                  type: string
                requirements:
                  type: string
                git_repo_url:
                  type: string
                  format: uri
              required:
              - domain_id
              - service_name
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/python/install:
    post:
      summary: Install a new Python app (form-encoded body; response streams newline-delimited JSON progress
        events).
      operationId: python_install
      tags:
      - App Installer
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                service_name:
                  type: string
                startup_file:
                  type: string
                cpu_limit:
                  type: string
                mem_limit:
                  type: string
                pids_limit:
                  type: integer
                port:
                  type: integer
                subdirectory:
                  type: string
                version:
                  type: string
                  default: latest
                custom_cmd:
                  type: string
                requirements:
                  type: string
                git_repo_url:
                  type: string
                  format: uri
              required:
              - domain_id
              - service_name
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/java/install:
    post:
      summary: Install a new Java app (form-encoded body; response streams newline-delimited JSON progress
        events).
      operationId: java_install
      tags:
      - App Installer
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                service_name:
                  type: string
                startup_file:
                  type: string
                cpu_limit:
                  type: string
                mem_limit:
                  type: string
                pids_limit:
                  type: integer
                port:
                  type: integer
                subdirectory:
                  type: string
                version:
                  type: string
                  default: latest
                custom_cmd:
                  type: string
                requirements:
                  type: string
                git_repo_url:
                  type: string
                  format: uri
              required:
              - domain_id
              - service_name
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/ruby/install:
    post:
      summary: Install a new Ruby app (form-encoded body; response streams newline-delimited JSON progress
        events).
      operationId: ruby_install
      tags:
      - App Installer
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                domain_id:
                  type: string
                service_name:
                  type: string
                startup_file:
                  type: string
                cpu_limit:
                  type: string
                mem_limit:
                  type: string
                pids_limit:
                  type: integer
                port:
                  type: integer
                subdirectory:
                  type: string
                version:
                  type: string
                  default: latest
                custom_cmd:
                  type: string
                requirements:
                  type: string
                git_repo_url:
                  type: string
                  format: uri
              required:
              - domain_id
              - service_name
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/docker/tags/{type}:
    get:
      summary: 'Get available Node.js/Python runtime versions (type: nodejs, python).'
      operationId: docker_tags_type
      tags:
      - Helpers
      parameters:
      - name: type
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/helpers/check-file-exists:
    post:
      summary: Check whether a file exists in the app's docroot.
      operationId: helpers_check_file_exists
      tags:
      - Helpers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  example: app.py
              example:
                file: app.py
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/helpers/detect-git-startup-file:
    post:
      summary: Detect a Git repository's startup file.
      operationId: helpers_detect_git_startup_file
      tags:
      - Helpers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                git_repo_url:
                  type: string
                  example: https://github.com/user/repo.git
                app_type:
                  type: string
                  example: nodejs
              example:
                git_repo_url: https://github.com/user/repo.git
                app_type: nodejs
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/endpoints:
    get:
      summary: List every API route registered on this panel.
      operationId: endpoints
      tags:
      - API
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/autoinstaller:
    get:
      summary: List installed apps grouped by technology.
      operationId: autoinstaller
      tags:
      - Auto Installer
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dynamic-dns:
    get:
      summary: List all dynamic DNS entries.
      operationId: get_dynamic_dns
      tags:
      - Dynamic DNS
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Create entry.
      operationId: post_dynamic_dns
      tags:
      - Dynamic DNS
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  example: example.com
                subdomain:
                  type: string
                  example: home
                ip:
                  type: string
                  example: 0.0.0.0
              example:
                domain: example.com
                subdomain: home
                ip: 0.0.0.0
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Update entry.
      operationId: put_dynamic_dns
      tags:
      - Dynamic DNS
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  example: example.com
                line_number:
                  type: integer
                  example: 42
                subdomain:
                  type: string
                  example: home
                ip:
                  type: string
                  example: 1.2.3.4
                token:
                  type: string
                  example: abc123
              example:
                domain: example.com
                line_number: 42
                subdomain: home
                ip: 1.2.3.4
                token: abc123
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Delete entry.
      operationId: delete_dynamic_dns
      tags:
      - Dynamic DNS
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  example: example.com
                line_number:
                  type: integer
                  example: 42
              example:
                domain: example.com
                line_number: 42
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dns:
    get:
      summary: List all domains with zone file status.
      operationId: dns
      tags:
      - DNS Zone Editor
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dns/{domain}:
    get:
      summary: Get parsed DNS records + serial.
      operationId: dns_domain
      tags:
      - DNS Zone Editor
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dns/{domain}/raw:
    get:
      summary: Get raw zone file content.
      operationId: get_dns_domain_raw
      tags:
      - DNS Zone Editor
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Save raw zone file.
      operationId: put_dns_domain_raw
      tags:
      - DNS Zone Editor
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  example: |-
                    $ORIGIN example.com.
                    ...
              example:
                content: |-
                  $ORIGIN example.com.
                  ...
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dns/{domain}/records:
    post:
      summary: Add a DNS record.
      operationId: dns_domain_records
      tags:
      - DNS Zone Editor
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: www
                ttl:
                  type: string
                  example: '3600'
                type:
                  type: string
                  example: A
                record:
                  type: string
                  example: 1.2.3.4
              example:
                name: www
                ttl: '3600'
                type: A
                record: 1.2.3.4
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dns/{domain}/records/{row_id}:
    patch:
      summary: Update a DNS record by line number.
      operationId: patch_dns_domain_records_row_id
      tags:
      - DNS Zone Editor
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: row_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  example: www 3600 IN A 5.6.7.8
                serial:
                  type: string
                  example: '2025010101'
              example:
                content: www 3600 IN A 5.6.7.8
                serial: '2025010101'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    delete:
      summary: Delete a DNS record by line number.
      operationId: delete_dns_domain_records_row_id
      tags:
      - DNS Zone Editor
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      - name: row_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dns/{domain}/reset:
    post:
      summary: Reset zone to default template.
      operationId: dns_domain_reset
      tags:
      - DNS Zone Editor
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dns/{domain}/export:
    get:
      summary: Export zone file content.
      operationId: dns_domain_export
      tags:
      - DNS Zone Editor
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/stats:
    get:
      summary: List domains with stats availability.
      operationId: stats
      tags:
      - Traffic Stats (GoAccess)
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/stats/{domain}:
    get:
      summary: Get GoAccess HTML report for domain.
      operationId: stats_domain
      tags:
      - Traffic Stats (GoAccess)
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/error-logs:
    get:
      summary: List PHP, webserver, database and HTTP 5xx errors.
      description: Newest first, from every PHP version, the active web server and database, application
        containers and 5xx responses in the domain access logs. from and to are days (YYYY-MM-DD, with
        tz as the UTC offset in minutes) or RFC3339 times, without them the newest entries are returned.
        domain is a domain or a subfolder site like example.com/blog and includes its subfolder sites
        unless exact=1. level is warning or error, service is a name from the returned sources, limit
        is 1-5000 (default 500).
      operationId: error_logs
      tags:
      - Error Logs
      parameters:
      - name: from
        in: query
        required: false
        schema:
          type: string
      - name: to
        in: query
        required: false
        schema:
          type: string
      - name: tz
        in: query
        required: false
        schema:
          type: string
      - name: domain
        in: query
        required: false
        schema:
          type: string
      - name: exact
        in: query
        required: false
        schema:
          type: string
      - name: service
        in: query
        required: false
        schema:
          type: string
      - name: level
        in: query
        required: false
        schema:
          type: string
      - name: q
        in: query
        required: false
        schema:
          type: string
      - name: limit
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Unknown service.
        '403':
          description: You do not own this domain.
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/services:
    get:
      summary: List all services with state.
      operationId: services
      tags:
      - System Services
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/services/{service}:
    get:
      summary: Get service status.
      operationId: get_services_service
      tags:
      - System Services
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    post:
      summary: Start/stop service.
      operationId: post_services_service
      tags:
      - System Services
      parameters:
      - name: service
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  example: enable
              example:
                action: enable
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/webmail:
    get:
      summary: Get webmail URL and running status.
      operationId: webmail
      tags:
      - Webmail
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/webmail/{email}:
    post:
      summary: Generate auto-login token for an email account.
      operationId: webmail_email
      tags:
      - Webmail
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/website-builder/{domain}:
    get:
      summary: Get HTML and CSS content.
      operationId: get_website_builder_domain
      tags:
      - Website Builder
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Save HTML and CSS content.
      operationId: put_website_builder_domain
      tags:
      - Website Builder
      parameters:
      - name: domain
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                html:
                  type: string
                  example: <html>...</html>
                css:
                  type: string
                  example: body {}
              example:
                html: <html>...</html>
                css: body {}
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/website-builder:
    post:
      summary: Create new site.
      operationId: website_builder
      tags:
      - Website Builder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_id:
                  type: integer
                  example: 1
                subdirectory:
                  type: string
                  example: ''
              example:
                domain_id: 1
                subdirectory: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/website-builder/sites/{id}:
    delete:
      summary: Remove site (deletes files).
      operationId: website_builder_sites_id
      tags:
      - Website Builder
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/website-builder/sites/{id}/detach:
    post:
      summary: Detach site from manager.
      operationId: website_builder_sites_id_detach
      tags:
      - Website Builder
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dashboard/resource-usage:
    get:
      summary: Get the dashboard's resource usage widget data.
      operationId: dashboard_resource_usage
      tags:
      - Dashboard
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dashboard/disk-inodes:
    get:
      summary: Get the dashboard's disk/inode usage widget data.
      operationId: dashboard_disk_inodes
      tags:
      - Dashboard
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/dashboard/tour/complete:
    post:
      summary: Mark the onboarding tour as completed so it doesn't reappear.
      operationId: dashboard_tour_complete
      tags:
      - Dashboard
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/search/{what}:
    get:
      summary: Search the sidebar entity index (files, folders, features, websites, mysql_databases, mysql_users,
        postgresql_databases, postgresql_users, domains, emails, ftp, containers, services, crons).
      operationId: search_what
      tags:
      - Search
      parameters:
      - name: what
        in: path
        required: true
        schema:
          type: string
      - name: q
        in: query
        required: false
        schema:
          type: string
      - name: folder
        in: query
        required: false
        schema:
          type: string
      - name: ext
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/account/activity:
    get:
      summary: Get the account's activity log, paginated and optionally filtered.
      operationId: account_activity
      tags:
      - Activity Log
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: string
      - name: search
        in: query
        required: false
        schema:
          type: string
      - name: show_all
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backups:
    get:
      summary: Get backup status summary (active target, whether the backup service is running).
      operationId: backups
      tags:
      - Backups
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backups/settings:
    get:
      summary: Get the configured backup schedule/retention settings and active target's values.
      operationId: get_backups_settings
      tags:
      - Backups
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Update backup schedule/retention settings and/or the active target's credentials.
      operationId: put_backups_settings
      tags:
      - Backups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                values:
                  type: object
                  properties:
                    AWS_ACCESS_KEY_ID:
                      type: string
                      example: '...'
                  example:
                    AWS_ACCESS_KEY_ID: '...'
                settings:
                  type: object
                  properties:
                    BACKUP_RETENTION_DAYS:
                      type: string
                      example: '7'
                  example:
                    BACKUP_RETENTION_DAYS: '7'
              example:
                values:
                  AWS_ACCESS_KEY_ID: '...'
                settings:
                  BACKUP_RETENTION_DAYS: '7'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backups/destination:
    get:
      summary: Get the active backup destination and list of available destination types.
      operationId: get_backups_destination
      tags:
      - Backups
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
    put:
      summary: Switch the active backup destination.
      operationId: put_backups_destination
      tags:
      - Backups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target:
                  type: string
                  example: s3
              example:
                target: s3
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backups/list:
    get:
      summary: List backups available at the configured destination. Add ?status=1 to get reindex progress
        instead.
      operationId: backups_list
      tags:
      - Backups
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backups/reindex:
    post:
      summary: Rescan the configured destination in the background so new backups show up in /api/backups/list.
      operationId: backups_reindex
      tags:
      - Backups
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backups/restore:
    post:
      summary: 'Restore from a backup archive. restore_target is all, database (set database), files,
        one part: html, mail, vhosts, dns, crons, or single items in items: paths, mailboxes, domains,
        dns_zones.'
      operationId: backups_restore
      tags:
      - Backups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                backup_file:
                  type: string
                  example: user-2026-08-01T00-00-00.tar.gz
                restore_target:
                  type: string
                  example: all
                database:
                  type: string
                  example: ''
              example:
                backup_file: user-2026-08-01T00-00-00.tar.gz
                restore_target: all
                database: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backups/queue:
    post:
      summary: Add a restore to the account's restore queue, same body as /api/backups/restore. Answers
        right away with the job id, the restore shows on the Restore page with progress; poll /api/backups/jobs
        for the result.
      operationId: backups_queue
      tags:
      - Backups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                backup_file:
                  type: string
                  example: user-2026-08-01T00-00-00.tar.gz
                restore_target:
                  type: string
                  example: all
                database:
                  type: string
                  example: ''
              example:
                backup_file: user-2026-08-01T00-00-00.tar.gz
                restore_target: all
                database: ''
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backups/jobs:
    get:
      summary: List the account's restore queue (queued and running, with live progress) and log (finished
        restores with status, message and step timings).
      operationId: backups_jobs
      tags:
      - Backups
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
  /api/backups/download:
    post:
      summary: Download a backup archive.
      operationId: backups_download
      tags:
      - Backups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                backup_file:
                  type: string
                  example: user-2026-08-01T00-00-00.tar.gz
              example:
                backup_file: user-2026-08-01T00-00-00.tar.gz
      responses:
        '200':
          description: File download.
          content:
            application/gzip:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/Error'
      security:
      - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Obtain a token via `POST /api/login`. Tokens expire after 24 hours.
  responses:
    Error:
      description: An error occurred. See the `error` field for details.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: You do not own this domain
              hint:
                type: string
            required:
            - error
security:
- bearerAuth: []
