{
    "info": {
        "name": "Orchestrator panel API",
        "description": "Set the collection variables baseUrl (your panel, e.g. https://panel.example.com) and token (a personal access token, orch_…). Docs: https://orch.digital/docs/api",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
        "version": "2026.11"
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{token}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://panel.example.com"
        },
        {
            "key": "token",
            "value": "orch_your_token_here"
        }
    ],
    "item": [
        {
            "name": "Sites",
            "description": "Create, list, update and delete sites, and provision them on a server.",
            "item": [
                {
                    "name": "List sites",
                    "request": {
                        "method": "GET",
                        "description": "Returns every site the caller can see, pinned sites first, then newest first. Admins and users with all-sites access get every site; other users get only the sites they were granted. Each site carries its most recent deployment, the cached SSL expiry and the flattened billing state.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get a site",
                    "request": {
                        "method": "GET",
                        "description": "Returns one site with its 20 most recent deployments (newest first).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List all site tags",
                    "request": {
                        "method": "GET",
                        "description": "Returns the distinct tags used across all sites, sorted alphabetically.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/tags",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "tags"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a site",
                    "request": {
                        "method": "POST",
                        "description": "Creates a site record in status \"pending\" with rootPath /var/www/sites/<domain>. Nothing is set up on the server yet: call the provision endpoint next.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Shop\",\n    \"domain\": \"shop.example.com\",\n    \"phpVersion\": \"8.3\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a site",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes the site record (and, by cascade, its deployments, config history and other site-owned rows). With cleanup=true it first runs cleanup.sh on the site's server to remove the vhost, site directory, database and database user.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12"
                            ],
                            "query": [
                                {
                                    "key": "cleanup",
                                    "value": "value",
                                    "description": "Set to \"true\" to remove the site from the server as well. Any other value only deletes the panel record. (only the exact string \"true\" enables cleanup)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "List repository branches",
                    "request": {
                        "method": "GET",
                        "description": "Runs git ls-remote --heads against the site's repository URL and returns the branch names.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/branches",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "branches"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Provision a site",
                    "request": {
                        "method": "POST",
                        "description": "Starts provision.sh on the site's server in the background (directories, MySQL database and user, nginx vhost) and returns immediately. Optionally installs a fresh app of the chosen template afterwards (1-click install). Follow progress with the provision stream.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/provision",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "provision"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"dbName\": \"shop\",\n    \"dbUser\": \"shop\",\n    \"dbPassword\": \"S3cure-pass-2026\",\n    \"template\": \"laravel\",\n    \"installApp\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Stream provisioning log",
                    "request": {
                        "method": "GET",
                        "description": "Server-Sent Events stream of the provisioning output. Replays the buffered output first, then streams new output live and ends with a done event.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/provision/stream",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "provision",
                                "stream"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Update a site",
                    "request": {
                        "method": "PATCH",
                        "description": "Updates site settings: repository, branch, git token, deploy hooks, health check, deploy-time tests, stack, tags, pin, notes, name, and (admin only) domain and enabled state. Only the fields sent are changed. Hook scripts are written to the server immediately when preDeploy or postDeploy is sent.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"branch\": \"main\",\n    \"gitToken\": \"ghp_exampletoken\",\n    \"postDeploy\": \"php artisan optimize\",\n    \"healthCheck\": true,\n    \"healthCheckUrl\": \"https://shop.example.com/up\",\n    \"tags\": [\n        \"client-a\",\n        \"production\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Deployments",
            "description": "Start deploys, follow their logs, roll back and inspect releases.",
            "item": [
                {
                    "name": "Get deploy test statistics",
                    "request": {
                        "method": "GET",
                        "description": "Aggregates the test results of the site's last 30 deployments that ran tests (testResult passed or failed).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/test-stats",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "test-stats"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List undeployed commits",
                    "request": {
                        "method": "GET",
                        "description": "Shows the commits on the site's branch that are newer than the last successful deployment. Makes a temporary blob-less bare clone of the repository (using the site's git token) on the panel host, reads the log and deletes the clone. Read-only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/deploy/pending",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "deploy",
                                "pending"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Deploy a site",
                    "request": {
                        "method": "POST",
                        "description": "Starts a deploy of the site's branch (or of a given ref) in the background and returns the new deployment id. If a deploy or rollback is already running for the site, the request is queued instead and starts automatically about 2 seconds after the current one finishes.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/deploy?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "deploy"
                            ],
                            "query": [
                                {
                                    "key": "skipTests",
                                    "value": "value",
                                    "description": "Set to \"1\" to skip the site's deploy-time tests for this deploy only (emergency override). The site setting is unchanged. (only \"1\" is recognised)",
                                    "disabled": true
                                },
                                {
                                    "key": "ref",
                                    "value": "value",
                                    "description": "Tag, branch or commit to deploy instead of the branch HEAD. (pattern ^[A-Za-z0-9._/\\-]{1,100}$; an invalid value is silently ignored (the branch HEAD is deployed))",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Cancel a stuck deploy",
                    "request": {
                        "method": "POST",
                        "description": "Kills the running deploy process of the site (SIGKILL to the whole process group) if this API process started it; otherwise force-marks the newest \"running\" deployment row as failed and clears the deploy queue.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/deploy/cancel",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "deploy",
                                "cancel"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Stream deploy log",
                    "request": {
                        "method": "GET",
                        "description": "Server-Sent Events stream of the site's current deploy or rollback. Replays the output buffered so far, then streams new output live and ends with a done event carrying the final status.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/deploy/stream",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "deploy",
                                "stream"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List releases",
                    "request": {
                        "method": "GET",
                        "description": "Lists the release directories under <rootPath>/releases on the site's server, newest first, and which one the \"current\" symlink points to. These names are what the rollback endpoint accepts.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/releases",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "releases"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get deploy activity heatmap",
                    "request": {
                        "method": "GET",
                        "description": "Counts the site's deployments per day over the last 52 weeks.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/deployments/heatmap",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "deployments",
                                "heatmap"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Redeploy a site",
                    "request": {
                        "method": "POST",
                        "description": "Starts a new deploy with the site's current repository and branch settings, exactly like POST /api/sites/{id}/deploy without query options, but answers 202. Queues the deploy when one is already running.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/deployments/318/redeploy",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "deployments",
                                "318",
                                "redeploy"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Roll back to a release",
                    "request": {
                        "method": "POST",
                        "description": "Points the site's \"current\" symlink at an earlier release directory and sends queue:restart, in the background. Creates a deployment row (branch \"rollback\", commit = release name) that ends as success or failed; follow it with the deploy stream.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/rollback",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "rollback"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"release\": \"20261120093000\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Push-to-deploy webhook",
            "description": "The endpoint GitHub calls when you push.",
            "item": [
                {
                    "name": "Generate webhook token",
                    "request": {
                        "method": "POST",
                        "description": "Generates a new random webhook token (48 hex characters) for the site, replacing any previous one. The token is both the secret part of the push-to-deploy URL /api/webhooks/github/{token} and the HMAC secret GitHub must sign with.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/webhook-token",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "webhook-token"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Receive a GitHub push",
                    "request": {
                        "method": "POST",
                        "description": "GitHub webhook receiver. A signed push event for the site's configured branch starts a deploy of that site. Ping and other events are acknowledged without deploying.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/webhooks/github/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "webhooks",
                                "github",
                                "3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"ref\": \"refs/heads/main\",\n    \"after\": \"a3f9c21d8e4b5f6a7c8d9e0f1a2b3c4d5e6f7a8b\",\n    \"repository\": {\n        \"full_name\": \"example/shop\",\n        \"clone_url\": \"https://github.com/example/shop.git\",\n        \"ssh_url\": \"git@github.com:example/shop.git\"\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Staging and promote",
            "description": "Clone sites, create staging copies and promote a tested commit to production.",
            "item": [
                {
                    "name": "Clone a site",
                    "request": {
                        "method": "POST",
                        "description": "Creates a new site (status \"pending\") that copies the source site's deploy configuration under a new name and domain. Only the panel record is created; the clone still has to be provisioned and deployed.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/clone",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "clone"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Shop EU\",\n    \"domain\": \"eu.shop.example.com\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Create a staging copy",
                    "request": {
                        "method": "POST",
                        "description": "Creates a staging copy of the site at staging.<domain> (status \"pending\") with the same repository, branch, hooks, stack and server, and stagingOf set to the source site. Only the panel record is created; provision and deploy it with the normal endpoints.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/staging",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "staging"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List staging copies",
                    "request": {
                        "method": "GET",
                        "description": "Lists the staging copies of a production site (sites whose stagingOf is this id), oldest first, each with the commit of its last successful deploy.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/staging-copies",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "staging-copies"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Preview a promote",
                    "request": {
                        "method": "GET",
                        "description": "Called on the STAGING site. Shows what promoting would do: which commit staging is on, what production is on, and any blockers or warnings. Read-only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/promote/preview",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "promote",
                                "preview"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Promote staging to production",
                    "request": {
                        "method": "POST",
                        "description": "Called on the STAGING site. Deploys the production site at exactly the commit staging is on, through the normal deploy pipeline (tests, health check, atomic release switch and auto-rollback apply). Optionally takes a production database backup first. Never queues.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/promote",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "promote"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"backupDb\": true,\n    \"expectedCommit\": \"c81e0b4\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Presets",
            "description": "Reusable deploy settings and applying them to sites.",
            "item": [
                {
                    "name": "List presets",
                    "request": {
                        "method": "GET",
                        "description": "Lists all site presets (reusable bundles of deploy settings), sorted by name.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/presets",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "presets"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get a preset",
                    "request": {
                        "method": "GET",
                        "description": "Returns one preset.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/presets/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "presets",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a preset",
                    "request": {
                        "method": "POST",
                        "description": "Creates a named preset from an explicit settings object.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/presets",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "presets"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Laravel production\",\n    \"description\": \"Optimize after deploy, health check, tests\",\n    \"config\": {\n        \"postDeploy\": \"php artisan optimize\",\n        \"healthCheck\": true,\n        \"healthCheckUrl\": \"https://{{domain}}/up\",\n        \"runTests\": true,\n        \"testFailureMode\": \"block\"\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Create a preset from a site",
                    "request": {
                        "method": "POST",
                        "description": "Creates a preset from a site's current deploy settings (all preset fields, or the chosen subset). The site's own domain inside healthCheckUrl is stored as the {{domain}} placeholder.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/presets/from-site/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "presets",
                                "from-site",
                                "1"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Shop defaults\",\n    \"fields\": [\n        \"postDeploy\",\n        \"healthCheck\",\n        \"healthCheckUrl\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a preset",
                    "request": {
                        "method": "PATCH",
                        "description": "Renames a preset, changes its description, or replaces its whole config. Sites the preset was applied to are not changed.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/presets/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "presets",
                                "1"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"description\": \"Optimize after deploy + health check\",\n    \"config\": {\n        \"postDeploy\": \"php artisan optimize\",\n        \"healthCheck\": true\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a preset",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes a preset. Sites that had it applied keep their settings.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/presets/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "presets",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Preview applying a preset",
                    "request": {
                        "method": "GET",
                        "description": "Shows which of the site's settings applying the preset would change (with old and new values) and which already match. Read-only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/preset-preview/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "preset-preview",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Apply a preset to a site",
                    "request": {
                        "method": "POST",
                        "description": "Copies the preset's settings onto the site; only the columns the preset contains are written. For an active site the deploy hook files are rewritten on the server when the preset contains preDeploy or postDeploy.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/apply-preset",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "apply-preset"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"presetId\": 3\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Configuration files",
            "description": "nginx, .env and PHP-FPM configuration, with version history.",
            "item": [
                {
                    "name": "Get nginx config",
                    "request": {
                        "method": "GET",
                        "description": "Returns the site's nginx vhost from /etc/nginx/sites-available/<domain> on the site's server. When the file does not exist, a default Laravel vhost template is returned instead (nothing is written).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/nginx",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "nginx"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Save nginx config",
                    "request": {
                        "method": "PUT",
                        "description": "Replaces the site's nginx vhost: backs up the current file, writes the new one, makes sure it is enabled, runs nginx -t and reloads nginx. When the test fails the previous config is restored (or the new file removed on a first save). Saved content is recorded in the config history.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/nginx",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "nginx"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"content\": \"server {\\n    listen 80;\\n    server_name shop.example.com;\\n    root /var/www/sites/shop.example.com/current/public;\\n    ...\\n}\\n\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get .env file",
                    "request": {
                        "method": "GET",
                        "description": "Returns the site's <rootPath>/shared/.env from the site's server. When the file does not exist, a Laravel .env template with a freshly generated APP_KEY is returned instead (nothing is written).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/env",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "env"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Save .env file",
                    "request": {
                        "method": "PUT",
                        "description": "Normalises and writes the site's shared .env (after backing up the old file to .env.bak) and stores an encrypted version in the .env history (latest 50 kept). The running app only picks it up after the next deploy.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/env",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "env"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"content\": \"APP_NAME=\\\"shop.example.com\\\"\\nAPP_ENV=production\\nAPP_DEBUG=false\\nAPP_URL=https://shop.example.com\\nDB_DATABASE=shop\\n\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List .env versions",
                    "request": {
                        "method": "GET",
                        "description": "Lists the stored .env versions of the site, newest first (metadata only).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/env/versions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "env",
                                "versions"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get a .env version",
                    "request": {
                        "method": "GET",
                        "description": "Returns the decrypted content of one stored .env version.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/env/versions/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "env",
                                "versions",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Restore a .env version",
                    "request": {
                        "method": "POST",
                        "description": "Writes a stored version back to the site's shared .env. The current file is first saved as a version (\"Before restore\") and copied to .env.bak, so the restore can be undone.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/env/versions/1/restore",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "env",
                                "versions",
                                "1",
                                "restore"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List installed PHP versions",
                    "request": {
                        "method": "GET",
                        "description": "Returns the site's PHP version and the PHP versions installed on the site's server (from /etc/php/<x.y>, update-alternatives, or which php8.0…php8.4).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/php-versions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "php-versions"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Switch PHP version",
                    "request": {
                        "method": "POST",
                        "description": "Switches the site to another installed PHP version: replaces php<old>-fpm.sock with php<new>-fpm.sock in the nginx vhost, tests and reloads nginx, then saves the new version on the site.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/php-version",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "php-version"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"version\": \"8.4\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List nginx config versions",
                    "request": {
                        "method": "GET",
                        "description": "Lists the stored versions of the site's nginx vhost, newest first (metadata only).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/nginx/versions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "nginx",
                                "versions"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get a nginx config version",
                    "request": {
                        "method": "GET",
                        "description": "Returns one stored version of the site's nginx vhost, decrypted.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/nginx/versions/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "nginx",
                                "versions",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Restore a nginx config version",
                    "request": {
                        "method": "POST",
                        "description": "Writes a stored version of the nginx vhost back to the server through the same guarded path as a normal save (nginx -t, revert on failure, reload). The file currently on disk is first added to the history if it is not there yet, so the restore can be undone.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/nginx/versions/1/restore",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "nginx",
                                "versions",
                                "1",
                                "restore"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List PHP-FPM config versions",
                    "request": {
                        "method": "GET",
                        "description": "Lists the stored versions of the site's PHP-FPM pool, newest first (metadata only).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/phpfpm/versions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "phpfpm",
                                "versions"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get a PHP-FPM config version",
                    "request": {
                        "method": "GET",
                        "description": "Returns one stored version of the site's PHP-FPM pool, decrypted.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/phpfpm/versions/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "phpfpm",
                                "versions",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Restore a PHP-FPM config version",
                    "request": {
                        "method": "POST",
                        "description": "Writes a stored version of the PHP-FPM pool back to the server through the same guarded path as a normal save (php-fpm -t, revert on failure, reload). The file currently on disk is first added to the history if it is not there yet, so the restore can be undone.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/phpfpm/versions/1/restore",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "phpfpm",
                                "versions",
                                "1",
                                "restore"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List supervisor config versions",
                    "request": {
                        "method": "GET",
                        "description": "Lists the stored versions of the site's supervisor worker config, newest first (metadata only).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/supervisor/versions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "supervisor",
                                "versions"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get a supervisor config version",
                    "request": {
                        "method": "GET",
                        "description": "Returns one stored version of the site's supervisor worker config, decrypted.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/supervisor/versions/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "supervisor",
                                "versions",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Restore a supervisor config version",
                    "request": {
                        "method": "POST",
                        "description": "Writes a stored version of the supervisor worker config back to the server through the same guarded path as a normal save (supervisorctl reread && update). The file currently on disk is first added to the history if it is not there yet, so the restore can be undone.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/config/supervisor/versions/1/restore",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "config",
                                "supervisor",
                                "versions",
                                "1",
                                "restore"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get PHP-FPM pool config",
                    "request": {
                        "method": "GET",
                        "description": "Returns the site's PHP-FPM pool file /etc/php/<phpVersion>/fpm/pool.d/<domain>.conf from the site's server. When it does not exist, a default pool template is returned with exists=false (nothing is written).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/phpfpm",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "phpfpm"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Save PHP-FPM pool config",
                    "request": {
                        "method": "PUT",
                        "description": "Installs a new PHP-FPM pool file for the site (via sudo install), runs php-fpm<version> -t and reloads php<version>-fpm. A failing syntax test puts the previous file back (or removes the new one). The saved content is recorded in the config history.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/phpfpm",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "phpfpm"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"content\": \"[shop.example.com]\\nuser = www-data\\ngroup = www-data\\nlisten = /run/php/php8.3-fpm-shop.example.com.sock\\npm = dynamic\\npm.max_children = 10\\n\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Workers and scheduler",
            "description": "Supervisor queue workers and the Laravel scheduler.",
            "item": [
                {
                    "name": "Get queue worker config",
                    "request": {
                        "method": "GET",
                        "description": "Returns the site's supervisor config /etc/supervisor/conf.d/<domain>-worker.conf from the site's server. When it does not exist, a default Laravel queue:work template (2 processes, redis) is returned instead (nothing is written).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/supervisor",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "supervisor"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Save queue worker config",
                    "request": {
                        "method": "PUT",
                        "description": "Writes the site's supervisor worker config (creating <rootPath>/shared/logs if needed) and runs supervisorctl reread && supervisorctl update. The saved content is recorded in the config history.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/supervisor",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "supervisor"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"content\": \"[program:shop.example.com-worker]\\ncommand=php8.3 /var/www/sites/shop.example.com/current/artisan queue:work redis --sleep=3 --tries=3 --max-time=3600\\nnumprocs=2\\nstdout_logfile=/var/www/sites/shop.example.com/shared/logs/worker.log\\n\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get queue worker status",
                    "request": {
                        "method": "GET",
                        "description": "Runs supervisorctl status \"<domain>-worker:\" on the site's server and returns the parsed process list.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/supervisor/status",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "supervisor",
                                "status"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Start, stop or restart workers",
                    "request": {
                        "method": "POST",
                        "description": "Runs supervisorctl start|stop|restart on the site's worker group and returns the output and the fresh process status. On start, a missing worker config is first created from the default template.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/supervisor/control",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "supervisor",
                                "control"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"action\": \"restart\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get scheduler cron file",
                    "request": {
                        "method": "GET",
                        "description": "Returns the site's Laravel scheduler cron file /etc/cron.d/<domain with dots replaced by \"-\">-scheduler, whether it exists, and the line the panel would write.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/cron",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "cron"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Enable scheduler cron",
                    "request": {
                        "method": "PUT",
                        "description": "Writes the Laravel scheduler cron file (runs php<version> artisan schedule:run every minute as www-data) on the site's server and sets mode 644.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/cron",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "cron"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Disable scheduler cron",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes the site's Laravel scheduler cron file on the site's server.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/cron",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "cron"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get Laravel scheduler state",
                    "request": {
                        "method": "GET",
                        "description": "Reports whether the site's scheduler cron file exists on the site's server, its path, and the content the panel writes when enabling it.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/scheduler",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "scheduler"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Enable Laravel scheduler",
                    "request": {
                        "method": "PUT",
                        "description": "Installs the scheduler cron file (php<version> artisan schedule:run every minute as www-data) on the site's server via sudo install.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/scheduler",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "scheduler"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Disable Laravel scheduler",
                    "request": {
                        "method": "DELETE",
                        "description": "Removes the scheduler cron file from the site's server via sudo rm -f.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/scheduler",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "scheduler"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Maintenance mode",
            "description": "Take a Laravel site down for maintenance and bring it back.",
            "item": [
                {
                    "name": "Turn maintenance mode on or off",
                    "request": {
                        "method": "POST",
                        "description": "Runs php artisan down (optionally with a bypass secret) or php artisan up in the site's current release on its server, then stores the new maintenanceMode flag.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/maintenance",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "maintenance"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"action\": \"down\",\n    \"secret\": \"team-preview-2026\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get maintenance mode state",
                    "request": {
                        "method": "GET",
                        "description": "Returns the maintenance-mode flag stored in the panel.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/maintenance",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "maintenance"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Artisan and Composer",
            "description": "Run allowed Artisan commands and manage Composer packages.",
            "item": [
                {
                    "name": "List allowed Artisan commands",
                    "request": {
                        "method": "GET",
                        "description": "Returns the fixed allow-list of Artisan commands that POST /artisan/run accepts, with a label, description and group for each. The list is the same for every site.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/artisan/commands",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "artisan",
                                "commands"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Run an Artisan command",
                    "request": {
                        "method": "POST",
                        "description": "Starts php<phpVersion> <rootPath>/current/artisan <command> --no-interaction --ansi in <rootPath>/current on the site's server. Returns immediately; follow the output with GET /api/sites/{id}/artisan/stream.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/artisan/run",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "artisan",
                                "run"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"command\": \"optimize:clear\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Stream Artisan output",
                    "request": {
                        "method": "GET",
                        "description": "Server-Sent Events stream of the site's current Artisan command. Buffered lines are replayed first, then live lines follow until the process exits.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/artisan/stream",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "artisan",
                                "stream"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List outdated Composer packages",
                    "request": {
                        "method": "GET",
                        "description": "Runs composer outdated --format=json in <rootPath>/current with the site's PHP version and returns Composer's package objects unchanged.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/composer/outdated",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "composer",
                                "outdated"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Update Composer packages",
                    "request": {
                        "method": "POST",
                        "description": "Runs composer as www-data in <rootPath>/current: composer update (all packages), composer update <package> -W (one package), or composer require <package>:^<targetVersion> -W for a major upgrade (keeping it in require-dev when it was there). Waits for Composer and returns its combined output.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/composer/update",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "composer",
                                "update"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"package\": \"laravel/framework\",\n    \"targetVersion\": \"12\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get the root package info",
                    "request": {
                        "method": "GET",
                        "description": "Runs composer show --self --format=json in <rootPath>/current and returns the root package's name, description and first listed version.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/composer/info",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "composer",
                                "info"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Queue",
            "description": "Pending and failed queue jobs.",
            "item": [
                {
                    "name": "Get queue counts",
                    "request": {
                        "method": "GET",
                        "description": "Counts rows in the Laravel jobs and failed_jobs tables through artisan tinker. Read-only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/queue/stats",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "queue",
                                "stats"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List failed jobs",
                    "request": {
                        "method": "GET",
                        "description": "Returns the 50 most recent rows of the Laravel failed_jobs table (newest first) through artisan tinker. Falls back to parsing artisan queue:failed text output when tinker fails.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/failed-jobs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "failed-jobs"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Retry a failed job",
                    "request": {
                        "method": "POST",
                        "description": "Runs artisan queue:retry <jobId> on the site's server and returns its output.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/failed-jobs/17/retry",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "failed-jobs",
                                "17",
                                "retry"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Delete a failed job",
                    "request": {
                        "method": "DELETE",
                        "description": "Runs artisan queue:forget <jobId> on the site's server.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/failed-jobs/17",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "failed-jobs",
                                "17"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Delete all failed jobs",
                    "request": {
                        "method": "DELETE",
                        "description": "Runs artisan queue:flush on the site's server, deleting every failed job.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/failed-jobs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "failed-jobs"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Retry all failed jobs",
                    "request": {
                        "method": "POST",
                        "description": "Runs artisan queue:retry all on the site's server and returns its output.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/failed-jobs/retry-all",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "failed-jobs",
                                "retry-all"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "File manager",
            "description": "Read and change files inside a site’s folder.",
            "item": [
                {
                    "name": "List a directory",
                    "request": {
                        "method": "GET",
                        "description": "Lists the entries of a directory inside the site's root path, on the server the site lives on (local host or a remote server over SSH). Directories are always listed first, then entries are sorted by the chosen key. Dotfiles are hidden unless hidden=1.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files"
                            ],
                            "query": [
                                {
                                    "key": "path",
                                    "value": "value",
                                    "description": "Directory relative to the site root. Leading slashes are optional; \"/\" or empty means the site root. (default \"/\"; jailed to the site root)",
                                    "disabled": true
                                },
                                {
                                    "key": "hidden",
                                    "value": "value",
                                    "description": "Set to 1 to include entries whose name starts with a dot. (only the value \"1\" enables it)",
                                    "disabled": true
                                },
                                {
                                    "key": "sort",
                                    "value": "name",
                                    "description": "Sort key. Any other value sorts by name (case-insensitive). (one of: name, size, modified; default name; not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "order",
                                    "value": "asc",
                                    "description": "Sort direction. Any value other than desc is ascending. (one of: asc, desc; default asc; not validated)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Read a file",
                    "request": {
                        "method": "GET",
                        "description": "Returns the content of a file inside the site root for inline viewing or editing. Text types are returned as UTF-8 text; everything else is returned base64-encoded with binary=true. Files larger than 10 MB are refused.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/read?path=value",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "read"
                            ],
                            "query": [
                                {
                                    "key": "path",
                                    "value": "value",
                                    "description": "File path relative to the site root. (jailed to the site root)",
                                    "disabled": false
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Write a file",
                    "request": {
                        "method": "PUT",
                        "description": "Creates or overwrites a text file inside the site root with the given UTF-8 content. Missing parent directories are created.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/write",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "write"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"path\": \"/shared/notes.txt\",\n    \"content\": \"Deployed by the ops team.\\n\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Create a directory",
                    "request": {
                        "method": "POST",
                        "description": "Creates a directory (and any missing parents, like mkdir -p) inside the site root.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/mkdir",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "mkdir"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"path\": \"/shared/storage/exports\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Create an empty file",
                    "request": {
                        "method": "POST",
                        "description": "Creates an empty file inside the site root (parent directories are created). Runs touch, so an existing file is kept and only its modification time is updated.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/touch",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "touch"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"path\": \"/shared/storage/logs/.gitkeep\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete files and directories",
                    "request": {
                        "method": "DELETE",
                        "description": "Recursively deletes each given path (rm -rf) inside the site root and reports a result per path. A path that fails the jail check is reported as failed and the others still run.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/delete",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "delete"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"paths\": [\n        \"/shared/storage/exports/old.csv\",\n        \"/tmp-build\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Rename or move one path",
                    "request": {
                        "method": "POST",
                        "description": "Renames a file or directory (mv), creating the destination's parent directory if needed. Both paths are relative to the site root.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/rename",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "rename"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"from\": \"/shared/notes.txt\",\n    \"to\": \"/shared/docs/notes.txt\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Copy paths into a directory",
                    "request": {
                        "method": "POST",
                        "description": "Recursively copies each path into the destination directory, keeping its base name (cp -r src dest/<basename>).",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/copy",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "copy"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"paths\": [\n        \"/shared/.env\"\n    ],\n    \"dest\": \"/backups\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Move paths into a directory",
                    "request": {
                        "method": "POST",
                        "description": "Moves each path into the destination directory, keeping its base name (mv src dest/<basename>).",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/move",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "move"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"paths\": [\n        \"/shared/storage/exports/report.csv\"\n    ],\n    \"dest\": \"/backups\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Create a zip archive",
                    "request": {
                        "method": "POST",
                        "description": "Runs zip -r from the site root to pack the given paths into the archive at dest, and returns the command output. Paths are stored in the archive relative to the site root.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/zip",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "zip"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"paths\": [\n        \"/shared/storage/app\"\n    ],\n    \"dest\": \"/backups/storage.zip\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Extract a zip archive",
                    "request": {
                        "method": "POST",
                        "description": "Extracts a zip archive into the destination directory (created if missing), overwriting existing files (unzip -o).",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/unzip",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "unzip"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"path\": \"/backups/storage.zip\",\n    \"dest\": \"/restore\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Create a tar.gz archive",
                    "request": {
                        "method": "POST",
                        "description": "Runs tar -czf from the site root to pack the given paths into a gzip-compressed tarball at dest.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/tar",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "tar"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"paths\": [\n        \"/shared\"\n    ],\n    \"dest\": \"/backups/shared.tar.gz\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Extract a tar archive",
                    "request": {
                        "method": "POST",
                        "description": "Extracts a tar archive (tar -xf, compression auto-detected) into the destination directory, which is created if missing.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/untar",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "untar"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"path\": \"/backups/shared.tar.gz\",\n    \"dest\": \"/restore\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Change permissions",
                    "request": {
                        "method": "POST",
                        "description": "Runs chmod with an octal mode on each given path, optionally recursively.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/chmod",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "chmod"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"paths\": [\n        \"/shared/storage\"\n    ],\n    \"mode\": \"775\",\n    \"recursive\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Change owner",
                    "request": {
                        "method": "POST",
                        "description": "Runs chown owner[:group] on each given path, optionally recursively.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/chown",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "chown"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"paths\": [\n        \"/shared/storage\"\n    ],\n    \"owner\": \"www-data\",\n    \"group\": \"www-data\",\n    \"recursive\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Download a file",
                    "request": {
                        "method": "GET",
                        "description": "Streams a single file from the site root as an attachment. Works for any size and type (no 10 MB limit).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/download?path=value",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "download"
                            ],
                            "query": [
                                {
                                    "key": "path",
                                    "value": "value",
                                    "description": "File path relative to the site root. (jailed to the site root)",
                                    "disabled": false
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Download paths as a zip",
                    "request": {
                        "method": "POST",
                        "description": "Builds a temporary zip of the given paths (relative to the site root) in /tmp on the site's server, streams it back as <name>.zip and deletes the temporary file afterwards.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/download-zip",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "download-zip"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"paths\": [\n        \"/shared/storage/app\",\n        \"/shared/.env\"\n    ],\n    \"name\": \"shop-files\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Upload files",
                    "request": {
                        "method": "POST",
                        "description": "Accepts a multipart/form-data request and writes every file part into the destination directory (created if missing), streaming to the site's server. Returns a result per file.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/upload?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "upload"
                            ],
                            "query": [
                                {
                                    "key": "dest",
                                    "value": "value",
                                    "description": "Destination directory relative to the site root. (default \"/\"; jailed to the site root)",
                                    "disabled": true
                                },
                                {
                                    "key": "overwrite",
                                    "value": "overwrite",
                                    "description": "Set to 0 to skip files that already exist; any other value (or omitted) overwrites. (default overwrite; only \"0\" disables it)",
                                    "disabled": true
                                }
                            ]
                        },
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "files",
                                    "type": "file",
                                    "src": []
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Search files",
                    "request": {
                        "method": "GET",
                        "description": "Searches below a directory of the site root, either by file name (case-insensitive substring, find -iname) or by content (grep -rl). Returns at most 100 matches.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/search?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "search"
                            ],
                            "query": [
                                {
                                    "key": "q",
                                    "value": "value",
                                    "description": "Search term. Empty or whitespace-only returns no results.",
                                    "disabled": true
                                },
                                {
                                    "key": "path",
                                    "value": "value",
                                    "description": "Directory to search in, relative to the site root. (default \"/\"; jailed to the site root)",
                                    "disabled": true
                                },
                                {
                                    "key": "type",
                                    "value": "name",
                                    "description": "content searches file contents; any other value searches names. (one of: name, content; default name; not validated)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Diff two files",
                    "request": {
                        "method": "GET",
                        "description": "Returns the unified diff (diff -u) between two files of the site root. An empty string means the files are identical.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/diff?a=value&b=value",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "diff"
                            ],
                            "query": [
                                {
                                    "key": "a",
                                    "value": "value",
                                    "description": "First file, relative to the site root. (jailed to the site root)",
                                    "disabled": false
                                },
                                {
                                    "key": "b",
                                    "value": "value",
                                    "description": "Second file, relative to the site root. (jailed to the site root)",
                                    "disabled": false
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get file properties",
                    "request": {
                        "method": "GET",
                        "description": "Returns the metadata of one file or directory. For directories totalSize is the recursive disk usage in bytes (du -sb); for files it equals size.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/files/properties?path=value",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "files",
                                "properties"
                            ],
                            "query": [
                                {
                                    "key": "path",
                                    "value": "value",
                                    "description": "Path relative to the site root. (jailed to the site root)",
                                    "disabled": false
                                }
                            ]
                        }
                    }
                }
            ]
        },
        {
            "name": "Databases and backups",
            "description": "Databases, users, queries, imports, backups and off-site copies.",
            "item": [
                {
                    "name": "List database backups",
                    "request": {
                        "method": "GET",
                        "description": "Lists the *.sql.gz files in the site's <rootPath>/backups directory on the site's server (local disk or over SSH for remote servers), newest first. createdAt is the file modification time.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backups",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backups"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a database backup",
                    "request": {
                        "method": "POST",
                        "description": "Runs mysqldump for the database named in the site's shared/.env (DB_DATABASE, DB_USERNAME, DB_PASSWORD) and gzips it into <rootPath>/backups/<DB_DATABASE>_<UTC timestamp>.sql.gz on the site's server. The request waits until the dump has finished.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backup",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backup"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Download a database backup",
                    "request": {
                        "method": "GET",
                        "description": "Streams one backup file from <rootPath>/backups as a gzip download. For remote servers the file is streamed over SSH with cat.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backups/shop_db_2026-11-27T03-00-00.sql.gz",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backups",
                                "shop_db_2026-11-27T03-00-00.sql.gz"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Restore a database backup",
                    "request": {
                        "method": "POST",
                        "description": "Destructive: replays a backup file into the site's database (DB_DATABASE from shared/.env) with the site's own DB credentials. Local sites stream the gunzipped file into mysql; remote sites run zcat | mysql on their own host over SSH.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backups/shop_db_2026-11-27T03-00-00.sql.gz/restore",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backups",
                                "shop_db_2026-11-27T03-00-00.sql.gz",
                                "restore"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get the backup schedule",
                    "request": {
                        "method": "GET",
                        "description": "Reads the site's backup cron file (/etc/cron.d/<domain with dots replaced by hyphens>-backup) on the site's server and returns its time. active is false when the file does not exist.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backup-schedule",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backup-schedule"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Set the backup schedule",
                    "request": {
                        "method": "PUT",
                        "description": "Writes /etc/cron.d/<domain-with-hyphens>-backup on the site's server so scripts/backup.sh runs as www-data at the given time and days, logging to /var/log/orchestrator/backup.log. Also syncs the panel scripts to the server first.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backup-schedule",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backup-schedule"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"hour\": 3,\n    \"minute\": 30,\n    \"days\": \"1-5\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Disable scheduled backups",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes the site's backup cron file on its server. Existing backup files are kept.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backup-schedule",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backup-schedule"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Delete a database backup",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes one backup file from <rootPath>/backups on the site's server.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backups/shop_db_2026-11-27T03-00-00.sql.gz",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backups",
                                "shop_db_2026-11-27T03-00-00.sql.gz"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List site databases",
                    "request": {
                        "method": "GET",
                        "description": "Lists the MySQL databases recorded for the site: the primary one (created at provisioning, credentials in shared/.env) first, then secondary ones in creation order. Passwords are never returned.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/databases",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "databases"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a database",
                    "request": {
                        "method": "POST",
                        "description": "Creates a secondary MySQL database and user on the panel host using the MySQL root credentials from Settings, with a generated 28-character password, and grants the user ALL PRIVILEGES on it for both 'localhost' and '127.0.0.1'. The password is stored encrypted and never returned.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/databases",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "databases"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"dbName\": \"shop_reports\",\n    \"dbUser\": \"shop_reports\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Drop a database",
                    "request": {
                        "method": "DELETE",
                        "description": "Destructive: drops a secondary database and its MySQL user (both 'localhost' and '127.0.0.1' hosts) using the MySQL root credentials, then deletes the record. The primary database cannot be deleted.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/databases/2",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "databases",
                                "2"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Run a SQL query",
                    "request": {
                        "method": "POST",
                        "description": "Runs one SQL statement against the database with that database's own credentials (primary: shared/.env; secondary: its stored generated password) and returns up to 1000 rows. Only SELECT, INSERT, UPDATE, DELETE, EXPLAIN, SHOW, DESCRIBE/DESC and WITH statements are accepted.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/databases/2/query",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "databases",
                                "2",
                                "query"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"sql\": \"SELECT id, email FROM users ORDER BY id DESC LIMIT 2\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Import a SQL dump",
                    "request": {
                        "method": "POST",
                        "description": "Imports an uploaded .sql or .sql.gz file into the database with the MySQL root credentials (multipart/form-data upload). The file is buffered to a temp file, piped into mysql (zcat first for .gz), then deleted. The request waits until the import has finished.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/databases/2/import",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "databases",
                                "2",
                                "import"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "file",
                                    "type": "file",
                                    "src": []
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Open phpMyAdmin for a database",
                    "request": {
                        "method": "POST",
                        "description": "Issues a single-use phpMyAdmin sign-on link for one database. The URL carries an opaque token; phpMyAdmin's signon bridge redeems it over a loopback call for the real credentials, so the MySQL password never reaches the browser.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/databases/2/pma-session",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "databases",
                                "2",
                                "pma-session"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Upload a backup to S3",
                    "request": {
                        "method": "POST",
                        "description": "Reads a backup file from the site's <rootPath>/backups (local disk, or over SSH for remote servers) and uploads it to the configured S3/R2 bucket under the key backups/<domain>/<filename>.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backup/s3/shop_db_2026-11-27T03-00-00.sql.gz",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backup",
                                "s3",
                                "shop_db_2026-11-27T03-00-00.sql.gz"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List S3 backups",
                    "request": {
                        "method": "GET",
                        "description": "Lists the objects under backups/<domain>/ in the configured S3/R2 bucket, newest first. When S3 is not configured it returns an empty list with configured: false.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backup/s3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backup",
                                "s3"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Delete an S3 backup",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes one object from the S3/R2 bucket. The key is everything after /s3/ in the URL (a wildcard, slashes included) and must start with this site's prefix backups/<domain>/.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/database/backup/s3/nginx",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "database",
                                "backup",
                                "s3",
                                "nginx"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "SSL",
            "description": "Let’s Encrypt certificates and hostnames.",
            "item": [
                {
                    "name": "Get certificate status",
                    "request": {
                        "method": "GET",
                        "description": "Runs certbot certificates --cert-name <domain> on the site's server and returns the certificate's expiry, issuer and names, plus the site's sslEnabled flag and whether a certbot run is in progress.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/ssl",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "ssl"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Issue a certificate",
                    "request": {
                        "method": "POST",
                        "description": "Starts certbot --nginx for the site's domain (plus www.<domain> when that name resolves in DNS) with --expand, --agree-tos and --redirect. On success the site's sslEnabled flag is set to true.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/ssl",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "ssl"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Force-renew the certificate",
                    "request": {
                        "method": "POST",
                        "description": "Starts certbot renew --cert-name <domain> --force-renewal on the site's server.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/ssl/renew",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "ssl",
                                "renew"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Delete the certificate",
                    "request": {
                        "method": "DELETE",
                        "description": "Runs certbot delete --cert-name <domain> on the site's server (best-effort: failures are ignored) and sets the site's sslEnabled flag to false. The call waits for certbot.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/ssl",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "ssl"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List hostnames and coverage",
                    "request": {
                        "method": "GET",
                        "description": "Lists every hostname of the site's nginx vhost (primary domain first, then vhost order, then names that are only on the certificate) with whether nginx serves it, over HTTPS, with which certificate, whether the certificate covers it and whether it resolves in DNS.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/ssl/hosts",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "ssl",
                                "hosts"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Add a hostname to the certificate",
                    "request": {
                        "method": "POST",
                        "description": "Re-issues the site's certificate (cert name = site domain) with one more hostname via certbot --nginx --cert-name <domain> -d … --redirect. The hostname must already be in a server_name of the site's vhost and resolve in DNS.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/ssl/hosts/add",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "ssl",
                                "hosts",
                                "add"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"host\": \"admin.shop.example.com\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Remove a hostname from the certificate",
                    "request": {
                        "method": "POST",
                        "description": "Re-issues the site's certificate (cert name = site domain) without one hostname via certbot --nginx --cert-name <domain> -d …. The site's main domain cannot be removed.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/ssl/hosts/remove",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "ssl",
                                "hosts",
                                "remove"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"host\": \"admin.shop.example.com\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Stream certbot output",
                    "request": {
                        "method": "GET",
                        "description": "Server-Sent Events stream of the site's current certbot run (issue, renew, host add/remove). Buffered output is replayed first, then live lines follow until certbot exits.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/ssl/stream",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "ssl",
                                "stream"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Logs and errors",
            "description": "Laravel logs and grouped errors.",
            "item": [
                {
                    "name": "Read the Laravel log",
                    "request": {
                        "method": "GET",
                        "description": "Reads the last ~2 MB of <rootPath>/shared/logs/laravel.log (falling back to <rootPath>/current/storage/logs/laravel.log) on the site's server, splits it into entries at each \"[YYYY-MM-DD\" line and returns them newest first, optionally filtered by level and text.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/logs?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "logs"
                            ],
                            "query": [
                                {
                                    "key": "level",
                                    "value": "value",
                                    "description": "Only entries with this level (case-insensitive), e.g. error, warning, info. (exact match against the parsed level; \"unknown\" matches unparseable entries)",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "value",
                                    "description": "Only entries whose message contains this text (case-insensitive).",
                                    "disabled": true
                                },
                                {
                                    "key": "lines",
                                    "value": "500",
                                    "description": "How many of the newest entries to consider. (default 500, max 2000)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Clear the Laravel log",
                    "request": {
                        "method": "DELETE",
                        "description": "Truncates <rootPath>/shared/logs/laravel.log to an empty file on the site's server (or, if that write fails, <rootPath>/current/storage/logs/laravel.log).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/logs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "logs"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List error groups",
                    "request": {
                        "method": "GET",
                        "description": "Lists grouped application errors collected from site logs (up to 200, most recently seen first). Ignored groups are hidden unless ignored=1. unresolved is the total number of unresolved, not-ignored groups.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/log-errors?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "log-errors"
                            ],
                            "query": [
                                {
                                    "key": "siteId",
                                    "value": "1",
                                    "description": "Only groups of this site.",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "value",
                                    "description": "Text contained in message or exceptionClass.",
                                    "disabled": true
                                },
                                {
                                    "key": "resolved",
                                    "value": "0",
                                    "description": "\"0\" = unresolved only, \"1\" = resolved only; anything else = both. Ignored when ignored=1. (one of: 0, 1)",
                                    "disabled": true
                                },
                                {
                                    "key": "ignored",
                                    "value": "1",
                                    "description": "\"1\" = show only ignored (muted) groups; otherwise ignored groups are excluded. (one of: 1)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get an error group",
                    "request": {
                        "method": "GET",
                        "description": "Returns one error group with all stored fields, its site, and the most recent deployment created at or before the group was first seen (introducedBy, best-effort, or null).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/log-errors/88",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "log-errors",
                                "88"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Resolve or ignore an error group",
                    "request": {
                        "method": "PATCH",
                        "description": "Sets the resolved and/or ignored flags of an error group and returns the updated row. Ignored groups are no longer re-surfaced by the collector.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/log-errors/88",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "log-errors",
                                "88"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"resolved\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Dismiss an error group",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes an error group. If the error occurs again, the collector creates a new group.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/log-errors/88",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "log-errors",
                                "88"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Performance and uptime",
            "description": "Laravel Telescope APM and uptime checks.",
            "item": [
                {
                    "name": "Get Laravel APM data",
                    "request": {
                        "method": "GET",
                        "description": "Reads the site's own Laravel Telescope data (telescope_entries) for the last 24 hours with the site's DB credentials from shared/.env: the 15 slowest queries, 15 slowest requests, 15 most recent exceptions and totals. Read-only (SELECT only).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/apm",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "apm"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List uptime status",
                    "request": {
                        "method": "GET",
                        "description": "Returns the latest uptime check for every site whose status is active.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/uptime",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "uptime"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get 24-hour uptime history",
                    "request": {
                        "method": "GET",
                        "description": "Returns the site's uptime checks from the last 24 hours (oldest first, at most 300) and the percentage of them that were up.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/uptime/12/history",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "uptime",
                                "12",
                                "history"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get recent response times",
                    "request": {
                        "method": "GET",
                        "description": "Returns the site's last 20 uptime checks, oldest first, as compact points for a mini chart.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/uptime/12/sparkline",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "uptime",
                                "12",
                                "sparkline"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Turn uptime monitoring on or off",
                    "request": {
                        "method": "PATCH",
                        "description": "Sets the site's uptimeMonitor flag, which controls whether the uptime monitor checks the site.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/uptime/12",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "uptime",
                                "12"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"monitoring\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Status pages and site security",
            "description": "Public status pages, HTTP basic auth and IP rules.",
            "item": [
                {
                    "name": "Get status page settings",
                    "request": {
                        "method": "GET",
                        "description": "Returns whether the site's public status page is enabled, its token and its public URL (<panel_url>/status/<token>, or a relative /status/<token> when panel_url is not set).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/status-page",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "status-page"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Enable or disable the status page",
                    "request": {
                        "method": "POST",
                        "description": "Turns the site's public status page on or off. The first time it is enabled a random 24-hex-character token is generated; the token stays the same afterwards, also when the page is disabled and enabled again.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/status-page",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "status-page"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"enabled\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get site access protection",
                    "request": {
                        "method": "GET",
                        "description": "Returns the site's nginx access protection: HTTP basic auth (username, never the password hash) and the IP allow/deny list.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/security",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "security"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Set site access protection",
                    "request": {
                        "method": "POST",
                        "description": "Merges the given fields onto the current settings, applies them to nginx with scripts/site-security.sh (snippet + htpasswd file under /etc/nginx/orchestrator-security, backed up, checked with nginx -t and rolled back on failure), and stores them only after nginx accepted them.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/security",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "security"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"basicAuth\": true,\n    \"basicUser\": \"preview\",\n    \"basicPassword\": \"a-long-test-password\",\n    \"ipMode\": \"allow\",\n    \"ipList\": [\n        \"203.0.113.10\",\n        \"198.51.100.0/24\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Usage",
            "description": "Disk, database and traffic usage per site.",
            "item": [
                {
                    "name": "Get site resource usage",
                    "request": {
                        "method": "GET",
                        "description": "Returns the stored daily usage measurements of a site (disk, database size, and — when traffic logging is on — requests and bytes sent) and the latest values. Never runs a measurement.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/usage?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "usage"
                            ],
                            "query": [
                                {
                                    "key": "days",
                                    "value": "30",
                                    "description": "How many days of history to return (counting today). (default 30, max 400; values below 1 or non-numeric fall back to 30; decimals are floored)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Measure site usage now",
                    "request": {
                        "method": "POST",
                        "description": "Measures the site now (du of the site folder, database size, and today's traffic from the opt-in traffic log), stores the result for today and returns the same payload as GET /usage. Read-only on the site itself.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/usage/refresh?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "usage",
                                "refresh"
                            ],
                            "query": [
                                {
                                    "key": "days",
                                    "value": "30",
                                    "description": "How many days of history to return (counting today). (default 30, max 400; values below 1 or non-numeric fall back to 30; decimals are floored)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Turn traffic logging on or off",
                    "request": {
                        "method": "PUT",
                        "description": "Switches the site's opt-in traffic access log on or off by editing its nginx vhost through a script that backs up the vhost, checks it with nginx -t and restores it on failure. The flag is stored only after nginx accepted the change. Returns the usage payload for 30 days.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/sites/12/usage/traffic",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "sites",
                                "12",
                                "usage",
                                "traffic"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"enabled\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List usage for all sites",
                    "request": {
                        "method": "GET",
                        "description": "Cross-site overview: for every site, the latest disk and database size and the request and byte totals of the last 30 days (only when traffic logging is on).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/usage/sites",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "usage",
                                "sites"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Servers",
            "description": "Servers the panel manages, over SSH or with the agent.",
            "item": [
                {
                    "name": "List servers",
                    "request": {
                        "method": "GET",
                        "description": "Lists every managed server (the panel host first, then remote servers by creation date) with the number of sites each one hosts. Private keys are never returned.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/servers",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "servers"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Add an SSH server",
                    "request": {
                        "method": "POST",
                        "description": "Registers a remote server reachable over SSH. The private key is encrypted at rest and only a 16-character sha256 checksum is kept for display. Nothing is installed on the server; use POST /api/servers/{id}/prepare for that.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/servers",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "servers"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"web-1\",\n    \"host\": \"web1.example.com\",\n    \"port\": 22,\n    \"sshUser\": \"root\",\n    \"sshKey\": \"-----BEGIN OPENSSH PRIVATE KEY-----\\n…\\n-----END OPENSSH PRIVATE KEY-----\",\n    \"notes\": \"Main shop server\",\n    \"monthlyCostMinor\": 4500,\n    \"costCurrency\": \"GEL\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a server",
                    "request": {
                        "method": "PATCH",
                        "description": "Updates the given fields. For the local (panel host) row only name, notes, monthlyCostMinor and costCurrency are applied; host, port, sshUser and sshKey are silently ignored. A new sshKey resets scriptsSynced to false so the helper scripts are copied again.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/servers/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "servers",
                                "3"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"web-1 (Frankfurt)\",\n    \"notes\": \"Upgraded to 4 GB\",\n    \"monthlyCostMinor\": 6000\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a server",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes a remote server. Its agent connection is dropped and in-memory fleet data is forgotten; related fleet rows (enroll tokens, traffic, alert events, run targets) are removed by cascade.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/servers/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "servers",
                                "3"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Test unsaved SSH settings",
                    "request": {
                        "method": "POST",
                        "description": "Opens an SSH connection with the given (unsaved) settings and runs a short identity probe (uname -sr; id -un), 15-second timeout. Always answers 200: a failed connection is reported as ok:false with the error text.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/servers/test-connection",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "servers",
                                "test-connection"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"host\": \"web1.example.com\",\n    \"port\": 22,\n    \"sshUser\": \"root\",\n    \"sshKey\": \"-----BEGIN OPENSSH PRIVATE KEY-----\\n…\\n-----END OPENSSH PRIVATE KEY-----\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Test a saved server",
                    "request": {
                        "method": "POST",
                        "description": "Runs the identity probe over the saved SSH settings (or locally for the panel host) and updates the server's status (online/offline) and lastSeenAt. A failed probe still answers 200 with ok:false.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/servers/3/test",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "servers",
                                "3",
                                "test"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get live server stats",
                    "request": {
                        "method": "GET",
                        "description": "Reads CPU load, RAM, root disk, swap and uptime: in-process for the panel host, one SSH round-trip (15-second timeout) for a remote server. Updates status/lastSeenAt as a side effect.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/servers/3/health",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "servers",
                                "3",
                                "health"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Bootstrap a server",
                    "request": {
                        "method": "POST",
                        "description": "Copies the panel's helper scripts to the remote server if needed and starts bootstrap-server.sh over SSH, which installs the full LEMP stack (PHP 8.1–8.5 with extensions, nginx, MariaDB, Composer, Supervisor, Certbot, Redis). Answers at once; follow the output with GET /api/servers/{id}/prepare/stream.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/servers/3/prepare",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "servers",
                                "3",
                                "prepare"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Stream bootstrap output",
                    "request": {
                        "method": "GET",
                        "description": "Server-Sent Events of a server bootstrap. Replays the output buffered so far as {\"line\": \"…\"} events, then streams new output, and ends with {\"done\": true, \"status\": \"success\"|\"failed\"}. When no bootstrap is running it replays any buffered output and sends {\"done\": true, \"status\": \"idle\"} immediately.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/servers/3/prepare/stream",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "servers",
                                "3",
                                "prepare",
                                "stream"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Fleet",
            "description": "Live metrics, inventory, logs, actions, alert rules and settings of fleet servers.",
            "item": [
                {
                    "name": "List fleet servers",
                    "request": {
                        "method": "GET",
                        "description": "Lists every server with its fleet state: agent status and version, the channel actions would use right now, permissions, organisation fields, site and open-alert counts and the latest metrics. Also returns the agent version this panel ships.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Add an agent-only server",
                    "request": {
                        "method": "POST",
                        "description": "Creates a remote server without SSH access, to be monitored through the Orchestrator agent only. Generate the install command afterwards with POST /api/fleet/servers/{id}/agent/enroll-token. SSH servers are created with POST /api/servers.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"db-2\",\n    \"location\": \"Frankfurt\",\n    \"groupName\": \"production\",\n    \"tags\": [\n        \"db\"\n    ],\n    \"provider\": \"Hetzner\",\n    \"notes\": \"Replica\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get a fleet server",
                    "request": {
                        "method": "GET",
                        "description": "Returns one server (FleetServer) and the newest known inventory (services, containers, pending updates) from either the agent or an earlier SSH read, without contacting the server.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Update fleet settings",
                    "request": {
                        "method": "PATCH",
                        "description": "Updates organisation fields, channel preference, alerting, maintenance window, agent auto-update and the server's permissions (web terminal, free commands, AI permissions). Granting anything new — turning terminalEnabled or commandsEnabled on, or adding an AI permission the server did not have — requires an active 2FA step-up. Turning things off or removing AI permissions does not.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"groupName\": \"production\",\n    \"tags\": [\n        \"web\",\n        \"php\"\n    ],\n    \"preferredChannel\": \"auto\",\n    \"offlineAlertSecs\": 300,\n    \"maintenanceUntil\": \"2026-11-27T12:00:00.000Z\",\n    \"aiActions\": [\n        \"services\",\n        \"docker\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get metrics history",
                    "request": {
                        "method": "GET",
                        "description": "Returns the stored metric samples of a server over a time range, averaged into at most 400 points. For the panel host the classic monitor samples (serverId null) are included.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/metrics?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "metrics"
                            ],
                            "query": [
                                {
                                    "key": "range",
                                    "value": "1h",
                                    "description": "Time range. (one of: 1h, 6h, 24h, 7d, 30d; default 24h)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get network traffic per day",
                    "request": {
                        "method": "GET",
                        "description": "Returns received/transmitted bytes per day (from the agent's interface counters, panel-local dates) for the last N days, plus totals for this and last calendar month.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/traffic?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "traffic"
                            ],
                            "query": [
                                {
                                    "key": "days",
                                    "value": "62",
                                    "description": "Number of days in the \"days\" list, ending today. (1–400, default 62)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "List top processes",
                    "request": {
                        "method": "GET",
                        "description": "Reads the current top processes live from the server through the agent, SSH or the panel host itself.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/processes?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "processes"
                            ],
                            "query": [
                                {
                                    "key": "sort",
                                    "value": "cpu",
                                    "description": "Sort by CPU or memory. (one of: cpu, mem; default cpu)",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "50",
                                    "description": "Maximum number of processes. (1–100, default 50)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get server inventory",
                    "request": {
                        "method": "GET",
                        "description": "Returns the server's services, failed units, Docker containers, pending package updates and OS facts. Without refresh a cached inventory is returned when it is fresh (agent: any age, SSH: under 60 s); with refresh=1 it is read live.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/inventory?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "inventory"
                            ],
                            "query": [
                                {
                                    "key": "refresh",
                                    "value": "value",
                                    "description": "Force a live read (\"1\" or \"true\"). (max 5 chars)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Run a fixed action",
                    "request": {
                        "method": "POST",
                        "description": "Starts one of the fixed, validated server actions (service control, reboot, package update, Docker container control) as a background run and answers immediately with the run id. Follow it with GET /api/fleet/runs/{id}/stream or GET /api/fleet/runs/{id}. Needs no 2FA step-up and does not depend on the commandsEnabled switch.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/actions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "actions"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"action\": \"service.restart\",\n    \"args\": {\n        \"name\": \"nginx\"\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Stream server logs",
                    "request": {
                        "method": "GET",
                        "description": "Server-Sent Events of a server's journal or a log file under /var/log: {\"line\": \"…\"} per line, then {\"done\": true, \"status\": \"<status>\"} (plus \"error\" when it failed). With follow=1 new lines keep streaming until the client disconnects (closing the connection stops the remote process) or 2 hours pass.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/logs/stream?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "logs",
                                "stream"
                            ],
                            "query": [
                                {
                                    "key": "source",
                                    "value": "journal",
                                    "description": "Where to read from: the systemd journal or a log file. (one of: journal, file; default journal)",
                                    "disabled": true
                                },
                                {
                                    "key": "unit",
                                    "value": "value",
                                    "description": "systemd unit to filter the journal by (source=journal only). (max 128 chars; pattern ^[A-Za-z0-9@:._-]{1,128}$)",
                                    "disabled": true
                                },
                                {
                                    "key": "path",
                                    "value": "value",
                                    "description": "Log file to read (required when source=file). (absolute path under /var/log/, 10–512 chars, characters [A-Za-z0-9._@:+=,~/-], no \"..\", no trailing slash, must be normalised)",
                                    "disabled": true
                                },
                                {
                                    "key": "lines",
                                    "value": "200",
                                    "description": "Number of most recent lines. (1–2000, default 200)",
                                    "disabled": true
                                },
                                {
                                    "key": "follow",
                                    "value": "value",
                                    "description": "Keep streaming new lines (\"1\" or \"true\"). (max 5 chars; \"1\"/\"true\" = on)",
                                    "disabled": true
                                },
                                {
                                    "key": "grep",
                                    "value": "value",
                                    "description": "Only lines containing this text. (max 200 chars, no control characters)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Read server logs",
                    "request": {
                        "method": "GET",
                        "description": "Non-streaming variant for scripts and the AI: reads the last lines of the journal or a log file under /var/log and returns them as JSON. follow is ignored.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/logs?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "logs"
                            ],
                            "query": [
                                {
                                    "key": "source",
                                    "value": "journal",
                                    "description": "Where to read from: the systemd journal or a log file. (one of: journal, file; default journal)",
                                    "disabled": true
                                },
                                {
                                    "key": "unit",
                                    "value": "value",
                                    "description": "systemd unit to filter the journal by (source=journal only). (max 128 chars; pattern ^[A-Za-z0-9@:._-]{1,128}$)",
                                    "disabled": true
                                },
                                {
                                    "key": "path",
                                    "value": "value",
                                    "description": "Log file to read (required when source=file). (absolute path under /var/log/, 10–512 chars, characters [A-Za-z0-9._@:+=,~/-], no \"..\", no trailing slash, must be normalised)",
                                    "disabled": true
                                },
                                {
                                    "key": "lines",
                                    "value": "200",
                                    "description": "Number of most recent lines. (1–2000, default 200)",
                                    "disabled": true
                                },
                                {
                                    "key": "grep",
                                    "value": "value",
                                    "description": "Only lines containing this text. (max 200 chars, no control characters)",
                                    "disabled": true
                                },
                                {
                                    "key": "follow",
                                    "value": "value",
                                    "description": "Accepted but ignored (always one-shot). (max 5 chars)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Create an agent install command",
                    "request": {
                        "method": "POST",
                        "description": "Creates a one-time enrollment token (valid 1 hour) and returns the install command to run as root on the server. Any older unused token of the server is invalidated, and a server without an agent is marked \"pending\".",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/agent/enroll-token",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "agent",
                                "enroll-token"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"mode\": \"control\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Install the agent over SSH",
                    "request": {
                        "method": "POST",
                        "description": "Installs the agent on a server that has SSH access: creates an enrollment token and runs the installer (fetched with curl or wget from this panel) over SSH as a background run (kind \"action\", command \"agent.install mode=<mode>\", timeout 900 s). A non-root SSH user must have passwordless sudo, which is checked first.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/agent/install-ssh",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "agent",
                                "install-ssh"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"mode\": \"control\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update the agent",
                    "request": {
                        "method": "POST",
                        "description": "Asks the connected agent to update itself to the binary this panel ships (download URL and sha256 are sent to the agent) and waits for its answer. Works only for agents in control mode.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/agent/update",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "agent",
                                "update"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Revoke the agent key",
                    "request": {
                        "method": "POST",
                        "description": "Deletes the server's agent key and unused enrollment tokens, disconnects a connected agent and sets the agent status to \"none\". The agent keeps running on the server but can no longer connect until it is enrolled again.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/agent/revoke",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "agent",
                                "revoke"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List fleet alert events",
                    "request": {
                        "method": "GET",
                        "description": "Lists fleet alert events (what fired, on which server, when it cleared), newest first. Alert rules themselves are managed under /api/alerts.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/alerts?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "alerts"
                            ],
                            "query": [
                                {
                                    "key": "active",
                                    "value": "value",
                                    "description": "Only unresolved events (\"1\" or \"true\"). (max 5 chars)",
                                    "disabled": true
                                },
                                {
                                    "key": "serverId",
                                    "value": "1",
                                    "description": "Only events of this server. (minimum 1)",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "100",
                                    "description": "Maximum number of events. (1–500, default 100)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get disk-full forecast",
                    "request": {
                        "method": "GET",
                        "description": "Returns the current usage of each mounted disk and, for the root disk only, the estimated days until it is full from a linear trend over the last 7 days.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/servers/3/forecast",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "servers",
                                "3",
                                "forecast"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Fleet commands and scripts",
            "description": "Commands on many servers, saved scripts and run history.",
            "item": [
                {
                    "name": "Get 2FA step-up state",
                    "request": {
                        "method": "GET",
                        "description": "Tells whether the caller has two-factor authentication enabled and whether the current browser session is elevated (2FA step-up), and until when.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/elevate",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "elevate"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Confirm a 2FA step-up",
                    "request": {
                        "method": "POST",
                        "description": "Verifies a current TOTP code of the caller (the same authenticator as login, ±30 s) and elevates the current browser session for 15 minutes. Elevation is needed for free commands, running and editing saved scripts from the panel, granting server permissions and the fleet terminal.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/elevate",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "elevate"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"code\": \"492039\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Run a command or script",
                    "request": {
                        "method": "POST",
                        "description": "Runs a free shell command or a saved script on 1–50 servers in the background (at most 5 servers at a time) and answers immediately with the run id. Targets that are not allowed are not executed and end as \"denied\" with the reason in their output. From the panel both kinds need an active 2FA step-up; personal access tokens can only run scripts marked aiAllowed.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/runs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "runs"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"kind\": \"script\",\n    \"serverIds\": [\n        12,\n        13\n    ],\n    \"scriptId\": 4\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List runs",
                    "request": {
                        "method": "GET",
                        "description": "Lists runs (actions, commands, scripts, agent installs) newest first with their per-server targets, without output. Page with nextCursor.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/runs?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "runs"
                            ],
                            "query": [
                                {
                                    "key": "limit",
                                    "value": "30",
                                    "description": "Page size. (1–100, default 30)",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "1",
                                    "description": "Return runs with an id lower than this (the nextCursor of the previous page). (minimum 1)",
                                    "disabled": true
                                },
                                {
                                    "key": "serverId",
                                    "value": "1",
                                    "description": "Only runs that targeted this server. (minimum 1)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get a run",
                    "request": {
                        "method": "GET",
                        "description": "Returns one run with each target's status, exit code and output. While the run is executing, unfinished targets show their live output so far.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/runs/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "runs",
                                "3"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Stream run output",
                    "request": {
                        "method": "GET",
                        "description": "Server-Sent Events of a run. First replays what already happened, then streams: {\"serverId\": n, \"chunk\": \"…\"} for output, {\"serverId\": n, \"status\": \"<status>\", \"exitCode\": n|null} on each status change, and finally {\"done\": true}, after which the stream closes.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/runs/3/stream",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "runs",
                                "3",
                                "stream"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Cancel a run",
                    "request": {
                        "method": "POST",
                        "description": "Cancels a run that is still executing: running targets are stopped (the remote process is killed) and pending ones are marked cancelled. Answers ok:true even when the run had already finished.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/runs/3/cancel",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "runs",
                                "3",
                                "cancel"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List saved scripts",
                    "request": {
                        "method": "GET",
                        "description": "Lists all saved scripts by name, including their body.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/scripts",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "scripts"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a saved script",
                    "request": {
                        "method": "POST",
                        "description": "Saves a shell script that can later be run on one or many servers with POST /api/fleet/runs. Needs an active 2FA step-up.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/scripts",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "scripts"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Clear tmp\",\n    \"description\": \"Remove files older than 7 days from /tmp\",\n    \"body\": \"find /tmp -type f -mtime +7 -delete\",\n    \"timeoutSecs\": 300,\n    \"aiAllowed\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a saved script",
                    "request": {
                        "method": "PATCH",
                        "description": "Changes the given fields of a saved script. Needs an active 2FA step-up.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/scripts/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "scripts",
                                "3"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"body\": \"find /tmp -type f -mtime +3 -delete\",\n    \"aiAllowed\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a saved script",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes a saved script. Past runs keep the script id and name. Needs an active 2FA step-up.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/scripts/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "scripts",
                                "3"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Fleet agent",
            "description": "Endpoints the monitoring agent and its installer use.",
            "item": [
                {
                    "name": "Enroll an agent",
                    "request": {
                        "method": "POST",
                        "description": "Called by the agent installer: exchanges a one-time enrollment token (from the panel's install command) for the server's permanent agent key. The token is consumed atomically, any previous agent key of the server stops working and a still-connected agent is disconnected.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/agent/enroll",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "agent",
                                "enroll"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"token\": \"3q2-7wEXAMPLEtokenEXAMPLEtokenEXAMPLE1234\",\n    \"mode\": \"control\",\n    \"hostname\": \"web-1\",\n    \"arch\": \"amd64\",\n    \"version\": \"1.4.0\",\n    \"machineId\": \"5f1c0a8e2b7d4c9a8f3e6d2b1a0c9e8f\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Download the agent installer",
                    "request": {
                        "method": "GET",
                        "description": "Returns the agent installer shell script with this panel's public URL baked in (no secrets). Used as `curl -fsSL https://<panel>/api/fleet/install.sh | sudo bash -s -- --token <token> --mode control|monitor`. When the panel cannot determine its public https URL, it returns a script that prints an error and exits 1.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/install.sh",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "install.sh"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        }
                    }
                },
                {
                    "name": "Download an agent binary",
                    "request": {
                        "method": "GET",
                        "description": "Downloads a prebuilt agent binary or its sha256 checksum file from the panel (strict allowlist of file names). Used by the installer and by agent self-updates.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/fleet/agent/binary/orchestrator-agent-linux-amd64",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "fleet",
                                "agent",
                                "binary",
                                "orchestrator-agent-linux-amd64"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        }
                    }
                }
            ]
        },
        {
            "name": "DigitalOcean",
            "description": "Control the connected DigitalOcean droplet.",
            "item": [
                {
                    "name": "Get droplet status",
                    "request": {
                        "method": "GET",
                        "description": "Tells whether DigitalOcean is configured and returns the selected droplet. Without a token it answers configured:false; with a token but no droplet id it asks for a droplet to be selected.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/status",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "status"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List droplets",
                    "request": {
                        "method": "GET",
                        "description": "Lists the droplets of the DigitalOcean account (first 200), used to pick the droplet the panel controls.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/droplets",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "droplets"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List droplet sizes",
                    "request": {
                        "method": "GET",
                        "description": "Lists the DigitalOcean sizes that are currently available, for the resize picker.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/sizes",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "sizes"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Run a droplet action",
                    "request": {
                        "method": "POST",
                        "description": "Starts a parameterless DigitalOcean droplet action (power, IPv6, backups toggle, root password reset) on the selected droplet. DigitalOcean executes it asynchronously; poll GET /api/server/actions/{id}.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/actions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "actions"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"type\": \"reboot\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List droplet actions",
                    "request": {
                        "method": "GET",
                        "description": "Returns the 30 most recent actions of the selected droplet. Answers an empty array when no droplet is selected.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/actions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "actions"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get a droplet action",
                    "request": {
                        "method": "GET",
                        "description": "Returns one DigitalOcean action by id, to poll long operations such as resize or snapshot.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/actions/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "actions",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Resize the droplet",
                    "request": {
                        "method": "POST",
                        "description": "Starts a resize of the selected droplet to another size; with disk:true the disk is resized too. DigitalOcean requires the droplet to be powered off and reports its own error otherwise.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/resize",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "resize"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"size\": \"s-4vcpu-8gb\",\n    \"disk\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Rename the droplet",
                    "request": {
                        "method": "PATCH",
                        "description": "Renames the selected droplet at DigitalOcean.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/rename",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "rename"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"shop-prod-fra1\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List droplet snapshots",
                    "request": {
                        "method": "GET",
                        "description": "Lists up to 100 snapshots of the selected droplet. Answers an empty array when no droplet is selected.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/snapshots",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "snapshots"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a droplet snapshot",
                    "request": {
                        "method": "POST",
                        "description": "Starts a snapshot of the selected droplet. DigitalOcean runs it asynchronously; poll the returned action.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/snapshots",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "snapshots"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"before-upgrade\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a snapshot",
                    "request": {
                        "method": "DELETE",
                        "description": "Permanently deletes a DigitalOcean snapshot.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/snapshots/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "snapshots",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List droplet backups",
                    "request": {
                        "method": "GET",
                        "description": "Lists up to 100 automatic backups of the selected droplet (read-only; enable or disable backups with POST /api/server/actions). Answers an empty array when no droplet is selected.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/backups",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "backups"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List droplet firewalls",
                    "request": {
                        "method": "GET",
                        "description": "Lists the DigitalOcean cloud firewalls (first 100 of the account) that are attached to the selected droplet. Answers an empty array when no droplet is selected.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/firewalls",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "firewalls"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Add firewall rules",
                    "request": {
                        "method": "POST",
                        "description": "Adds inbound and/or outbound rules to a DigitalOcean cloud firewall. The body is forwarded to DigitalOcean unchanged.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/firewalls/1/rules",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "firewalls",
                                "1",
                                "rules"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"inbound_rules\": [\n        {\n            \"protocol\": \"tcp\",\n            \"ports\": \"8080\",\n            \"sources\": {\n                \"addresses\": [\n                    \"198.51.100.0/24\"\n                ]\n            }\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Remove firewall rules",
                    "request": {
                        "method": "DELETE",
                        "description": "Removes the given inbound and/or outbound rules from a DigitalOcean cloud firewall. Takes a JSON body (the rules to remove), forwarded to DigitalOcean unchanged.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/server/firewalls/1/rules",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "server",
                                "firewalls",
                                "1",
                                "rules"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"inbound_rules\": [\n        {\n            \"protocol\": \"tcp\",\n            \"ports\": \"8080\",\n            \"sources\": {\n                \"addresses\": [\n                    \"198.51.100.0/24\"\n                ]\n            }\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Monitoring",
            "description": "Panel host metrics, services, alert rules and the health check.",
            "item": [
                {
                    "name": "Get panel host stats",
                    "request": {
                        "method": "GET",
                        "description": "Returns a live CPU, RAM, disk, swap and uptime snapshot of the panel host (the machine the API runs on). Sizes are in bytes.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/system",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "system"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get metric history",
                    "request": {
                        "method": "GET",
                        "description": "Returns the stored CPU/RAM/disk percentage samples captured by the metrics monitor for the last N hours, oldest first. Without serverId it returns the panel host's own history.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/history?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "history"
                            ],
                            "query": [
                                {
                                    "key": "hours",
                                    "value": "24",
                                    "description": "Look-back window in hours. (1–168, default 24)",
                                    "disabled": true
                                },
                                {
                                    "key": "serverId",
                                    "value": "1",
                                    "description": "Fleet server id; omit for the panel host (samples with serverId null).",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "List top processes",
                    "request": {
                        "method": "GET",
                        "description": "Returns the panel host's top resource consumers, grouped by command into services (e.g. all php-fpm workers summed as PHP-FPM), sorted by CPU descending.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/processes?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "processes"
                            ],
                            "query": [
                                {
                                    "key": "limit",
                                    "value": "8",
                                    "description": "Number of service groups to return. (1–25, default 8)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get response-time percentiles",
                    "request": {
                        "method": "GET",
                        "description": "For every site with uptime monitoring enabled, computes uptime % and response-time statistics (avg, p50, p95, p99, max in ms) from the stored uptime checks of the last N hours. Sites are sorted by p95, slowest first.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/apm?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "apm"
                            ],
                            "query": [
                                {
                                    "key": "hours",
                                    "value": "24",
                                    "description": "Look-back window in hours. (1–168, default 24)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "List core service status",
                    "request": {
                        "method": "GET",
                        "description": "Reports whether each core service on the panel host is active according to systemctl is-active. The fixed catalogue is nginx, mysql (mysql or mariadb), redis (redis-server or redis), php-fpm (php8.3-fpm, php8.2-fpm or php8.1-fpm) and supervisor.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/services",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "services"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Start, stop or restart a service",
                    "request": {
                        "method": "POST",
                        "description": "Runs systemctl <action> on the panel host for one catalogue service and returns the command output and the service status afterwards. The unit name is the first installed candidate for the key.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/services/nginx/control",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "services",
                                "nginx",
                                "control"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"action\": \"restart\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Stream service logs",
                    "request": {
                        "method": "GET",
                        "description": "Server-Sent Events stream of journalctl -u <unit> -f on the panel host: the last 100 lines, then new lines as they are written, until the client disconnects.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/services/nginx/logs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "services",
                                "nginx",
                                "logs"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get 7-day deploy counts",
                    "request": {
                        "method": "GET",
                        "description": "Returns, for each of the last 7 days including today, the number of successful and failed deployments across all sites, oldest day first.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/stats/history",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "stats",
                                "history"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Check SSL expiry for all sites",
                    "request": {
                        "method": "GET",
                        "description": "Opens a live TLS connection to port 443 of every active site with SSL enabled and reports the certificate's expiry date and days left.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/ssl",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "ssl"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get a site's health score",
                    "request": {
                        "method": "GET",
                        "description": "Computes a 0–100 health score for a site: uptime over the last 24 h (40 points), last deployment status (30: success 30, failed 0, none or other 15), SSL enabled (20) and not in maintenance (10). A billing-suspended or archived site always scores 0 with suspended=true.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/health-score/12",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "health-score",
                                "12"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Stream a site's Laravel log",
                    "request": {
                        "method": "GET",
                        "description": "Server-Sent Events stream of tail -F -n 100 on <rootPath>/current/storage/logs/laravel.log, run on the site's own server (locally or over SSH). Sends the last 100 lines, then follows new output until the client disconnects.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/monitor/logs/12/stream",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "monitor",
                                "logs",
                                "12",
                                "stream"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Check API liveness",
                    "request": {
                        "method": "GET",
                        "description": "Unauthenticated liveness probe. Returns ok with the server's current time whenever the API process is up and serving.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/health",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "health"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        }
                    }
                },
                {
                    "name": "List alert rules",
                    "request": {
                        "method": "GET",
                        "description": "Returns all threshold alert rules (panel host and fleet scopes), oldest first.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/alerts",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "alerts"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create an alert rule",
                    "request": {
                        "method": "POST",
                        "description": "Creates a threshold alert rule. Scope local (the default) watches the panel host and supports cpu, ram, disk and swap only; scopes server, group and all are evaluated by the fleet engine and may also use load, inode and disk_forecast.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/alerts",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "alerts"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"metric\": \"disk\",\n    \"operator\": \"gt\",\n    \"threshold\": 85,\n    \"cooldownMins\": 60,\n    \"scope\": \"server\",\n    \"serverId\": 2,\n    \"durationSecs\": 300\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update an alert rule",
                    "request": {
                        "method": "PATCH",
                        "description": "Partially updates a rule; omitted fields keep their stored values and the merged rule is validated with the same rules as on create. Switching scope clears the fields that do not belong to it (serverId outside server, groupName outside group, durationSecs forced to 0 for local).",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/alerts/2",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "alerts",
                                "2"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"enabled\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete an alert rule",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes an alert rule.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/alerts/2",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "alerts",
                                "2"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Notifications",
            "description": "The notification bell.",
            "item": [
                {
                    "name": "List notifications",
                    "request": {
                        "method": "GET",
                        "description": "Returns the 50 most recent in-app notifications (the bell feed) and the number of unread notifications. The feed is global to the panel: every user sees the same notifications and read state.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/notifications",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notifications"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Mark all notifications read",
                    "request": {
                        "method": "POST",
                        "description": "Marks every unread notification as read. Because the feed is global, this marks them read for all users.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/notifications/read-all",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notifications",
                                "read-all"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Mark a notification read",
                    "request": {
                        "method": "POST",
                        "description": "Marks one notification as read (for all users, as the feed is global).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/notifications/51/read",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notifications",
                                "51",
                                "read"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Delete a notification",
                    "request": {
                        "method": "DELETE",
                        "description": "Removes one notification from the global feed. Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/notifications/51",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notifications",
                                "51"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Clear all notifications",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes every notification in the global feed. Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/notifications",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notifications"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Dashboard",
            "description": "Dashboard layouts and directory helpers.",
            "item": [
                {
                    "name": "Get dashboard layouts",
                    "request": {
                        "method": "GET",
                        "description": "Returns the caller's current (auto-saved) monitoring dashboard layout and their named layout presets. Layouts are private to each user.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/dashboard",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "dashboard"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Save the working layout",
                    "request": {
                        "method": "PUT",
                        "description": "Creates or replaces the caller's current working dashboard layout. The web client calls it, debounced, whenever the layout changes.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/dashboard/auto",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "dashboard",
                                "auto"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"config\": \"[{\\\"id\\\":\\\"metrics-history\\\",\\\"width\\\":\\\"full\\\",\\\"visible\\\":true}]\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Save a named layout preset",
                    "request": {
                        "method": "POST",
                        "description": "Creates a named dashboard layout preset for the caller, or replaces the layout of the caller's existing preset with the same name.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/dashboard/presets",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "dashboard",
                                "presets"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Incident view\",\n    \"config\": \"[{\\\"id\\\":\\\"system-stats\\\",\\\"width\\\":\\\"full\\\",\\\"visible\\\":true}]\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a layout preset",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes one of the caller's named dashboard presets.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/dashboard/presets/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "dashboard",
                                "presets",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List the user directory",
                    "request": {
                        "method": "GET",
                        "description": "Returns a minimal list of all panel users (id, email, role), sorted by email. Available to every role; used for assignee, share and attendee pickers.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/directory",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "directory"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "System",
            "description": "Packages, firewall, reboots, panel updates and the Doctor.",
            "item": [
                {
                    "name": "Get host system info",
                    "request": {
                        "method": "GET",
                        "description": "Read-only snapshot of the panel host: hostname, kernel, OS name, uptime, number of pending apt upgrades (simulated, no changes), whether a reboot is required and the ufw firewall state.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/info",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "info"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Run a maintenance action",
                    "request": {
                        "method": "GET",
                        "description": "Runs one allow-listed, fixed maintenance command on the panel host and streams its output as Server-Sent Events. Commands are spawned with an argument array (no shell) through sudo -n, so passwordless sudo must be granted for them. Nothing the client sends becomes part of the command except the validated ufw target.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/run/nginx/stream?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "run",
                                "nginx",
                                "stream"
                            ],
                            "query": [
                                {
                                    "key": "arg",
                                    "value": "ssh",
                                    "description": "Firewall target; required for ufw-allow and ufw-deny, ignored for other keys. (a port 1–65535 optionally followed by /tcp or /udp (pattern ^\\d{1,5}(/(tcp|udp))?$), or one of: ssh, http, https, ftp, smtp)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "List upgradable packages",
                    "request": {
                        "method": "GET",
                        "description": "Lists the apt packages that have an upgrade available on the panel host (apt list --upgradable, no sudo, no changes), with a count of security updates.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/packages",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "packages"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get the scheduled reboot",
                    "request": {
                        "method": "GET",
                        "description": "Reports whether a reboot or shutdown is pending on the panel host (read from systemd's /run/systemd/shutdown/scheduled, so it also shows one scheduled from a shell), plus the server's current time and timezone.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/reboot-schedule",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "reboot-schedule"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Schedule a reboot",
                    "request": {
                        "method": "POST",
                        "description": "Schedules a reboot of the panel host at the given time with sudo -n shutdown -r +<minutes>, replacing any reboot already pending. The time is rounded up to whole minutes from now.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/reboot-schedule",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "reboot-schedule"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"at\": \"2026-11-28T03:00:00.000Z\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Cancel the scheduled reboot",
                    "request": {
                        "method": "DELETE",
                        "description": "Cancels any pending shutdown or reboot on the panel host with sudo -n shutdown -c.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/reboot-schedule",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "reboot-schedule"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Check schedulers and queue workers",
                    "request": {
                        "method": "GET",
                        "description": "For every active site, reports whether its Laravel scheduler cron is enabled and recently ran, and the state of its supervisor queue workers. Each server is probed once (cron.d listing, the cron journal for the last 20 minutes, supervisorctl status), locally or over SSH. Read-only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/heartbeat",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "heartbeat"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Run the installation doctor",
                    "request": {
                        "method": "GET",
                        "description": "Runs a read-only health check of the panel installation and the host and returns every finding. Checks cover the panel (run user, file ownership, database and backups, git checkout and remote, secrets, restart capability, Node version, agent build), tools, systemd services and nginx -t, system resources (disk, inodes, memory, swap, reboot, NTP, sudo) and local sites. Nothing is changed.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/doctor",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "doctor"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get panel version and update state",
                    "request": {
                        "method": "GET",
                        "description": "Returns the running panel's version (git commit, branch, Node version, boot time), the current self-update state and how the panel can restart itself on this host.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/update/version",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "update",
                                "version"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Check for panel updates",
                    "request": {
                        "method": "POST",
                        "description": "Fetches the current branch from origin (git, as the checkout's owner) and reports how far behind/ahead the checkout is, the incoming commits (up to 50), which sensitive areas they touch and whether an update can run.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/update/check",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "update",
                                "check"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Start a panel self-update",
                    "request": {
                        "method": "POST",
                        "description": "Launches scripts/panel-update.sh, which builds the new version next to the running one, smoke-tests it and only then switches and restarts. The call returns immediately; follow progress with GET /api/system/update/status.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/update/start",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "update",
                                "start"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"force\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get panel update progress",
                    "request": {
                        "method": "GET",
                        "description": "Returns the self-update state, whether an update is in progress and the log of the most recent run (last ~120 KB of .update/update.log). Poll it while an update runs.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/update/status",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "update",
                                "status"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Restart the panel after an update",
                    "request": {
                        "method": "POST",
                        "description": "Finishes an update that stopped at needs_restart by restarting the panel. Only possible when the restart mode is self: the API exits about 300 ms after answering (after waiting for running deployments, max 10 minutes) and systemd starts the new build.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/system/update/restart",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "system",
                                "update",
                                "restart"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Billing: clients",
            "description": "Clients and their portal links.",
            "item": [
                {
                    "name": "List clients",
                    "request": {
                        "method": "GET",
                        "description": "Lists every billing client (archived ones included), ordered by name, with their subscriptions (each including its site), the outstanding balance across their open invoices, and the domains they are billed for.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/clients",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "clients"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a client",
                    "request": {
                        "method": "POST",
                        "description": "Creates a billing client and generates its read-only portal token (48 hex characters).",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/clients",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "clients"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Ada Lovelace\",\n    \"email\": \"ada@example.com\",\n    \"company\": \"Example LLC\",\n    \"currency\": \"GEL\",\n    \"locale\": \"en\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a client",
                    "request": {
                        "method": "PATCH",
                        "description": "Updates a client. The body is passed to the database as-is after removing id and portalToken (use rotate-token to change the portal token). Send archived: true to archive a client.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/clients/5",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "clients",
                                "5"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"phone\": \"+995 555 12 34 56\",\n    \"archived\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a client",
                    "request": {
                        "method": "DELETE",
                        "description": "Permanently deletes a client that has no subscriptions and no invoices. Clients with billing history must be archived instead (PATCH with archived: true).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/clients/5",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "clients",
                                "5"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Rotate client portal token",
                    "request": {
                        "method": "POST",
                        "description": "Generates a new random portal token (24 random bytes, 48 hex characters) for the client, immediately invalidating the old read-only portal link.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/clients/5/rotate-token",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "clients",
                                "5",
                                "rotate-token"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Billing: plans and subscriptions",
            "description": "Plans and per-site subscriptions.",
            "item": [
                {
                    "name": "List plans",
                    "request": {
                        "method": "GET",
                        "description": "Lists all billing plans (archived included), ordered by name.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/plans",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "plans"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a plan",
                    "request": {
                        "method": "POST",
                        "description": "Creates a billing plan: a reusable price, interval, grace period and optional dunning ladder that subscriptions can reference.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/plans",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "plans"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Standard\",\n    \"amount\": \"30.00\",\n    \"currency\": \"GEL\",\n    \"interval\": \"monthly\",\n    \"gracePeriodDays\": 3,\n    \"autoSuspend\": true,\n    \"dunningPolicy\": [\n        {\n            \"offsetDays\": -7,\n            \"action\": \"remind\"\n        },\n        {\n            \"offsetDays\": 0,\n            \"action\": \"invoice_due\"\n        },\n        {\n            \"offsetDays\": 5,\n            \"action\": \"banner\"\n        },\n        {\n            \"offsetDays\": 14,\n            \"action\": \"suspend\"\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a plan",
                    "request": {
                        "method": "PATCH",
                        "description": "Updates a plan. The body is passed to the database as-is (id removed), except that a string amount is parsed from major units and an array dunningPolicy is JSON-stringified. Changing a plan never rewrites existing subscriptions' amount or issued invoices.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/plans/2",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "plans",
                                "2"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": \"35.00\",\n    \"gracePeriodDays\": 5\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get the default dunning ladder",
                    "request": {
                        "method": "GET",
                        "description": "Returns the built-in dunning ladder used when neither the subscription nor its plan defines one.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/default-policy",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "default-policy"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List subscriptions",
                    "request": {
                        "method": "GET",
                        "description": "Lists every subscription (cancelled included), ordered by id, with its site, client and plan.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/subscriptions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "subscriptions"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a subscription",
                    "request": {
                        "method": "POST",
                        "description": "Starts billing a site for a client. Price, currency, interval and grace period come from the body, falling back to the plan. The first invoice is due at startDate (default now) and is issued by the next billing tick. A site can hold only one subscription: if its previous one was cancelled, that row is reactivated in place (same id and invoice history, leftover open invoices voided, enforcement cleared).",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/subscriptions",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "subscriptions"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"siteId\": 7,\n    \"clientId\": 12,\n    \"planId\": 3,\n    \"amount\": \"30.00\",\n    \"currency\": \"GEL\",\n    \"interval\": \"monthly\",\n    \"anchorDay\": 1,\n    \"startDate\": \"2026-12-01\",\n    \"gracePeriodDays\": 3,\n    \"neverAutoSuspend\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a subscription",
                    "request": {
                        "method": "PATCH",
                        "description": "Updates a subscription's billing terms. The body is passed to the database after removing id, siteId and the serving-layer state fields (enforcementLevel, status, suspendedAt, lastEnforcedAt), which only change through enforcement. A string amount is parsed from major units, an array dunningPolicy is JSON-stringified, and startDate / nextInvoiceAt strings are converted to dates.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/subscriptions/7",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "subscriptions",
                                "7"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": \"45.00\",\n    \"neverAutoSuspend\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Cancel a subscription",
                    "request": {
                        "method": "DELETE",
                        "description": "Stops billing a site. Any enforcement on the site is lifted first (always applied, regardless of the master switch), every still-open invoice (open, partial, overdue) is voided, and the subscription is marked cancelled. The row is kept so billing can be re-added later (POST /subscriptions reactivates it).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/subscriptions/7",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "subscriptions",
                                "7"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Preview next dunning step",
                    "request": {
                        "method": "GET",
                        "description": "Read-only \"what happens next\" for one subscription: the oldest unpaid invoice, days overdue, the level the site should be at now and the next ladder step that can actually fire (steps beyond the neverAutoSuspend/autoSuspend cap are skipped).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/subscriptions/7/preview",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "subscriptions",
                                "7",
                                "preview"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List subscription billing events",
                    "request": {
                        "method": "GET",
                        "description": "Returns the newest 100 billing events of a subscription (invoices issued, payments, notifications, enforcement transitions, dry runs, voids, cancellation).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/subscriptions/7/events",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "subscriptions",
                                "7",
                                "events"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Billing: invoices and payments",
            "description": "Invoices, payments and voiding.",
            "item": [
                {
                    "name": "Issue the next invoice now",
                    "request": {
                        "method": "POST",
                        "description": "Issues the invoice for the subscription's current billing period (starting at nextInvoiceAt) immediately and advances the billing anchor to the next period. The invoice number is allocated sequentially per year (INV-<year>-<4-digit seq>) and the invoice is due at the period start.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/subscriptions/7/issue-invoice",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "subscriptions",
                                "7",
                                "issue-invoice"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List invoices",
                    "request": {
                        "method": "GET",
                        "description": "Lists up to 500 invoices, newest first, optionally filtered, with client, site and payments, plus the remaining balance and a formatted amount.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/invoices?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "invoices"
                            ],
                            "query": [
                                {
                                    "key": "status",
                                    "value": "value",
                                    "description": "Exact invoice status. (not validated; draft, open, partial, paid, overdue or void)",
                                    "disabled": true
                                },
                                {
                                    "key": "clientId",
                                    "value": "1",
                                    "description": "Only this client's invoices. (not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "siteId",
                                    "value": "1",
                                    "description": "Only this site's invoices. (not validated)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "List overdue invoices",
                    "request": {
                        "method": "GET",
                        "description": "Lists every open, partial or overdue invoice whose due date has passed, oldest due first, in a compact shape.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/invoices/overdue",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "invoices",
                                "overdue"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Record a payment",
                    "request": {
                        "method": "POST",
                        "description": "Records a manual payment against an invoice; omit amount to settle the full remaining balance. The invoice status is recomputed from the sum of its payments (partial or paid). When the invoice becomes fully paid and nothing else is owed on that subscription, the site is restored immediately (regardless of the master switch) and the subscription returns to active.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/invoices/42/pay",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "invoices",
                                "42",
                                "pay"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": \"20.00\",\n    \"method\": \"bank_transfer\",\n    \"reference\": \"TBC-778812\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Void an invoice",
                    "request": {
                        "method": "POST",
                        "description": "Voids an unpaid invoice that has no payments. If the subscription's billing anchor had already moved past this invoice's period, it is rolled back to the period start so the period is billed again by the next tick.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/invoices/42/void",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "invoices",
                                "42",
                                "void"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Billing: enforcement and reports",
            "description": "The overdue ladder, the daily run, previews and reports.",
            "item": [
                {
                    "name": "Get billing overview",
                    "request": {
                        "method": "GET",
                        "description": "Dashboard totals: master-switch mode, client and subscription counts, monthly recurring revenue, outstanding receivables with an aging breakdown, and how many subscriptions are suspended or past due.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/overview",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "overview"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get enforcement mode",
                    "request": {
                        "method": "GET",
                        "description": "Returns the billing enforcement master switch. Anything other than \"on\" or \"dry_run\" stored in the setting (including no setting) reads as \"off\".",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/enforcement",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "enforcement"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Set enforcement mode",
                    "request": {
                        "method": "PUT",
                        "description": "Sets the billing enforcement master switch (stored in the settings table under the key billing_enforcement). It only gates automatic and manual escalation; restoring a site is always allowed.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/enforcement",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "enforcement"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"mode\": \"dry_run\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Run the billing tick now",
                    "request": {
                        "method": "POST",
                        "description": "Runs the same daily billing tick the scheduler runs, synchronously, and returns its report: issues invoices whose anchor date has arrived, flips past-due invoices to overdue, sends each due dunning notification once, and moves sites up or down the dunning ladder according to the master switch. With dryRun: true nothing is written, sent or applied — the report only describes what a real run would do.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/run-tick",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "run-tick"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"dryRun\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Force an enforcement level",
                    "request": {
                        "method": "POST",
                        "description": "Manually moves one subscription's site to an enforcement level. \"none\" restores the site and is always applied; banner, restrict and suspend go through the same guarded path as the tick and respect the master switch, the neverAutoSuspend cap and running deploys. When applied, the subscription's enforcementLevel, status, suspendedAt and lastEnforcedAt are updated.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/subscriptions/7/enforce",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "subscriptions",
                                "7",
                                "enforce"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"level\": \"banner\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get per-site profitability",
                    "request": {
                        "method": "GET",
                        "description": "For every non-cancelled subscription, compares what the site is billed with its share of the hosting server's monthly cost (server cost divided by ALL sites on that server, billed or not).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/profitability",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "profitability"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get server economics",
                    "request": {
                        "method": "GET",
                        "description": "Read-only report per server: monthly cost, revenue from the billed sites it hosts (per currency), margin in the server's cost currency, revenue per site and the latest CPU/RAM/disk utilisation sample.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/billing/server-economics",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "billing",
                                "server-economics"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Automation",
            "description": "Outgoing webhooks, automation rules and their logs.",
            "item": [
                {
                    "name": "List event and action types",
                    "request": {
                        "method": "GET",
                        "description": "Returns the catalogue of panel event types (for webhook filters and rule triggers) and the supported rule action types.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/event-types",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "event-types"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List outbound webhooks",
                    "request": {
                        "method": "GET",
                        "description": "Lists outbound webhooks, newest first. Secrets are never returned; hasSecret tells whether one is set.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/webhooks",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "webhooks"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create an outbound webhook",
                    "request": {
                        "method": "POST",
                        "description": "Creates an outbound webhook. While active, the panel POSTs every matching event as JSON { event, data, at } with headers x-orchestrator-event and, when a secret is set, x-orchestrator-signature: sha256=<hex HMAC-SHA256 of the raw body>. Inactive by default.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/webhooks",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "webhooks"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Ops channel\",\n    \"url\": \"https://hooks.example.com/orchestrator\",\n    \"secret\": \"example-signing-secret\",\n    \"events\": [\n        \"deploy.failed\",\n        \"billing.suspended\"\n    ],\n    \"active\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update an outbound webhook",
                    "request": {
                        "method": "PATCH",
                        "description": "Updates the given webhook fields only. Sending secret replaces the signing key; an empty string removes it.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/webhooks/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "webhooks",
                                "3"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"active\": false,\n    \"events\": []\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete an outbound webhook",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes a webhook and its delivery log.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/webhooks/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "webhooks",
                                "3"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List webhook deliveries",
                    "request": {
                        "method": "GET",
                        "description": "Returns the newest 50 delivery attempts of a webhook, including test pings.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/webhooks/3/deliveries",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "webhooks",
                                "3",
                                "deliveries"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Send a test delivery",
                    "request": {
                        "method": "POST",
                        "description": "Immediately POSTs a test.ping event to the webhook URL (even if the webhook is inactive), signed like a real delivery, waits up to 10 seconds, logs the attempt and reports the outcome.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/webhooks/3/test",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "webhooks",
                                "3",
                                "test"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List automation rules",
                    "request": {
                        "method": "GET",
                        "description": "Lists automation rules, newest first, with conditions and actionConfig parsed from JSON.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/rules",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "rules"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create an automation rule",
                    "request": {
                        "method": "POST",
                        "description": "Creates a rule that reacts to a panel event: when an event of type trigger is emitted and all conditions match, the action runs. New rules are disabled and in dry-run mode unless enabled/dryRun say otherwise.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/rules",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "rules"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Alert on failed deploys\",\n    \"trigger\": \"deploy.failed\",\n    \"conditions\": [\n        {\n            \"field\": \"domain\",\n            \"op\": \"contains\",\n            \"value\": \"shop\"\n        }\n    ],\n    \"actionType\": \"notify\",\n    \"actionConfig\": {\n        \"title\": \"Deploy failed on {{domain}}\",\n        \"body\": \"Branch {{branch}} at {{commit}}\",\n        \"level\": \"critical\"\n    },\n    \"enabled\": false,\n    \"dryRun\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update an automation rule",
                    "request": {
                        "method": "PATCH",
                        "description": "Updates the given rule fields only (e.g. enable it or switch dry-run off).",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/rules/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "rules",
                                "3"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"enabled\": true,\n    \"dryRun\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete an automation rule",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes a rule and its run log.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/rules/3",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "rules",
                                "3"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List rule runs",
                    "request": {
                        "method": "GET",
                        "description": "Returns the newest 50 evaluations of a rule: whether its conditions matched, whether it was a dry run, and what action was taken.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/automation/rules/3/runs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "automation",
                                "rules",
                                "3",
                                "runs"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "AI assistant",
            "description": "AI configuration, chat, explanations and history.",
            "item": [
                {
                    "name": "Get AI configuration",
                    "request": {
                        "method": "GET",
                        "description": "Returns the AI assistant configuration and today's usage. The API key is never returned; configured tells whether one is stored.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/config",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "config"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Update AI configuration",
                    "request": {
                        "method": "PATCH",
                        "description": "Updates the AI provider settings; only the fields sent are changed. The API key is write-only and stored encrypted.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/config",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "config"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"enabled\": true,\n    \"provider\": \"openai\",\n    \"model\": \"gpt-4o-mini\",\n    \"apiKey\": \"sk-ant-example-key\",\n    \"dailyLimit\": 100\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Test the AI connection",
                    "request": {
                        "method": "POST",
                        "description": "Sends a tiny prompt (\"Reply with the single word: OK\", max 5 tokens) to the configured provider to check connectivity and the API key. The attempt is stored in the AI history as kind test.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/test",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "test"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Chat with the assistant",
                    "request": {
                        "method": "POST",
                        "description": "Asks the read-only assistant a question, optionally grounded in a site's context (PHP version, status, last deploy and up to 5 unresolved errors, redacted). Conversations are stored server-side per user: omit conversationId to start a new one, pass it to continue (the last 8 answered turns are replayed). Secrets and email addresses are redacted before anything is sent to the provider.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/chat",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "chat"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"message\": \"Why is the queue on shop.example.com backing up?\",\n    \"siteId\": 7,\n    \"conversationId\": 31\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List my conversations",
                    "request": {
                        "method": "GET",
                        "description": "Lists the caller's own chat conversations (up to 200), most recently updated first, with the number of stored turns.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/conversations",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "conversations"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get a conversation",
                    "request": {
                        "method": "GET",
                        "description": "Returns one of the caller's conversations with its turns, oldest first (the newest 200 turns at most).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/conversations/14",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "conversations",
                                "14"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Rename a conversation",
                    "request": {
                        "method": "PATCH",
                        "description": "Renames one of the caller's conversations. Whitespace runs are collapsed and the title is trimmed.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/conversations/14",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "conversations",
                                "14"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"title\": \"Queue backlog on shop\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a conversation",
                    "request": {
                        "method": "DELETE",
                        "description": "Removes one of the caller's conversations from the chat list. Its questions and answers stay in the AI history (detached from the conversation).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/conversations/14",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "conversations",
                                "14"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Get stored error explanations",
                    "request": {
                        "method": "GET",
                        "description": "Returns what the AI has already said about a grouped log error — the cached explanation and every stored explanation (newest first, up to 100) — without calling the provider.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/explain-error/14",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "explain-error",
                                "14"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Explain a log error",
                    "request": {
                        "method": "POST",
                        "description": "Asks the AI to explain a grouped log error (level, exception class, count, redacted message and sample line) and caches the answer on the error. Returns the cached explanation without calling the provider unless force=1.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/explain-error/14?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "explain-error",
                                "14"
                            ],
                            "query": [
                                {
                                    "key": "force",
                                    "value": "value",
                                    "description": "Set to 1 to regenerate even when an explanation is cached. (only the exact value \"1\" forces)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get stored deploy diagnoses",
                    "request": {
                        "method": "GET",
                        "description": "Returns the stored AI diagnoses of a deployment (newest first, up to 100) and the latest successful one, without calling the provider.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/explain-deploy/318",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "explain-deploy",
                                "318"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Diagnose a deployment",
                    "request": {
                        "method": "POST",
                        "description": "Asks the AI to diagnose a deployment from the redacted tail of its log (last 6000 chars) plus site, status, branch and commit. Returns the latest stored diagnosis without calling the provider unless force=1.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/explain-deploy/318?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "explain-deploy",
                                "318"
                            ],
                            "query": [
                                {
                                    "key": "force",
                                    "value": "value",
                                    "description": "Set to 1 to diagnose again even when a diagnosis is stored. (only the exact value \"1\" forces)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "List AI history",
                    "request": {
                        "method": "GET",
                        "description": "Lists everything the AI was asked across the panel, by any user, newest first, with cursor pagination. Each item carries a short title and a preview of the answer.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/history?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "history"
                            ],
                            "query": [
                                {
                                    "key": "kind",
                                    "value": "chat",
                                    "description": "Only this kind of interaction. (one of: chat, explain_error, explain_deploy, test)",
                                    "disabled": true
                                },
                                {
                                    "key": "siteId",
                                    "value": "1",
                                    "description": "Only interactions about this site. (digits only; other values are ignored)",
                                    "disabled": true
                                },
                                {
                                    "key": "q",
                                    "value": "value",
                                    "description": "Text search in title, prompt, response, site domain and error. (trimmed, first 200 chars used)",
                                    "disabled": true
                                },
                                {
                                    "key": "logErrorId",
                                    "value": "1",
                                    "description": "Only explanations of this log error. (digits only; other values are ignored)",
                                    "disabled": true
                                },
                                {
                                    "key": "deploymentId",
                                    "value": "1",
                                    "description": "Only diagnoses of this deployment. (digits only; other values are ignored)",
                                    "disabled": true
                                },
                                {
                                    "key": "cursor",
                                    "value": "1",
                                    "description": "nextCursor from the previous page: returns entries with an id lower than this. (digits only; other values are ignored)",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "30",
                                    "description": "Page size. (default 30, min 1, max 100 (clamped))",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get an AI history entry",
                    "request": {
                        "method": "GET",
                        "description": "Returns one stored AI interaction in full (prompt as sent, response or error), plus whether the site, error, deployment and conversation it refers to still exist.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/history/14",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "history",
                                "14"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Delete an AI history entry",
                    "request": {
                        "method": "DELETE",
                        "description": "Permanently deletes one stored AI interaction. Chat entries can only be deleted by the user who asked. Deleting the explanation currently cached on a log error replaces that cache with the newest remaining explanation (or clears it).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/ai/history/14",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "ai",
                                "history",
                                "14"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Telegram",
            "description": "Telegram bot connection and account linking.",
            "item": [
                {
                    "name": "Receive Telegram bot updates",
                    "request": {
                        "method": "POST",
                        "description": "Webhook called by Telegram's Bot API with bot updates (messages and button presses). The secret in the path is the credential. The update is acknowledged immediately and processed in the background by the panel's Telegram bot.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/telegram/webhook/value",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "telegram",
                                "webhook",
                                "value"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"update_id\": 100000001,\n    \"message\": {\n        \"message_id\": 7,\n        \"from\": {\n            \"id\": 555000111,\n            \"username\": \"ada_example\"\n        },\n        \"chat\": {\n            \"id\": 555000111,\n            \"type\": \"private\"\n        },\n        \"date\": 1795773600,\n        \"text\": \"/start 1a2b3c4d\"\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get Telegram link status",
                    "request": {
                        "method": "GET",
                        "description": "Returns whether the caller's Telegram account is linked, and whether the panel's Telegram bot and webhook are configured.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/telegram/me",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "telegram",
                                "me"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a Telegram link code",
                    "request": {
                        "method": "POST",
                        "description": "Issues a one-time code, valid for 10 minutes, that links the caller's panel account to a Telegram account. Open the deep link (or send /start <code> to the bot) in Telegram to complete linking.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/telegram/link-code",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "telegram",
                                "link-code"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Unlink your Telegram account",
                    "request": {
                        "method": "POST",
                        "description": "Detaches the caller's Telegram account and clears any pending link code.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/telegram/unlink",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "telegram",
                                "unlink"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Register the Telegram webhook",
                    "request": {
                        "method": "POST",
                        "description": "Registers the panel's webhook URL with Telegram so the bot receives messages. Generates the webhook secret on first use and reuses it afterwards. Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/telegram/setup",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "telegram",
                                "setup"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Remove the Telegram webhook",
                    "request": {
                        "method": "POST",
                        "description": "Asks Telegram to stop sending updates to the panel (deleteWebhook). Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/telegram/remove-webhook",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "telegram",
                                "remove-webhook"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Authentication",
            "description": "Log in, your profile and two-factor authentication.",
            "item": [
                {
                    "name": "Log in",
                    "request": {
                        "method": "POST",
                        "description": "Checks an email and password and returns a signed session token (JWT). When the account has two-factor authentication enabled and no totpCode is sent, the response is {\"requiresTOTP\": true} instead of a token; repeat the request with the current 6-digit code in totpCode.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/auth/login",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "auth",
                                "login"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"email\": \"ada@example.com\",\n    \"password\": \"correct-horse-battery\",\n    \"totpCode\": \"492817\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get the current user",
                    "request": {
                        "method": "GET",
                        "description": "Returns the account behind the session token or access token used for the request.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/auth/me",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "auth",
                                "me"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Update own preferences",
                    "request": {
                        "method": "PATCH",
                        "description": "Changes the signed-in user's own preferences. Currently only the UI language (locale) can be changed. Any role may call it.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/auth/me",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "auth",
                                "me"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"locale\": \"ka\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Start two-factor setup",
                    "request": {
                        "method": "GET",
                        "description": "Generates a new TOTP secret for the current user and returns it with a QR code to scan in an authenticator app. 2FA is not enabled yet: confirm with POST /api/auth/2fa/enable.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/auth/2fa/setup",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "auth",
                                "2fa",
                                "setup"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Enable two-factor authentication",
                    "request": {
                        "method": "POST",
                        "description": "Verifies a code from the authenticator app against the pending secret created by GET /api/auth/2fa/setup and turns 2FA on. From then on, login requires a TOTP code.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/auth/2fa/enable",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "auth",
                                "2fa",
                                "enable"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"totpCode\": \"492817\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Disable two-factor authentication",
                    "request": {
                        "method": "DELETE",
                        "description": "Turns 2FA off for the current user and deletes the stored TOTP secret. Any active fleet 2FA step-up (elevation) of this user ends immediately.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/auth/2fa",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "auth",
                                "2fa"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Users",
            "description": "Team members, roles and site access.",
            "item": [
                {
                    "name": "List users",
                    "request": {
                        "method": "GET",
                        "description": "Lists every panel user, oldest first. Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/users",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "users"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a user",
                    "request": {
                        "method": "POST",
                        "description": "Creates a panel user with a password and role. Admin only. New non-admin users have no site access until sites are granted with PUT /api/users/{id}/sites or allSitesAccess is turned on.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/users",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "users"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"email\": \"grace@example.com\",\n    \"password\": \"a-long-initial-password\",\n    \"role\": \"developer\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a user",
                    "request": {
                        "method": "PATCH",
                        "description": "Changes a user's email, role or blanket access to all sites. Admin only. Only the fields sent are changed. Admins cannot change their own role.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/users/4",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "users",
                                "4"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"role\": \"viewer\",\n    \"allSitesAccess\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a user",
                    "request": {
                        "method": "DELETE",
                        "description": "Permanently deletes a user. Admin only. You cannot delete your own account or the last remaining admin.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/users/4",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "users",
                                "4"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List a user's site grants",
                    "request": {
                        "method": "GET",
                        "description": "Returns the ids of the sites explicitly granted to a user, plus whether the user has blanket access to all sites. Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/users/4/sites",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "users",
                                "4",
                                "sites"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Replace a user's site grants",
                    "request": {
                        "method": "PUT",
                        "description": "Replaces all explicit site grants of a user with the given list, in one transaction. Admin only. Send an empty array to remove every grant.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/users/4/sites",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "users",
                                "4",
                                "sites"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"siteIds\": [\n        3,\n        7\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Access tokens",
            "description": "Personal access tokens.",
            "item": [
                {
                    "name": "List your access tokens",
                    "request": {
                        "method": "GET",
                        "description": "Lists the caller's own personal access tokens, newest first. The secret token value is never returned; tokenPrefix identifies each token.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/tokens",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tokens"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create an access token",
                    "request": {
                        "method": "POST",
                        "description": "Creates a personal access token for the caller and returns the plaintext token once. The token acts as the caller, with the caller's current role and site access; send it as Authorization: Bearer orch_…",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/tokens",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tokens"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"CI deploys\",\n    \"expiresInDays\": 90\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Revoke an access token",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes one of the caller's own access tokens. It stops working immediately.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/tokens/9",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tokens",
                                "9"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Settings",
            "description": "Panel settings and the weekly digest.",
            "item": [
                {
                    "name": "Get panel settings",
                    "request": {
                        "method": "GET",
                        "description": "Returns the panel-wide settings as a flat key/value object. Admin only. Secret settings are write-only: they come back as \"••••••••\" when set and as an empty string when empty.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/settings",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "settings"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Update panel settings",
                    "request": {
                        "method": "PUT",
                        "description": "Saves one or more panel-wide settings. Admin only. Send only the keys you want to change; each is created or overwritten. Unknown keys are ignored, and the redaction placeholder \"••••••••\" sent for a secret key is ignored so an unchanged secret is never overwritten.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/settings",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "settings"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"panel_url\": \"https://panel.example.com\",\n    \"deploy_telegram_chat_id\": \"-1001234567890\",\n    \"s3_secret_key\": \"••••••••\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Change your password",
                    "request": {
                        "method": "POST",
                        "description": "Changes the caller's own password after checking the current one. Any role may call it.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/settings/change-password",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "settings",
                                "change-password"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"oldPassword\": \"correct-horse-battery\",\n    \"newPassword\": \"a-new-long-password\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get weekly digest settings",
                    "request": {
                        "method": "GET",
                        "description": "Returns the weekly digest configuration and a live preview of the digest for the last 7 days, computed from data already in the database. Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/digest",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "digest"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Update weekly digest settings",
                    "request": {
                        "method": "PATCH",
                        "description": "Turns the weekly digest on or off and sets the weekday it is sent on. Admin only. Only the fields sent are changed.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/digest",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "digest"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"enabled\": true,\n    \"day\": 1\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Send the weekly digest now",
                    "request": {
                        "method": "POST",
                        "description": "Builds the 7-day digest and sends it immediately to every configured notification channel (email, Slack, Discord, Telegram, generic webhook — whichever are set up), and adds it to the in-app notification feed. Admin only. Works whether or not the weekly digest is enabled.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/digest/send-now",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "digest",
                                "send-now"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Audit and AI activity",
            "description": "The audit log and the log of token (AI) requests.",
            "item": [
                {
                    "name": "List audit log entries",
                    "request": {
                        "method": "GET",
                        "description": "Returns audit log entries, newest first, with paging and an optional site filter. Each entry includes the email and role of the user who performed the action.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/audit?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "audit"
                            ],
                            "query": [
                                {
                                    "key": "siteId",
                                    "value": "1",
                                    "description": "Only entries for this site. (not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "50",
                                    "description": "Page size. (default 50, max 200; not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "offset",
                                    "value": "0",
                                    "description": "Number of entries to skip. (default 0; not validated)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "List AI client activity",
                    "request": {
                        "method": "GET",
                        "description": "Lists requests made with personal access tokens (typically MCP/AI clients), newest first, with optional filters, plus a summary of the last 24 hours. Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/mcp-activity?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "mcp-activity"
                            ],
                            "query": [
                                {
                                    "key": "tokenId",
                                    "value": "1",
                                    "description": "Only requests made with this access token. (not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "siteId",
                                    "value": "1",
                                    "description": "Only requests that targeted this site. (not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "tool",
                                    "value": "value",
                                    "description": "Only requests with this exact MCP tool name (from the X-MCP-Tool header). (exact match)",
                                    "disabled": true
                                },
                                {
                                    "key": "type",
                                    "value": "read",
                                    "description": "write = POST/PUT/PATCH/DELETE only; read = GET only. Any other value means no method filter. (one of: read, write)",
                                    "disabled": true
                                },
                                {
                                    "key": "q",
                                    "value": "value",
                                    "description": "Substring to look for in the request path.",
                                    "disabled": true
                                },
                                {
                                    "key": "limit",
                                    "value": "100",
                                    "description": "Maximum number of items. (default 100, min 1, max 500)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "List AI activity filter values",
                    "request": {
                        "method": "GET",
                        "description": "Returns the distinct access tokens and MCP tool names found in the activity log, to populate filter dropdowns. Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/mcp-activity/filters",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "mcp-activity",
                                "filters"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Tasks, notes and calendar",
            "description": "Tasks, notes and calendar events.",
            "item": [
                {
                    "name": "List tasks",
                    "request": {
                        "method": "GET",
                        "description": "Lists Kanban tasks with optional filters, ordered by status and then position. Admins see all tasks; other roles see only tasks they created or are assigned to.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks"
                            ],
                            "query": [
                                {
                                    "key": "siteId",
                                    "value": "1",
                                    "description": "Only tasks linked to this site. (not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "assigneeId",
                                    "value": "1",
                                    "description": "Only tasks assigned to this user. (not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "status",
                                    "value": "value",
                                    "description": "Only tasks in this column. (todo, in_progress, review or done (not validated))",
                                    "disabled": true
                                },
                                {
                                    "key": "mine",
                                    "value": "value",
                                    "description": "Set to 1 to return only tasks assigned to the caller. (only \"1\" has an effect)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get a task",
                    "request": {
                        "method": "GET",
                        "description": "Returns one task with its checklist and comments. Non-admins can only open tasks they created or are assigned to.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks/7",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks",
                                "7"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a task",
                    "request": {
                        "method": "POST",
                        "description": "Creates a task; it is placed at the bottom of its status column. Non-admins may only leave a task unassigned or assign it to themselves.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"title\": \"Renew SSL for shop\",\n    \"description\": \"Check the certificate before Friday.\",\n    \"status\": \"todo\",\n    \"priority\": \"high\",\n    \"dueDate\": \"2026-11-30T00:00:00.000Z\",\n    \"tags\": [\n        \"ssl\",\n        \"shop\"\n    ],\n    \"siteId\": 12,\n    \"assigneeId\": 12\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a task",
                    "request": {
                        "method": "PATCH",
                        "description": "Changes any task fields, including moving it to another column or position. Only the fields sent are changed. Admins can edit any task; others only tasks they created or are assigned to, and they may only unassign it or assign it to themselves.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks/7",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks",
                                "7"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"status\": \"done\",\n    \"position\": 2.5\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a task",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes a task together with its checklist and comments. Only the task's creator or an admin may delete it.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks/7",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks",
                                "7"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Add a checklist item",
                    "request": {
                        "method": "POST",
                        "description": "Appends a checklist item to the end of a task's checklist. Allowed for admins and for the task's creator or assignee.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks/7/checklist",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks",
                                "7",
                                "checklist"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"text\": \"Check expiry date\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a checklist item",
                    "request": {
                        "method": "PATCH",
                        "description": "Changes a checklist item's text, done state or position. Allowed for admins and for the task's creator or assignee.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks/7/checklist/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks",
                                "7",
                                "checklist",
                                "1"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"done\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a checklist item",
                    "request": {
                        "method": "DELETE",
                        "description": "Removes a checklist item. Allowed for admins and for the task's creator or assignee.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks/7/checklist/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks",
                                "7",
                                "checklist",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Comment on a task",
                    "request": {
                        "method": "POST",
                        "description": "Adds a comment by the caller to a task. Allowed for admins and for the task's creator or assignee.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks/7/comments",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks",
                                "7",
                                "comments"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"body\": \"Expires on 2 December.\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a task comment",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes a comment. Users can delete their own comments; admins can delete any comment.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/tasks/7/comments/1",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "tasks",
                                "7",
                                "comments",
                                "1"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "List notes",
                    "request": {
                        "method": "GET",
                        "description": "Lists every note the caller can see — their own, notes shared with them and public notes — pinned first, then most recently updated. Each note carries a canEdit flag for the caller.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/notes?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notes"
                            ],
                            "query": [
                                {
                                    "key": "search",
                                    "value": "value",
                                    "description": "Substring to look for in title or body.",
                                    "disabled": true
                                },
                                {
                                    "key": "tag",
                                    "value": "value",
                                    "description": "Only notes that have exactly this tag. (exact match)",
                                    "disabled": true
                                },
                                {
                                    "key": "pinned",
                                    "value": "value",
                                    "description": "Set to 1 to return only pinned notes. (only \"1\" has an effect)",
                                    "disabled": true
                                },
                                {
                                    "key": "siteId",
                                    "value": "1",
                                    "description": "Only notes linked to this site. (not validated)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get a note",
                    "request": {
                        "method": "GET",
                        "description": "Returns one note if the caller owns it, it is shared with them, or it is public.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/notes/6",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notes",
                                "6"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a note",
                    "request": {
                        "method": "POST",
                        "description": "Creates a note owned by the caller.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/notes",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notes"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"title\": \"Shop deploy checklist\",\n    \"body\": \"1. Run migrations\\n2. Clear cache\",\n    \"tags\": [\n        \"runbook\"\n    ],\n    \"pinned\": true,\n    \"isPublic\": false,\n    \"siteId\": 12\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a note",
                    "request": {
                        "method": "PATCH",
                        "description": "Changes a note. Allowed for the owner and for users the note is shared with edit rights. Only the fields sent are changed; only the owner can change isPublic.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/notes/6",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notes",
                                "6"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"body\": \"1. Run migrations\\n2. Clear cache\\n3. Warm up\",\n    \"pinned\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a note",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes a note and its shares. Only the owner may delete it.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/notes/6",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notes",
                                "6"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Replace a note's shares",
                    "request": {
                        "method": "PUT",
                        "description": "Replaces the full list of users a note is shared with, and whether each may edit it. Only the owner may manage sharing. Send an empty array to stop sharing.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/notes/6/shares",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "notes",
                                "6",
                                "shares"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"shares\": [\n        {\n            \"userId\": 12,\n            \"canEdit\": true\n        },\n        {\n            \"userId\": 15\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List calendar entries",
                    "request": {
                        "method": "GET",
                        "description": "Returns the calendar entries in a date range: stored events (recurring ones expanded into individual occurrences) followed by virtual entries for task due dates. Every user sees all stored events; non-admins see only due dates of their own tasks (created or assigned).",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/calendar/events?",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "calendar",
                                "events"
                            ],
                            "query": [
                                {
                                    "key": "start",
                                    "value": "now",
                                    "description": "Range start (ISO 8601 date-time). (default now − 30 days; not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "end",
                                    "value": "now",
                                    "description": "Range end (ISO 8601 date-time). (default now + 60 days; not validated)",
                                    "disabled": true
                                },
                                {
                                    "key": "siteId",
                                    "value": "1",
                                    "description": "Only events and task due dates linked to this site. (not validated)",
                                    "disabled": true
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Get a calendar event",
                    "request": {
                        "method": "GET",
                        "description": "Returns one stored calendar event as saved (not expanded for recurrence). Available to every role.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/calendar/events/8",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "calendar",
                                "events",
                                "8"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a calendar event",
                    "request": {
                        "method": "POST",
                        "description": "Creates a calendar event, optionally recurring, linked to a site or task, and with attendees. Admin only.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/calendar/events",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "calendar",
                                "events"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"title\": \"Monthly maintenance\",\n    \"description\": \"Patch the server.\",\n    \"type\": \"maintenance\",\n    \"startAt\": \"2026-12-01T02:00:00.000Z\",\n    \"endAt\": \"2026-12-01T03:00:00.000Z\",\n    \"allDay\": false,\n    \"color\": \"#5c6ac4\",\n    \"recurrence\": \"monthly\",\n    \"reminderMins\": 30,\n    \"siteId\": 12,\n    \"attendeeIds\": [\n        12\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Update a calendar event",
                    "request": {
                        "method": "PATCH",
                        "description": "Changes a calendar event. Only the fields sent are changed; attendeeIds, when sent, replaces the whole attendee list. Admin only.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/calendar/events/8",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "calendar",
                                "events",
                                "8"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"startAt\": \"2026-12-02T02:00:00.000Z\",\n    \"endAt\": \"2026-12-02T03:00:00.000Z\",\n    \"attendeeIds\": [\n        12,\n        15\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Delete a calendar event",
                    "request": {
                        "method": "DELETE",
                        "description": "Deletes a calendar event with all its occurrences and attendees. Admin only.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/calendar/events/8",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "calendar",
                                "events",
                                "8"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Public",
            "description": "Endpoints that need no login: health, status pages and the client portal.",
            "item": [
                {
                    "name": "Get a public status page",
                    "request": {
                        "method": "GET",
                        "description": "Unauthenticated status-page data for one site, found by its status page token (the page must be enabled). Covers the last 90 days of uptime checks: current state, overall uptime %, average response time, per-day uptime and the last 10 incidents.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/public/status/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "public",
                                "status",
                                "3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        }
                    }
                },
                {
                    "name": "Get the client portal",
                    "request": {
                        "method": "GET",
                        "description": "Read-only billing portal for one client, found by the client's portal token. Returns the client's name and currency, their active sites with uptime, the outstanding balance and their invoices (latest 50, without drafts and voided ones) with payments. Amounts are integers in minor units (e.g. tetri, cents) plus formatted strings.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/portal/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "portal",
                                "3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        }
                    }
                },
                {
                    "name": "Send a support request",
                    "request": {
                        "method": "POST",
                        "description": "Lets a client send a support message from the portal. It is stored as an in-panel notification (type support) for the operator.",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/api/portal/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b/support",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "portal",
                                "3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b",
                                "support"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"subject\": \"Checkout page is slow\",\n    \"message\": \"Since this morning the checkout takes about 10 seconds to load.\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List the client's backups",
                    "request": {
                        "method": "GET",
                        "description": "Lists the database backup files (*.sql or *.sql.gz in <rootPath>/backups) of each of the client's active sites hosted on the panel host, newest first, max 20 per site.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/portal/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b/backups",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "portal",
                                "3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b",
                                "backups"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        }
                    }
                },
                {
                    "name": "Download a backup",
                    "request": {
                        "method": "GET",
                        "description": "Streams one backup file of one of the client's own active sites (panel host only) as an attachment.",
                        "header": [],
                        "url": {
                            "raw": "{{baseUrl}}/api/portal/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b/backups/12/shop_db_2026-11-27T03-00-00.sql.gz",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "api",
                                "portal",
                                "3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b",
                                "backups",
                                "12",
                                "shop_db_2026-11-27T03-00-00.sql.gz"
                            ],
                            "query": []
                        },
                        "auth": {
                            "type": "noauth"
                        }
                    }
                }
            ]
        }
    ]
}