{
  "components": {
    "headers": {
      "Retry-After": {
        "description": "Seconds to wait before retrying (429, and 503 answers that carry details.retryAfterSeconds)",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "X-RateLimit-Limit": {
        "description": "Requests allowed in the current window (most restrictive applicable limit)",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Requests left in the current window",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "Seconds until the current window resets (delta seconds, not an epoch)",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      }
    },
    "schemas": {
      "AddMachineToolsDto": {
        "properties": {
          "tools": {
            "description": "Unique catalogue tool ids (status ga); `requires` are added automatically; already added tools are kept as they are",
            "example": [
              "codex"
            ],
            "items": {
              "enum": [
                "node",
                "python",
                "go",
                "rust",
                "docker",
                "claude-code",
                "codex",
                "gemini-cli",
                "copilot-cli",
                "aider",
                "opencode"
              ],
              "type": "string"
            },
            "maxItems": 16,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "tools"
        ],
        "type": "object"
      },
      "AgentRun": {
        "properties": {
          "agent": {
            "enum": [
              "claude-code",
              "codex",
              "gemini-cli",
              "aider",
              "opencode"
            ],
            "type": "string"
          },
          "branch": {
            "nullable": true,
            "type": "string"
          },
          "cancelRequested": {
            "description": "A cancel was requested; the run ends cancelled within seconds",
            "type": "boolean"
          },
          "changedFiles": {
            "description": "Files changed against the cloned commit (committed or not)",
            "nullable": true,
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "destroyOnFinish": {
            "type": "boolean"
          },
          "diffStat": {
            "description": "git diff --stat summary (truncated, secrets masked)",
            "nullable": true,
            "type": "string"
          },
          "exitCode": {
            "description": "Exit code of the agent step; null while running or when killed",
            "nullable": true,
            "type": "number"
          },
          "failureReason": {
            "description": "Why a failed run failed (status failed); null otherwise",
            "enum": [
              "budget_exceeded",
              "credit_insufficient",
              "plan_limit",
              "machine_unavailable",
              "tools_failed",
              "tools_timeout",
              "clone_failed",
              "agent_not_found",
              "agent_failed",
              "github_unavailable",
              "pr_failed",
              "orchestrator_lost",
              "internal_error"
            ],
            "nullable": true,
            "type": "string"
          },
          "finishedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "groupId": {
            "description": "The comparison group (POST /agent-run-groups) this run belongs to; null for a single run",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": "run_0f8e6c1a2b3c4d5e8f90123456789abc",
            "type": "string"
          },
          "machineId": {
            "description": "The machine of the run; null until it is created",
            "nullable": true,
            "type": "string"
          },
          "outputTail": {
            "description": "Last part of the output of a finished run (truncated, known secret values masked as ***)",
            "nullable": true,
            "type": "string"
          },
          "repoUrl": {
            "type": "string"
          },
          "secrets": {
            "description": "Secret NAMES given to the run (never values)",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "size": {
            "enum": [
              "small",
              "medium",
              "large"
            ],
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "provisioning",
              "installing",
              "cloning",
              "running",
              "succeeded",
              "failed",
              "timed_out",
              "cancelled"
            ],
            "type": "string"
          },
          "task": {
            "description": "The task text as sent",
            "type": "string"
          },
          "timeoutMinutes": {
            "maximum": 60,
            "minimum": 1,
            "type": "number"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "agent",
          "repoUrl",
          "branch",
          "task",
          "size",
          "timeoutMinutes",
          "destroyOnFinish",
          "secrets",
          "machineId",
          "groupId",
          "failureReason",
          "exitCode",
          "changedFiles",
          "diffStat",
          "outputTail",
          "cancelRequested",
          "startedAt",
          "finishedAt",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "AgentRunGroup": {
        "properties": {
          "branch": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "example": "rgrp_0f8e6c1a2b3c4d5e8f90123456789abc",
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "repoUrl": {
            "type": "string"
          },
          "runs": {
            "description": "One entry per agent, in the order requested",
            "items": {
              "$ref": "#/components/schemas/AgentRunGroupRun"
            },
            "type": "array"
          },
          "status": {
            "description": "`running` while any run is unfinished",
            "enum": [
              "running",
              "finished"
            ],
            "type": "string"
          },
          "task": {
            "description": "The task text shared by every run of the group",
            "type": "string"
          },
          "totalCostKurus": {
            "description": "Sum of the run costs (kurus); null when a run cannot be priced",
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "repoUrl",
          "branch",
          "task",
          "status",
          "totalCostKurus",
          "runs",
          "createdAt"
        ],
        "type": "object"
      },
      "AgentRunGroupRun": {
        "properties": {
          "agent": {
            "enum": [
              "claude-code",
              "codex",
              "gemini-cli",
              "aider",
              "opencode"
            ],
            "type": "string"
          },
          "changedFiles": {
            "nullable": true,
            "type": "number"
          },
          "costKurus": {
            "description": "Estimated compute cost in kurus (VAT included): machine minutes x the active price list; null when no price list prices the size",
            "nullable": true,
            "type": "number"
          },
          "destroyOnFinish": {
            "description": "The run machine is deleted when the run ends (no machine to open or pause afterwards)",
            "type": "boolean"
          },
          "diffStat": {
            "description": "git diff --stat summary (truncated, secrets masked)",
            "nullable": true,
            "type": "string"
          },
          "durationSeconds": {
            "description": "Seconds from the start to the end (to now while running); null while queued",
            "nullable": true,
            "type": "number"
          },
          "exitCode": {
            "nullable": true,
            "type": "number"
          },
          "failureReason": {
            "description": "Why a failed run failed; null otherwise",
            "enum": [
              "budget_exceeded",
              "credit_insufficient",
              "plan_limit",
              "machine_unavailable",
              "tools_failed",
              "tools_timeout",
              "clone_failed",
              "agent_not_found",
              "agent_failed",
              "github_unavailable",
              "pr_failed",
              "orchestrator_lost",
              "internal_error"
            ],
            "nullable": true,
            "type": "string"
          },
          "finishedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": "run_0f8e6c1a2b3c4d5e8f90123456789abc",
            "type": "string"
          },
          "machineId": {
            "description": "The machine of the run (link target); null until created",
            "nullable": true,
            "type": "string"
          },
          "machineSeconds": {
            "description": "Seconds the run machine ran (each machine start bills at least 60 seconds)",
            "type": "number"
          },
          "startedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "provisioning",
              "installing",
              "cloning",
              "running",
              "succeeded",
              "failed",
              "timed_out",
              "cancelled"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "agent",
          "status",
          "machineId",
          "destroyOnFinish",
          "failureReason",
          "durationSeconds",
          "machineSeconds",
          "costKurus",
          "exitCode",
          "changedFiles",
          "diffStat",
          "startedAt",
          "finishedAt"
        ],
        "type": "object"
      },
      "ApiError": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "details": {
            "additionalProperties": true,
            "description": "Code-specific details (documented per code); new keys may be added",
            "type": "object"
          },
          "error": {
            "description": "HTTP reason phrase",
            "example": "Not Found",
            "type": "string"
          },
          "message": {
            "description": "Human-readable; not a contract",
            "example": "Machine not found",
            "type": "string"
          },
          "statusCode": {
            "example": 404,
            "type": "number"
          }
        },
        "required": [
          "statusCode",
          "error",
          "message"
        ],
        "type": "object"
      },
      "Budget": {
        "properties": {
          "action": {
            "enum": [
              "warn",
              "pause"
            ],
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "limitKurus": {
            "description": "Monthly limit in kuruş (KDV dahil)",
            "type": "number"
          },
          "periodEnd": {
            "description": "End of the period (exclusive)",
            "format": "date-time",
            "type": "string"
          },
          "periodStart": {
            "description": "Start of the period (first day of the month, Istanbul)",
            "format": "date-time",
            "type": "string"
          },
          "sandboxId": {
            "description": "Machine id of a machine budget; null for the organization",
            "nullable": true,
            "type": "string"
          },
          "sandboxName": {
            "description": "Machine name of a machine budget",
            "nullable": true,
            "type": "string"
          },
          "scope": {
            "enum": [
              "organization",
              "machine"
            ],
            "type": "string"
          },
          "spentKurus": {
            "description": "Spend of this month (Europe/Istanbul) in kuruş: every accrual for the organization, compute of the machine for a machine budget. Approximate: metering lags a few minutes",
            "type": "number"
          },
          "state": {
            "description": "warning at warnPercent, exceeded at 100 % (live, from spentKurus)",
            "enum": [
              "ok",
              "warning",
              "exceeded"
            ],
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "usedPercent": {
            "description": "Floored share of the limit spent; can pass 100 by about one metering cycle",
            "type": "number"
          },
          "warnPercent": {
            "maximum": 99,
            "minimum": 1,
            "type": "number"
          }
        },
        "required": [
          "id",
          "scope",
          "sandboxId",
          "sandboxName",
          "limitKurus",
          "warnPercent",
          "action",
          "spentKurus",
          "usedPercent",
          "state",
          "periodStart",
          "periodEnd",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "BudgetList": {
        "properties": {
          "items": {
            "description": "Organization budget first, then machine budgets by name",
            "items": {
              "$ref": "#/components/schemas/Budget"
            },
            "type": "array"
          },
          "organizationSpentKurus": {
            "description": "Spend of this month of the whole organization in kuruş",
            "type": "number"
          },
          "periodEnd": {
            "format": "date-time",
            "type": "string"
          },
          "periodStart": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "periodStart",
          "periodEnd",
          "organizationSpentKurus",
          "items"
        ],
        "type": "object"
      },
      "BulkItemError": {
        "properties": {
          "code": {
            "enum": [
              "SANDBOX_NOT_FOUND",
              "INVALID_STATE",
              "MACHINE_OWNER_SUSPENDED",
              "MACHINE_ABUSE_HOLD",
              "NEW_ACCOUNT_LIMIT"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "BulkItemResult": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/BulkItemError"
          },
          "ok": {
            "type": "boolean"
          },
          "sandboxId": {
            "type": "string"
          },
          "status": {
            "enum": [
              "creating",
              "running",
              "paused",
              "stopped",
              "error"
            ],
            "type": "string"
          }
        },
        "required": [
          "sandboxId",
          "ok"
        ],
        "type": "object"
      },
      "BulkResult": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/BulkItemResult"
            },
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "type": "object"
      },
      "BulkSandboxDto": {
        "properties": {
          "ids": {
            "example": [
              "sbx_1",
              "sbx_2"
            ],
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "ids"
        ],
        "type": "object"
      },
      "CancelExecution": {
        "properties": {
          "cancelled": {
            "description": "true = the command was stopped; false = it had already ended",
            "type": "boolean"
          },
          "executionId": {
            "example": "exec_3f2a",
            "type": "string"
          }
        },
        "required": [
          "executionId",
          "cancelled"
        ],
        "type": "object"
      },
      "CreateAgentRunDto": {
        "properties": {
          "agent": {
            "enum": [
              "claude-code",
              "codex",
              "gemini-cli",
              "aider",
              "opencode"
            ],
            "example": "claude-code",
            "type": "string"
          },
          "branch": {
            "description": "Branch to clone; the default branch when omitted",
            "example": "main",
            "maxLength": 200,
            "type": "string"
          },
          "destroyOnFinish": {
            "default": false,
            "description": "Delete the machine when the run ends (default: pause it)",
            "type": "boolean"
          },
          "repoUrl": {
            "description": "Public repository over https on github.com, gitlab.com or bitbucket.org; no user name, password, port or query (400 REPO_URL_INVALID). Private repositories come with the GitHub integration.",
            "example": "https://github.com/acme/web",
            "maxLength": 300,
            "type": "string"
          },
          "secrets": {
            "description": "NAMES of the organization secrets the agent needs (its API key). Values never travel in this API. A secret of scope \"selected\" is linked to this run's machine only; secrets of scope \"all\" are in every machine of the organization anyway. Use a separate, limited key: the agent (and any code in the repository) can read it.",
            "example": [
              "ANTHROPIC_API_KEY"
            ],
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "type": "array"
          },
          "size": {
            "default": "small",
            "enum": [
              "small",
              "medium",
              "large"
            ],
            "type": "string"
          },
          "task": {
            "description": "What the agent should do. Written to a file in the machine, never put on a command line.",
            "example": "Fix the failing date parsing test and explain the cause in a comment.",
            "maxLength": 8000,
            "type": "string"
          },
          "timeoutMinutes": {
            "default": 30,
            "description": "Limit of the agent step (clone and agent) in minutes; the run ends timed_out when it is exceeded",
            "maximum": 60,
            "minimum": 1,
            "type": "number"
          }
        },
        "required": [
          "repoUrl",
          "task",
          "agent"
        ],
        "type": "object"
      },
      "CreateAgentRunGroupDto": {
        "properties": {
          "agents": {
            "description": "The agents to compare: one run (one fresh machine) per agent, same repository and task. Unique; every machine counts against the plan machine limit at the same time (no queueing)",
            "example": [
              "claude-code",
              "codex"
            ],
            "items": {
              "enum": [
                "claude-code",
                "codex",
                "gemini-cli",
                "aider",
                "opencode"
              ],
              "type": "string"
            },
            "maxItems": 4,
            "minItems": 2,
            "type": "array"
          },
          "branch": {
            "description": "Branch to clone; the default branch when omitted",
            "example": "main",
            "maxLength": 200,
            "type": "string"
          },
          "destroyOnFinish": {
            "default": false,
            "description": "Delete the machine when the run ends (default: pause it)",
            "type": "boolean"
          },
          "name": {
            "example": "Date parsing fix",
            "maxLength": 100,
            "type": "string"
          },
          "repoUrl": {
            "description": "Public repository over https on github.com, gitlab.com or bitbucket.org; no user name, password, port or query (400 REPO_URL_INVALID). Private repositories come with the GitHub integration.",
            "example": "https://github.com/acme/web",
            "maxLength": 300,
            "type": "string"
          },
          "secrets": {
            "description": "NAMES of the organization secrets the agent needs (its API key). Values never travel in this API. A secret of scope \"selected\" is linked to this run's machine only; secrets of scope \"all\" are in every machine of the organization anyway. Use a separate, limited key: the agent (and any code in the repository) can read it.",
            "example": [
              "ANTHROPIC_API_KEY"
            ],
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "type": "array"
          },
          "size": {
            "default": "small",
            "enum": [
              "small",
              "medium",
              "large"
            ],
            "type": "string"
          },
          "task": {
            "description": "What the agent should do. Written to a file in the machine, never put on a command line.",
            "example": "Fix the failing date parsing test and explain the cause in a comment.",
            "maxLength": 8000,
            "type": "string"
          },
          "timeoutMinutes": {
            "default": 30,
            "description": "Limit of the agent step (clone and agent) in minutes; the run ends timed_out when it is exceeded",
            "maximum": 60,
            "minimum": 1,
            "type": "number"
          }
        },
        "required": [
          "repoUrl",
          "task",
          "agents"
        ],
        "type": "object"
      },
      "CreateBudgetDto": {
        "properties": {
          "action": {
            "default": "pause",
            "description": "At 100 %: pause = pause running machines in scope (no automatic resume); warn = notice only",
            "enum": [
              "warn",
              "pause"
            ],
            "type": "string"
          },
          "limitKurus": {
            "description": "Monthly limit in kuruş, KDV dahil (1 TL = 100)",
            "example": 20000,
            "maximum": 100000000,
            "minimum": 100,
            "type": "number"
          },
          "sandboxId": {
            "description": "Machine id for a machine budget; omit for the organization budget",
            "pattern": "^[A-Za-z0-9_-]{1,64}$",
            "type": "string"
          },
          "warnPercent": {
            "default": 80,
            "description": "Warning threshold (% of the limit)",
            "maximum": 99,
            "minimum": 1,
            "type": "number"
          }
        },
        "required": [
          "limitKurus"
        ],
        "type": "object"
      },
      "CreateMachineServiceDto": {
        "properties": {
          "command": {
            "description": "Shell command, run with `bash -lc` as the machine user (1-4096 bytes, no NUL). Never put secrets in it: read them from a file in /workspace instead (e.g. `set -a; . /workspace/.env; set +a; opencode serve`).",
            "example": "opencode serve --port 4096",
            "type": "string"
          },
          "cwd": {
            "default": "/workspace",
            "description": "Working directory: absolute, at most 256 bytes, no \"..\" segment",
            "example": "/workspace",
            "type": "string"
          },
          "enabled": {
            "default": true,
            "description": "false = defined but stopped (POST .../start runs it)",
            "type": "boolean"
          },
          "name": {
            "description": "Unique per machine: lower-case letter, then up to 31 lower-case letters, digits or `-`",
            "example": "opencode",
            "pattern": "^[a-z][a-z0-9-]{0,31}$",
            "type": "string"
          },
          "restart": {
            "default": "always",
            "description": "always = restart whenever it exits; on-failure = not after a clean exit (code 0)",
            "enum": [
              "always",
              "on-failure"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "command"
        ],
        "type": "object"
      },
      "CreateSandboxDto": {
        "properties": {
          "autoPause": {
            "default": true,
            "description": "Pause after the idle timeout; false needs package autoPauseOptional (beta package: 403 AUTO_PAUSE_REQUIRED)",
            "type": "boolean"
          },
          "env": {
            "description": "Write-once, encrypted at rest; values are never returned (only envKeys)",
            "items": {
              "$ref": "#/components/schemas/SandboxEnvVarDto"
            },
            "maxItems": 100,
            "type": "array"
          },
          "goldenImage": {
            "description": "LEGACY (SDK); 400 CONFLICTING_SOURCE together with templateCode/snapshotId",
            "example": "ai-sandbox/golden",
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "idleTimeoutMinutes": {
            "description": "TASK-194: idle minutes before auto-pause; default = plan idleTimeoutMinutes; 5..plan value, else 400 IDLE_TIMEOUT_OUT_OF_RANGE",
            "example": 10,
            "maximum": 1440,
            "minimum": 5,
            "type": "number"
          },
          "imageTag": {
            "description": "LEGACY (SDK)",
            "example": "v1.2",
            "maxLength": 100,
            "type": "string"
          },
          "name": {
            "example": "ubuntu-dev",
            "pattern": "^[a-z0-9][a-z0-9-]{1,39}$",
            "type": "string"
          },
          "sandboxId": {
            "description": "Idempotency key",
            "example": "sbx_a1b2c3d4",
            "maxLength": 64,
            "minLength": 5,
            "type": "string"
          },
          "size": {
            "description": "Size preset: small 2 vCPU / 2 GiB, medium 2 vCPU / 4 GiB, large 4 vCPU / 8 GiB. Default small (desktop images: medium). Must fit plan maxVcpu/maxMemoryMib, else 402 PLAN_LIMIT_SIZE; a desktop image below medium → 400 DESKTOP_SIZE_TOO_SMALL (details { size, minSize })",
            "enum": [
              "small",
              "medium",
              "large"
            ],
            "type": "string"
          },
          "snapshotId": {
            "description": "XOR with templateCode",
            "example": "snp_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
            "type": "string"
          },
          "templateCode": {
            "description": "Catalogue template; default = the isDefault template",
            "example": "standard",
            "type": "string"
          },
          "tools": {
            "description": "TASK-357: unique catalogue tool ids (status ga) installed in the background after boot; `requires` are added automatically (claude-code adds node). Per-tool state: GET /sandboxes/:id/tools. 400 TOOLS_WITH_SNAPSHOT with snapshotId (the snapshot carries its own tools; add more later with POST /sandboxes/:id/tools), 400 TOOLS_DISK_BUDGET when the estimated disk use is above the tool disk",
            "example": [
              "claude-code"
            ],
            "items": {
              "enum": [
                "node",
                "python",
                "go",
                "rust",
                "docker",
                "claude-code",
                "codex",
                "gemini-cli",
                "copilot-cli",
                "aider",
                "opencode"
              ],
              "type": "string"
            },
            "maxItems": 16,
            "type": "array"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateScheduleDto": {
        "properties": {
          "command": {
            "description": "Shell commands, written to a script file and run with `sh` in the workspace; secrets are injected as for `exec`",
            "example": "cd /workspace/app && npm run backup",
            "maxLength": 2000,
            "type": "string"
          },
          "cron": {
            "description": "5-field cron (minute hour day month weekday), read in Europe/Istanbul; shortest interval 15 minutes",
            "example": "0 3 * * *",
            "maxLength": 120,
            "type": "string"
          },
          "name": {
            "example": "Nightly backup",
            "maxLength": 80,
            "type": "string"
          },
          "timeoutMinutes": {
            "default": 30,
            "description": "Exec timeout of one run in minutes (at most 60)",
            "maximum": 60,
            "minimum": 1,
            "type": "number"
          }
        },
        "required": [
          "name",
          "cron",
          "command"
        ],
        "type": "object"
      },
      "CreateSnapshotDto": {
        "properties": {
          "name": {
            "example": "bireysel",
            "pattern": "^[a-z0-9][a-z0-9-]{1,39}$",
            "type": "string"
          },
          "sandboxId": {
            "example": "sbx_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
            "type": "string"
          }
        },
        "required": [
          "sandboxId",
          "name"
        ],
        "type": "object"
      },
      "CreateTerminalSessionDto": {
        "properties": {
          "clientKind": {
            "default": "cli",
            "enum": [
              "cli",
              "web",
              "sdk"
            ],
            "type": "string"
          },
          "cols": {
            "example": 120,
            "maximum": 1000,
            "minimum": 1,
            "type": "number"
          },
          "command": {
            "description": "Command instead of the login shell (≤ 1024 bytes). May carry secrets: never logged; only argv0 is stored.",
            "example": "npm run dev",
            "maxLength": 1024,
            "type": "string"
          },
          "rows": {
            "example": 40,
            "maximum": 1000,
            "minimum": 1,
            "type": "number"
          },
          "term": {
            "default": "xterm-256color",
            "enum": [
              "xterm-256color",
              "xterm",
              "screen-256color",
              "tmux-256color",
              "vt100"
            ],
            "type": "string"
          }
        },
        "required": [
          "cols",
          "rows"
        ],
        "type": "object"
      },
      "Credit": {
        "properties": {
          "activeLots": {
            "description": "Open lots (balance left, not expired), newest grant first",
            "items": {
              "$ref": "#/components/schemas/CreditActiveLot"
            },
            "type": "array"
          },
          "balanceKurus": {
            "description": "Current balance in kuruş (KDV dahil); negative when in debt",
            "type": "number"
          },
          "burnRateKurusPerHour": {
            "description": "Spend per hour right now: running machines plus storage, from the active price book; null without one",
            "nullable": true,
            "type": "number"
          },
          "cycleBaseKurus": {
            "description": "Balance right after the last top-up; the base of the 80 % warning",
            "type": "number"
          },
          "enforced": {
            "description": "CREDIT_ENFORCE: true = an empty balance blocks new machines (402 CREDIT_INSUFFICIENT)",
            "type": "boolean"
          },
          "estimatedRemainingMinutes": {
            "description": "Minutes the balance lasts at the current burn; null when nothing burns",
            "nullable": true,
            "type": "number"
          },
          "expiringLots": {
            "description": "Lots that expire within 14 days, soonest first",
            "items": {
              "$ref": "#/components/schemas/CreditExpiringLot"
            },
            "type": "array"
          },
          "state": {
            "description": "ok; low = balance ≤ 20 % of cycleBaseKurus; exhausted = balance ≤ 0",
            "enum": [
              "ok",
              "low",
              "exhausted"
            ],
            "type": "string"
          },
          "usedPercent": {
            "description": "Share of cycleBaseKurus already spent (one decimal)",
            "maximum": 100,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "balanceKurus",
          "state",
          "cycleBaseKurus",
          "usedPercent",
          "burnRateKurusPerHour",
          "estimatedRemainingMinutes",
          "expiringLots",
          "activeLots",
          "enforced"
        ],
        "type": "object"
      },
      "CreditActiveLot": {
        "properties": {
          "amountKurus": {
            "description": "Kuruş the lot started with",
            "type": "number"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "grantedAt": {
            "format": "date-time",
            "type": "string"
          },
          "packageName": {
            "description": "Package the lot came from; null for operator grants",
            "nullable": true,
            "type": "string"
          },
          "remainingKurus": {
            "description": "Kuruş left in the lot",
            "type": "number"
          },
          "source": {
            "enum": [
              "beta",
              "paid",
              "promo",
              "operator"
            ],
            "type": "string"
          }
        },
        "required": [
          "source",
          "packageName",
          "amountKurus",
          "remainingKurus",
          "grantedAt",
          "expiresAt"
        ],
        "type": "object"
      },
      "CreditExpiringLot": {
        "properties": {
          "amountKurus": {
            "description": "Kuruş the lot started with",
            "type": "number"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "remainingKurus": {
            "description": "Kuruş left in the lot",
            "type": "number"
          },
          "source": {
            "enum": [
              "beta",
              "paid",
              "promo",
              "operator"
            ],
            "type": "string"
          }
        },
        "required": [
          "source",
          "remainingKurus",
          "amountKurus",
          "expiresAt"
        ],
        "type": "object"
      },
      "CreditLedgerEntry": {
        "properties": {
          "actor": {
            "description": "Hadronbox (operator), system or payment — never a user id",
            "example": "Hadronbox",
            "type": "string"
          },
          "amountKurus": {
            "description": "Signed kuruş: grants add, usage / expiry / refund take away",
            "type": "number"
          },
          "balanceAfterKurus": {
            "description": "Balance after this row (for usage: after the last row of the day)",
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "date": {
            "description": "Usage: the Europe/Istanbul day",
            "example": "2026-11-29",
            "nullable": true,
            "type": "string"
          },
          "entryCount": {
            "description": "Usage: hourly ledger rows folded into this day; otherwise 1",
            "type": "number"
          },
          "id": {
            "description": "Usage rows are one per Istanbul day: usage:YYYY-MM-DD",
            "type": "string"
          },
          "packageCode": {
            "nullable": true,
            "type": "string"
          },
          "packageName": {
            "nullable": true,
            "type": "string"
          },
          "source": {
            "description": "Source of the lot a grant opened or an expiry drained",
            "enum": [
              "beta",
              "paid",
              "promo",
              "operator"
            ],
            "nullable": true,
            "type": "string"
          },
          "type": {
            "enum": [
              "grant",
              "usage",
              "adjustment",
              "expiry",
              "refund",
              "reversal"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "amountKurus",
          "balanceAfterKurus",
          "createdAt",
          "actor",
          "source",
          "packageCode",
          "packageName",
          "entryCount",
          "date"
        ],
        "type": "object"
      },
      "CreditLedgerPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CreditLedgerEntry"
            },
            "type": "array"
          },
          "nextCursor": {
            "description": "Pass as cursor for the next (older) page; null on the last page",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object"
      },
      "CreditPackage": {
        "properties": {
          "billing": {
            "description": "monthly: each payment resets the paid balance to the package amount",
            "enum": [
              "monthly",
              "one_time"
            ],
            "type": "string"
          },
          "code": {
            "example": "paid_500",
            "type": "string"
          },
          "creditKurus": {
            "description": "Balance the package adds, kuruş",
            "type": "number"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "beta",
              "paid",
              "promo",
              "operator"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "priceKurus": {
            "description": "Price the buyer pays, KDV dahil, kuruş (0 for beta / promo)",
            "type": "number"
          },
          "purchasable": {
            "description": "false: granted by Hadronbox, not for sale",
            "type": "boolean"
          },
          "validityDays": {
            "description": "Days until the lot expires; null = never",
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "id",
          "code",
          "name",
          "description",
          "kind",
          "priceKurus",
          "creditKurus",
          "validityDays",
          "purchasable",
          "billing"
        ],
        "type": "object"
      },
      "CreditUsage": {
        "properties": {
          "from": {
            "description": "First Europe/Istanbul day (inclusive)",
            "example": "2026-11-01",
            "type": "string"
          },
          "groupBy": {
            "enum": [
              "day",
              "machine"
            ],
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CreditUsageRow"
            },
            "type": "array"
          },
          "to": {
            "description": "Last Europe/Istanbul day (inclusive)",
            "example": "2026-11-29",
            "type": "string"
          },
          "totals": {
            "$ref": "#/components/schemas/CreditUsageTotals"
          }
        },
        "required": [
          "from",
          "to",
          "groupBy",
          "totals",
          "items"
        ],
        "type": "object"
      },
      "CreditUsageRow": {
        "properties": {
          "computeKurus": {
            "type": "number"
          },
          "computeMinutes": {
            "description": "Running minutes (one decimal)",
            "type": "number"
          },
          "key": {
            "description": "Istanbul day (YYYY-MM-DD) for groupBy=day; machine / volume / snapshot id for groupBy=machine",
            "type": "string"
          },
          "kind": {
            "enum": [
              "day",
              "machine",
              "volume",
              "snapshot"
            ],
            "type": "string"
          },
          "label": {
            "description": "Name of the machine / volume / snapshot while it exists",
            "nullable": true,
            "type": "string"
          },
          "storageGibHours": {
            "description": "GiB-hours of stored disk / snapshot (three decimals)",
            "type": "number"
          },
          "storageKurus": {
            "type": "number"
          },
          "totalKurus": {
            "type": "number"
          }
        },
        "required": [
          "key",
          "kind",
          "label",
          "computeKurus",
          "storageKurus",
          "totalKurus",
          "computeMinutes",
          "storageGibHours"
        ],
        "type": "object"
      },
      "CreditUsageTotals": {
        "properties": {
          "computeKurus": {
            "type": "number"
          },
          "computeMinutes": {
            "type": "number"
          },
          "storageGibHours": {
            "type": "number"
          },
          "storageKurus": {
            "type": "number"
          },
          "totalKurus": {
            "type": "number"
          }
        },
        "required": [
          "computeKurus",
          "storageKurus",
          "totalKurus",
          "computeMinutes",
          "storageGibHours"
        ],
        "type": "object"
      },
      "ErrorCode": {
        "description": "Stable public error code. Codes are never renamed, removed or reused; new codes may be added at any time (handle an unknown code by its HTTP status class).",
        "enum": [
          "VALIDATION",
          "SESSION_INVALID",
          "EMAIL_NOT_VERIFIED",
          "NOT_A_MEMBER",
          "FORBIDDEN_ROLE",
          "SESSION_REQUIRED",
          "INVALID_API_KEY",
          "PLAN_UPGRADE_REQUIRED",
          "PLAN_LIMIT_MACHINES",
          "PLAN_LIMIT_SNAPSHOTS",
          "PLAN_CATALOG_MISSING",
          "NAME_TAKEN",
          "ENCRYPTION_UNAVAILABLE",
          "SANDBOX_NOT_FOUND",
          "SANDBOX_NOT_SNAPSHOTTABLE",
          "SNAPSHOT_NOT_FOUND",
          "SNAPSHOT_NOT_READY",
          "TEMPLATE_NOT_FOUND",
          "RESERVED_ENV_KEY",
          "CONFLICTING_SOURCE",
          "INVALID_STATE",
          "SANDBOX_HOST_BUSY",
          "SANDBOX_HOST_UNAVAILABLE",
          "HOST_CAPACITY_EXHAUSTED",
          "MACHINE_IMAGE_UNAVAILABLE",
          "SNAPSHOTS_UNAVAILABLE",
          "PLAN_LIMIT_SIZE",
          "ACCOUNT_SUSPENDED",
          "ACCOUNT_INACTIVE",
          "MACHINE_OWNER_SUSPENDED",
          "AUTO_PAUSE_REQUIRED",
          "IDLE_TIMEOUT_OUT_OF_RANGE",
          "ACCOUNT_DELETION_PENDING",
          "MACHINE_ABUSE_HOLD",
          "RATE_LIMITED",
          "CLI_UPGRADE_REQUIRED",
          "UNAUTHENTICATED",
          "ORGANIZATION_DELETION_PENDING",
          "INSUFFICIENT_SCOPE",
          "NEW_ACCOUNT_LIMIT",
          "TERMINAL_SESSION_NOT_FOUND",
          "PLAN_LIMIT_TERMINALS",
          "TERMINAL_LIMIT_MACHINE",
          "PORT_NOT_FOUND",
          "PORT_ALREADY_EXPOSED",
          "PORT_RESERVED",
          "PLAN_LIMIT_PORTS",
          "FEATURE_NOT_AVAILABLE",
          "EDGE_UNAVAILABLE",
          "PREVIEW_BLOCKED",
          "ORG_REQUIRES_TWO_FACTOR",
          "TOOLS_WITH_SNAPSHOT",
          "TOOLS_DISK_BUDGET",
          "TOOL_NOT_FOUND",
          "TOOL_NOT_RETRYABLE",
          "CREDIT_INSUFFICIENT",
          "PLAN_LIMIT_SERVICES",
          "SERVICE_NOT_FOUND",
          "SERVICE_NAME_TAKEN",
          "SERVICES_UNSUPPORTED",
          "SERVICE_DISABLED",
          "WORKSPACE_SIZE_NOT_ALLOWED",
          "WORKSPACE_SHRINK_REFUSED",
          "WORKSPACE_GROW_UNAVAILABLE",
          "DESKTOP_SIZE_TOO_SMALL",
          "COMMAND_BLOCKED",
          "BUDGET_EXCEEDED",
          "BUDGET_NOT_FOUND",
          "BUDGET_EXISTS",
          "SCHEDULE_NOT_FOUND",
          "SCHEDULE_LIMIT",
          "SCHEDULE_NEW_ORGANIZATION",
          "SCHEDULE_CRON_INVALID",
          "SCHEDULE_DISABLED",
          "TRIGGER_UNAUTHORIZED",
          "TRIGGER_PAYLOAD_TOO_LARGE",
          "AGENT_RUNS_DISABLED",
          "AGENT_RUN_NOT_FOUND",
          "REPO_URL_INVALID",
          "AGENT_RUN_SECRET_NOT_FOUND",
          "AGENT_RUN_NOT_CANCELLABLE",
          "AGENT_RUN_LIMIT",
          "AGENT_RUN_GROUP_NOT_FOUND"
        ],
        "type": "string",
        "x-hadronbox-errors": [
          {
            "code": "VALIDATION",
            "message": {
              "en": "The request failed validation. Check the fields and try again.",
              "tr": "İstek doğrulanamadı. Alanları kontrol edip yeniden dene."
            },
            "since": "2026-11-25",
            "statuses": [
              400
            ]
          },
          {
            "code": "SESSION_INVALID",
            "message": {
              "en": "The session is invalid or has ended. Sign in again.",
              "tr": "Oturum geçersiz ya da sona erdi. Yeniden giriş yap."
            },
            "since": "2026-11-25",
            "statuses": [
              401
            ]
          },
          {
            "code": "EMAIL_NOT_VERIFIED",
            "message": {
              "en": "Verify your email address first.",
              "tr": "Önce e-posta adresini doğrulaman gerekiyor."
            },
            "since": "2026-11-25",
            "statuses": [
              403
            ]
          },
          {
            "code": "NOT_A_MEMBER",
            "message": {
              "en": "You are not a member of this organization.",
              "tr": "Bu organizasyonun üyesi değilsin."
            },
            "since": "2026-11-25",
            "statuses": [
              403
            ]
          },
          {
            "code": "FORBIDDEN_ROLE",
            "message": {
              "en": "Your role does not allow this action.",
              "tr": "Bu işlem için rolün yeterli değil."
            },
            "since": "2026-11-25",
            "statuses": [
              403
            ]
          },
          {
            "code": "SESSION_REQUIRED",
            "message": {
              "en": "This endpoint does not accept API keys; it needs a signed-in session.",
              "tr": "Bu uç nokta API anahtarı kabul etmiyor; panelden oturum açarak kullanılır."
            },
            "since": "2026-11-25",
            "statuses": [
              403
            ]
          },
          {
            "code": "INVALID_API_KEY",
            "message": {
              "en": "The API key is invalid, revoked or expired.",
              "tr": "API anahtarı geçersiz, iptal edilmiş ya da süresi dolmuş."
            },
            "since": "2026-11-25",
            "statuses": [
              401
            ]
          },
          {
            "code": "PLAN_UPGRADE_REQUIRED",
            "message": {
              "en": "Your package does not include this feature.",
              "tr": "Bu özellik paketinde yok."
            },
            "since": "2026-11-25",
            "statuses": [
              402
            ]
          },
          {
            "code": "PLAN_LIMIT_MACHINES",
            "message": {
              "en": "You have reached your machine limit.",
              "tr": "Makine sınırına ulaştın."
            },
            "since": "2026-11-25",
            "statuses": [
              402
            ]
          },
          {
            "code": "PLAN_LIMIT_SNAPSHOTS",
            "message": {
              "en": "You have reached your snapshot limit.",
              "tr": "Anlık görüntü sınırına ulaştın."
            },
            "since": "2026-11-25",
            "statuses": [
              402
            ]
          },
          {
            "code": "PLAN_CATALOG_MISSING",
            "message": {
              "en": "Package information is unavailable right now. Try again shortly.",
              "tr": "Paket bilgisi şu anda okunamıyor. Biraz sonra yeniden dene."
            },
            "since": "2026-11-25",
            "statuses": [
              503
            ]
          },
          {
            "code": "NAME_TAKEN",
            "message": {
              "en": "This name is already in use.",
              "tr": "Bu ad zaten kullanılıyor."
            },
            "since": "2026-11-25",
            "statuses": [
              409
            ]
          },
          {
            "code": "ENCRYPTION_UNAVAILABLE",
            "message": {
              "en": "Environment variables cannot be encrypted right now. Try again shortly.",
              "tr": "Ortam değişkenleri şu anda şifrelenemiyor. Biraz sonra yeniden dene."
            },
            "since": "2026-11-25",
            "statuses": [
              503
            ]
          },
          {
            "code": "SANDBOX_NOT_FOUND",
            "message": {
              "en": "Machine not found.",
              "tr": "Makine bulunamadı."
            },
            "since": "2026-11-25",
            "statuses": [
              404
            ]
          },
          {
            "code": "SANDBOX_NOT_SNAPSHOTTABLE",
            "message": {
              "en": "A snapshot cannot be taken of this machine in its current state.",
              "tr": "Bu makinenin şu anki durumunda anlık görüntüsü alınamaz."
            },
            "since": "2026-11-25",
            "statuses": [
              409
            ]
          },
          {
            "code": "SNAPSHOT_NOT_FOUND",
            "message": {
              "en": "Snapshot not found.",
              "tr": "Anlık görüntü bulunamadı."
            },
            "since": "2026-11-25",
            "statuses": [
              404
            ]
          },
          {
            "code": "SNAPSHOT_NOT_READY",
            "message": {
              "en": "The snapshot is not ready yet.",
              "tr": "Anlık görüntü henüz hazır değil."
            },
            "since": "2026-11-25",
            "statuses": [
              409
            ]
          },
          {
            "code": "TEMPLATE_NOT_FOUND",
            "message": {
              "en": "Template not found.",
              "tr": "Şablon bulunamadı."
            },
            "since": "2026-11-25",
            "statuses": [
              404
            ]
          },
          {
            "code": "RESERVED_ENV_KEY",
            "message": {
              "en": "This environment variable name is reserved.",
              "tr": "Bu ortam değişkeni adı ayrılmış, kullanılamaz."
            },
            "since": "2026-11-25",
            "statuses": [
              400
            ]
          },
          {
            "code": "CONFLICTING_SOURCE",
            "message": {
              "en": "A template and a snapshot cannot be given together.",
              "tr": "Şablon ve anlık görüntü birlikte verilemez."
            },
            "since": "2026-11-25",
            "statuses": [
              400
            ]
          },
          {
            "code": "INVALID_STATE",
            "message": {
              "en": "The machine is not in a state that allows this action.",
              "tr": "Makine bu işlem için uygun durumda değil."
            },
            "since": "2026-11-25",
            "statuses": [
              409
            ]
          },
          {
            "code": "SANDBOX_HOST_BUSY",
            "details": [
              "retryAfterSeconds"
            ],
            "message": {
              "en": "Too many commands are running on the machine’s host. Try again in a few seconds.",
              "tr": "Makinenin sunucusunda şu anda çok fazla komut çalışıyor. Birkaç saniye sonra yeniden dene."
            },
            "since": "2026-11-25",
            "statuses": [
              429
            ]
          },
          {
            "code": "SANDBOX_HOST_UNAVAILABLE",
            "details": [
              "retryAfterSeconds"
            ],
            "message": {
              "en": "The machine’s host is not responding right now. Try again in a few seconds.",
              "tr": "Makinenin sunucusu şu an yanıt vermiyor. Birkaç saniye sonra yeniden dene."
            },
            "since": "2026-11-28",
            "statuses": [
              503
            ]
          },
          {
            "code": "HOST_CAPACITY_EXHAUSTED",
            "details": [
              "retryAfterSeconds"
            ],
            "message": {
              "en": "There is no free capacity for this machine right now. Try again in a few seconds.",
              "tr": "Şu an bu makine için boş kapasite yok. Birkaç saniye sonra yeniden dene."
            },
            "since": "2026-11-28",
            "statuses": [
              503
            ]
          },
          {
            "code": "MACHINE_IMAGE_UNAVAILABLE",
            "message": {
              "en": "The selected machine image is not available in this environment yet. Pick another image.",
              "tr": "Seçilen makine imajı bu ortamda henüz kullanılamıyor. Başka bir imaj seç."
            },
            "since": "2026-11-28",
            "statuses": [
              503
            ]
          },
          {
            "code": "SNAPSHOTS_UNAVAILABLE",
            "message": {
              "en": "Taking snapshots is turned off in this environment right now. Try again later.",
              "tr": "Snapshot alma bu ortamda şu an kapalı. Biraz sonra yeniden dene."
            },
            "since": "2026-11-29",
            "statuses": [
              503
            ]
          },
          {
            "code": "PLAN_LIMIT_SIZE",
            "details": [
              "allowed"
            ],
            "message": {
              "en": "The selected machine size is not included in your package.",
              "tr": "Seçilen makine boyutu paketinde yok."
            },
            "since": "2026-11-25",
            "statuses": [
              402
            ]
          },
          {
            "code": "ACCOUNT_SUSPENDED",
            "message": {
              "en": "This account is suspended.",
              "tr": "Hesap askıya alındı."
            },
            "since": "2026-11-25",
            "statuses": [
              401,
              403
            ]
          },
          {
            "code": "ACCOUNT_INACTIVE",
            "message": {
              "en": "This account is inactive.",
              "tr": "Hesap etkin değil."
            },
            "since": "2026-11-25",
            "statuses": [
              401,
              403
            ]
          },
          {
            "code": "MACHINE_OWNER_SUSPENDED",
            "message": {
              "en": "The machine cannot be resumed because its owner is suspended.",
              "tr": "Makinenin sahibi askıya alındığı için makine devam ettirilemez."
            },
            "since": "2026-11-25",
            "statuses": [
              409
            ]
          },
          {
            "code": "AUTO_PAUSE_REQUIRED",
            "message": {
              "en": "Your package does not allow turning auto-pause off.",
              "tr": "Paketin otomatik duraklatmayı kapatmaya izin vermiyor."
            },
            "since": "2026-11-25",
            "statuses": [
              403
            ]
          },
          {
            "code": "IDLE_TIMEOUT_OUT_OF_RANGE",
            "details": [
              "min",
              "max",
              "requested"
            ],
            "message": {
              "en": "The idle timeout is outside the allowed range.",
              "tr": "Boşta bekleme süresi izin verilen aralığın dışında."
            },
            "since": "2026-11-25",
            "statuses": [
              400
            ]
          },
          {
            "code": "ACCOUNT_DELETION_PENDING",
            "message": {
              "en": "The account is scheduled for deletion and in its 30-day undo window.",
              "tr": "Hesap silinmek üzere; 30 günlük geri alma süresinde."
            },
            "since": "2026-11-25",
            "statuses": [
              401
            ]
          },
          {
            "code": "MACHINE_ABUSE_HOLD",
            "message": {
              "en": "The machine is on hold because of an open abuse review.",
              "tr": "Makine açık bir kötüye kullanım incelemesi nedeniyle bekletiliyor."
            },
            "since": "2026-11-25",
            "statuses": [
              409
            ]
          },
          {
            "code": "RATE_LIMITED",
            "message": {
              "en": "Too many requests. Try again after Retry-After seconds.",
              "tr": "Çok fazla istek gönderildi. Retry-After saniye sonra yeniden dene."
            },
            "since": "2026-11-25",
            "statuses": [
              429
            ]
          },
          {
            "code": "CLI_UPGRADE_REQUIRED",
            "details": [
              "minVersion",
              "docs"
            ],
            "message": {
              "en": "This CLI version is no longer supported. Update the CLI.",
              "tr": "Bu CLI sürümü artık desteklenmiyor. CLI’yı güncelle."
            },
            "since": "2026-11-25",
            "statuses": [
              426
            ]
          },
          {
            "code": "UNAUTHENTICATED",
            "message": {
              "en": "Authentication required. Send a valid API key as a Bearer token in the Authorization header.",
              "tr": "Kimlik doğrulanamadı. Authorization başlığında Bearer olarak geçerli bir API anahtarı gönder."
            },
            "since": "2026-11-26",
            "statuses": [
              401
            ]
          },
          {
            "code": "ORGANIZATION_DELETION_PENDING",
            "details": [
              "organizationId",
              "deletionScheduledAt"
            ],
            "message": {
              "en": "The organization is scheduled for deletion and is read-only until then.",
              "tr": "Organizasyon silinmek üzere; silinene kadar salt okunur."
            },
            "since": "2026-11-26",
            "statuses": [
              409
            ]
          },
          {
            "code": "INSUFFICIENT_SCOPE",
            "details": [
              "requiredScope"
            ],
            "message": {
              "en": "This API key does not have the scope this endpoint needs. Create a key with the required scope.",
              "tr": "Bu API anahtarının kapsamı bu işleme izin vermiyor. Gereken kapsamla yeni bir anahtar oluştur."
            },
            "since": "2026-11-26",
            "statuses": [
              403
            ]
          },
          {
            "code": "NEW_ACCOUNT_LIMIT",
            "details": [
              "resource",
              "limit",
              "used",
              "until"
            ],
            "message": {
              "en": "New accounts run with a stricter limit during their first days. Verify your email and wait, or pause a running machine.",
              "tr": "Yeni hesaplar ilk günlerde daha sıkı bir sınırla çalışır. E-postanı doğrula ve biraz bekle ya da çalışan bir makineyi duraklat."
            },
            "since": "2026-11-26",
            "statuses": [
              403
            ]
          },
          {
            "code": "TERMINAL_SESSION_NOT_FOUND",
            "message": {
              "en": "Terminal session not found or already ended.",
              "tr": "Terminal oturumu bulunamadı ya da sona erdi."
            },
            "since": "2026-11-27",
            "statuses": [
              404
            ]
          },
          {
            "code": "PLAN_LIMIT_TERMINALS",
            "details": [
              "resource",
              "limit",
              "used",
              "planBased",
              "paymentsEnabled",
              "upgradeUrl"
            ],
            "message": {
              "en": "You reached the concurrent terminal session limit. Close an open session and try again.",
              "tr": "Eşzamanlı terminal oturumu sınırına ulaştın. Açık bir oturumu kapatıp yeniden dene."
            },
            "since": "2026-11-27",
            "statuses": [
              402
            ]
          },
          {
            "code": "TERMINAL_LIMIT_MACHINE",
            "details": [
              "limit"
            ],
            "message": {
              "en": "This machine already has the maximum of 8 terminal sessions. Close one and try again.",
              "tr": "Bu makinede açık terminal oturumu sayısı en fazla 8 olabilir. Bir oturumu kapatıp yeniden dene."
            },
            "since": "2026-11-27",
            "statuses": [
              429
            ]
          },
          {
            "code": "PORT_NOT_FOUND",
            "message": {
              "en": "Preview port not found or already removed.",
              "tr": "Önizleme portu bulunamadı ya da kaldırılmış."
            },
            "since": "2026-11-27",
            "statuses": [
              404
            ]
          },
          {
            "code": "PORT_ALREADY_EXPOSED",
            "details": [
              "port",
              "portId"
            ],
            "message": {
              "en": "This port of the machine is already exposed. Use its existing preview URL.",
              "tr": "Bu makinenin bu portu zaten açık. Mevcut önizleme adresini kullan."
            },
            "since": "2026-11-27",
            "statuses": [
              409
            ]
          },
          {
            "code": "PORT_RESERVED",
            "details": [
              "port"
            ],
            "message": {
              "en": "This port is reserved by the platform (52, 5900-5999, 6080, 8052). Choose another port.",
              "tr": "Bu port platform tarafından ayrılmış (52, 5900-5999, 6080, 8052). Başka bir port seç."
            },
            "since": "2026-11-27",
            "statuses": [
              400
            ]
          },
          {
            "code": "PLAN_LIMIT_PORTS",
            "details": [
              "resource",
              "limit",
              "used",
              "planBased",
              "paymentsEnabled",
              "upgradeUrl"
            ],
            "message": {
              "en": "You reached the open preview port limit. Remove a port you no longer use and try again.",
              "tr": "Açık önizleme portu sınırına ulaştın. Kullanmadığın bir portu kapatıp yeniden dene."
            },
            "since": "2026-11-27",
            "statuses": [
              402
            ]
          },
          {
            "code": "FEATURE_NOT_AVAILABLE",
            "details": [
              "feature"
            ],
            "message": {
              "en": "This feature is not available yet.",
              "tr": "Bu özellik henüz kullanıma açık değil."
            },
            "since": "2026-11-27",
            "statuses": [
              403
            ]
          },
          {
            "code": "EDGE_UNAVAILABLE",
            "details": [
              "feature"
            ],
            "message": {
              "en": "Terminals and preview ports are not available on this deployment right now. Try again later.",
              "tr": "Terminal ve önizleme portları bu ortamda şu an kullanılamıyor. Daha sonra yeniden dene."
            },
            "since": "2026-11-27",
            "statuses": [
              503
            ]
          },
          {
            "code": "PREVIEW_BLOCKED",
            "message": {
              "en": "This preview port is blocked by the platform; no access link can be issued.",
              "tr": "Bu önizleme portu platform tarafından engellendi; erişim bağlantısı verilemiyor."
            },
            "since": "2026-11-27",
            "statuses": [
              403
            ]
          },
          {
            "code": "ORG_REQUIRES_TWO_FACTOR",
            "details": [
              "organizationId",
              "setupPath"
            ],
            "message": {
              "en": "This organization requires two-factor authentication. The API key owner must turn it on for their account.",
              "tr": "Bu organizasyon iki adımlı doğrulama gerektiriyor. API anahtarının sahibi hesabında iki adımlı doğrulamayı açmalı."
            },
            "since": "2026-11-28",
            "statuses": [
              403
            ]
          },
          {
            "code": "TOOLS_WITH_SNAPSHOT",
            "message": {
              "en": "Tools cannot be chosen for a machine created from a snapshot; the snapshot brings its own tools.",
              "tr": "Anlık görüntüden açılan makinede araç seçilemez; araçlar anlık görüntüyle birlikte gelir."
            },
            "since": "2026-11-29",
            "statuses": [
              400
            ]
          },
          {
            "code": "TOOLS_DISK_BUDGET",
            "details": [
              "limitMib",
              "requestedMib"
            ],
            "message": {
              "en": "The selected tools do not fit the machine tool disk. Choose fewer tools.",
              "tr": "Seçilen araçlar makinenin araç diskine sığmıyor. Daha az araç seç."
            },
            "since": "2026-11-29",
            "statuses": [
              400
            ]
          },
          {
            "code": "TOOL_NOT_FOUND",
            "message": {
              "en": "This tool is not on the machine.",
              "tr": "Bu araç makinede yok."
            },
            "since": "2026-11-29",
            "statuses": [
              404
            ]
          },
          {
            "code": "TOOL_NOT_RETRYABLE",
            "details": [
              "reason",
              "attempts",
              "maxAttempts"
            ],
            "message": {
              "en": "This tool install cannot be retried: its attempts are used up or the tool is no longer in the catalogue.",
              "tr": "Bu aracın kurulumu yeniden denenemez: deneme hakkı bitti ya da araç artık katalogda değil."
            },
            "since": "2026-11-29",
            "statuses": [
              409
            ]
          },
          {
            "code": "CREDIT_INSUFFICIENT",
            "details": [
              "balanceKurus",
              "requiredKurus",
              "reason"
            ],
            "message": {
              "en": "Your credit balance is not enough for this operation. Try again once your balance is replenished.",
              "tr": "Bakiyen bu işlem için yeterli değil. Bakiyen yenilendiğinde yeniden dene."
            },
            "since": "2026-11-29",
            "statuses": [
              402
            ]
          },
          {
            "code": "PLAN_LIMIT_SERVICES",
            "details": [
              "resource",
              "limit",
              "used",
              "planBased",
              "paymentsEnabled",
              "upgradeUrl"
            ],
            "message": {
              "en": "You reached the service limit of this machine. Delete a service you no longer use and try again.",
              "tr": "Bu makinenin servis sınırına ulaştın. Kullanmadığın bir servisi silip yeniden dene."
            },
            "since": "2026-12-03",
            "statuses": [
              402
            ]
          },
          {
            "code": "SERVICE_NOT_FOUND",
            "message": {
              "en": "This machine has no service with this name.",
              "tr": "Bu makinede bu adda bir servis yok."
            },
            "since": "2026-12-03",
            "statuses": [
              404
            ]
          },
          {
            "code": "SERVICE_NAME_TAKEN",
            "details": [
              "name"
            ],
            "message": {
              "en": "This machine already has a service with this name.",
              "tr": "Bu makinede bu adda bir servis zaten var."
            },
            "since": "2026-12-03",
            "statuses": [
              409
            ]
          },
          {
            "code": "SERVICES_UNSUPPORTED",
            "details": [
              "reason"
            ],
            "message": {
              "en": "This machine cannot run background services right now.",
              "tr": "Bu makine şu an servisleri desteklemiyor."
            },
            "since": "2026-12-03",
            "statuses": [
              409
            ]
          },
          {
            "code": "SERVICE_DISABLED",
            "message": {
              "en": "The service is stopped. Start it instead of restarting it.",
              "tr": "Servis durdurulmuş. Yeniden başlatmak yerine önce başlat."
            },
            "since": "2026-12-03",
            "statuses": [
              409
            ]
          },
          {
            "code": "WORKSPACE_SIZE_NOT_ALLOWED",
            "details": [
              "sizeGib",
              "maxSizeGib",
              "choices"
            ],
            "message": {
              "en": "Your plan does not allow this disk size.",
              "tr": "Planın bu disk boyutuna izin vermiyor."
            },
            "since": "2026-12-04",
            "statuses": [
              402
            ]
          },
          {
            "code": "WORKSPACE_SHRINK_REFUSED",
            "details": [
              "sizeGib",
              "currentGib"
            ],
            "message": {
              "en": "The persistent disk cannot be made smaller, only larger.",
              "tr": "Kalıcı disk küçültülemez; yalnız büyütülebilir."
            },
            "since": "2026-12-04",
            "statuses": [
              409
            ]
          },
          {
            "code": "WORKSPACE_GROW_UNAVAILABLE",
            "details": [
              "reason"
            ],
            "message": {
              "en": "The persistent disk cannot be made larger right now. Try again later.",
              "tr": "Kalıcı disk şu an büyütülemiyor. Biraz sonra yeniden dene."
            },
            "since": "2026-12-04",
            "statuses": [
              409
            ]
          },
          {
            "code": "DESKTOP_SIZE_TOO_SMALL",
            "details": [
              "size",
              "minSize"
            ],
            "message": {
              "en": "A desktop machine needs at least the medium size (2 GB of memory is not enough for the desktop). Choose medium or large.",
              "tr": "Masaüstü makine en az medium boyutunda olmalı (2 GB bellek masaüstüne yetmez). medium veya large seç."
            },
            "since": "2026-12-05",
            "statuses": [
              400
            ]
          },
          {
            "code": "COMMAND_BLOCKED",
            "details": [
              "reason",
              "target",
              "hint"
            ],
            "message": {
              "en": "The security scan blocked the command: a part of it looks like a blocked network address or path (details.target). If a part that only looks like an address was blocked by mistake, run the command from `hb sh` or from a script file (`hb cp` + `hb exec <machine> -- sh script.sh`).",
              "tr": "Güvenlik taraması komutu çalıştırmadı: komutun bir parçası engelli bir ağ adresi ya da yol gibi göründü (details.target). Ağ adresi gibi görünen bir parça yanlışlıkla engellendiyse komutu `hb sh` ile etkileşimli terminalde ya da bir betik dosyasından (`hb cp` + `hb exec <makine> -- sh betik.sh`) çalıştırabilirsin."
            },
            "since": "2026-12-05",
            "statuses": [
              400
            ]
          },
          {
            "code": "BUDGET_EXCEEDED",
            "details": [
              "budgetId",
              "scope",
              "sandboxId",
              "limitKurus",
              "spentKurus"
            ],
            "message": {
              "en": "This month's spend budget is used up (action: pause). To start the machine, raise the budget, switch its action to \"warn only\" or remove it.",
              "tr": "Bu ayki harcama bütçesi doldu (eylemi: duraklat). Makineyi başlatmak için bütçeyi artır, eylemini \"yalnız uyar\" yap ya da bütçeyi kaldır."
            },
            "since": "2026-12-05",
            "statuses": [
              402
            ]
          },
          {
            "code": "BUDGET_NOT_FOUND",
            "message": {
              "en": "This budget was not found.",
              "tr": "Bu bütçe bulunamadı."
            },
            "since": "2026-12-05",
            "statuses": [
              404
            ]
          },
          {
            "code": "BUDGET_EXISTS",
            "details": [
              "budgetId"
            ],
            "message": {
              "en": "This target already has a budget; change the existing budget instead of adding a new one.",
              "tr": "Bu hedef için zaten bir bütçe var; yenisini eklemek yerine mevcut bütçeyi değiştir."
            },
            "since": "2026-12-05",
            "statuses": [
              409
            ]
          },
          {
            "code": "SCHEDULE_NOT_FOUND",
            "message": {
              "en": "This scheduled job was not found.",
              "tr": "Bu zamanlanmış iş bulunamadı."
            },
            "since": "2026-12-06",
            "statuses": [
              404
            ]
          },
          {
            "code": "SCHEDULE_LIMIT",
            "details": [
              "limit"
            ],
            "message": {
              "en": "An organization can have at most 5 scheduled jobs. Delete one before adding another.",
              "tr": "Bir organizasyonda en fazla 5 zamanlanmış iş olabilir. Yenisini eklemek için önce birini sil."
            },
            "since": "2026-12-06",
            "statuses": [
              409
            ]
          },
          {
            "code": "SCHEDULE_NEW_ORGANIZATION",
            "details": [
              "until"
            ],
            "message": {
              "en": "Creating scheduled jobs is closed during the first 7 days of a new organization. The limit prevents abuse; you can add jobs when the period ends.",
              "tr": "Yeni organizasyonlarda zamanlanmış iş oluşturma ilk 7 gün kapalıdır. Kötüye kullanımı önlemek için bu sınır konuldu; süre dolunca iş ekleyebilirsin."
            },
            "since": "2026-12-06",
            "statuses": [
              403
            ]
          },
          {
            "code": "SCHEDULE_CRON_INVALID",
            "details": [
              "problem",
              "minIntervalMinutes"
            ],
            "message": {
              "en": "The schedule expression is invalid. Use a 5-field cron (minute hour day month weekday); the shortest interval is 15 minutes.",
              "tr": "Zamanlama ifadesi geçersiz. 5 alanlı cron kullan (dakika saat gün ay haftanın-günü); en kısa aralık 15 dakikadır."
            },
            "since": "2026-12-06",
            "statuses": [
              400
            ]
          },
          {
            "code": "SCHEDULE_DISABLED",
            "details": [
              "disabledReason"
            ],
            "message": {
              "en": "This scheduled job is disabled. It accepts triggers again once you enable it.",
              "tr": "Bu zamanlanmış iş devre dışı. Etkinleştirdikten sonra tetik kabul eder."
            },
            "since": "2026-12-06",
            "statuses": [
              409
            ]
          },
          {
            "code": "TRIGGER_UNAUTHORIZED",
            "message": {
              "en": "The trigger could not be authenticated. Send a valid trigger token (Authorization: Bearer) or an X-Hadronbox-Signature signature.",
              "tr": "Tetik kimliği doğrulanamadı. Geçerli bir tetik token’ı (Authorization: Bearer) ya da X-Hadronbox-Signature imzası gönder."
            },
            "since": "2026-12-06",
            "statuses": [
              401
            ]
          },
          {
            "code": "TRIGGER_PAYLOAD_TOO_LARGE",
            "message": {
              "en": "The trigger body can be at most 64 KB.",
              "tr": "Tetik gövdesi en fazla 64 KB olabilir."
            },
            "since": "2026-12-06",
            "statuses": [
              413
            ]
          },
          {
            "code": "AGENT_RUNS_DISABLED",
            "message": {
              "en": "Agent runs are turned off in this environment.",
              "tr": "Ajan çalıştırma bu ortamda kapalı."
            },
            "since": "2026-12-06",
            "statuses": [
              404
            ]
          },
          {
            "code": "AGENT_RUN_NOT_FOUND",
            "message": {
              "en": "This agent run was not found.",
              "tr": "Bu ajan çalıştırması bulunamadı."
            },
            "since": "2026-12-06",
            "statuses": [
              404
            ]
          },
          {
            "code": "REPO_URL_INVALID",
            "details": [
              "reason"
            ],
            "message": {
              "en": "The repository URL is not valid. Only public repositories on github.com, gitlab.com or bitbucket.org over https can be run; the URL must not contain a user name, password or query.",
              "tr": "Depo adresi geçersiz. Yalnız https ile github.com, gitlab.com veya bitbucket.org üzerindeki herkese açık depolar çalıştırılabilir; adreste kullanıcı adı, parola veya sorgu olmamalı."
            },
            "since": "2026-12-06",
            "statuses": [
              400
            ]
          },
          {
            "code": "AGENT_RUN_SECRET_NOT_FOUND",
            "details": [
              "names"
            ],
            "message": {
              "en": "One of the selected secrets does not exist in this organization. Check the name on the Secrets page.",
              "tr": "Seçilen anahtarlardan biri bu kuruluşta yok. Gizli anahtarlar sayfasından adı kontrol et."
            },
            "since": "2026-12-06",
            "statuses": [
              400
            ]
          },
          {
            "code": "AGENT_RUN_NOT_CANCELLABLE",
            "details": [
              "status"
            ],
            "message": {
              "en": "This run has already ended; it cannot be cancelled.",
              "tr": "Bu çalıştırma zaten bitti; iptal edilemez."
            },
            "since": "2026-12-06",
            "statuses": [
              409
            ]
          },
          {
            "code": "AGENT_RUN_LIMIT",
            "details": [
              "limit"
            ],
            "message": {
              "en": "At most 5 agent runs can be unfinished at the same time. Wait for one to finish or cancel one.",
              "tr": "Aynı anda en fazla 5 ajan çalıştırması sürebilir. Birinin bitmesini bekle ya da birini iptal et."
            },
            "since": "2026-12-06",
            "statuses": [
              409
            ]
          },
          {
            "code": "AGENT_RUN_GROUP_NOT_FOUND",
            "message": {
              "en": "This comparison was not found.",
              "tr": "Bu karşılaştırma bulunamadı."
            },
            "since": "2026-12-06",
            "statuses": [
              404
            ]
          }
        ]
      },
      "ExecDaemonDto": {
        "properties": {
          "command": {
            "example": "ls -la",
            "maxLength": 4000,
            "type": "string"
          },
          "timeoutMs": {
            "example": 30000,
            "maximum": 3600000,
            "minimum": 1,
            "type": "number"
          }
        },
        "required": [
          "command"
        ],
        "type": "object"
      },
      "ExecStarted": {
        "properties": {
          "executionId": {
            "description": "Stream the output at GET /v1/sandboxes/{id}/executions/{executionId}/output",
            "example": "exe_3f2a",
            "type": "string"
          },
          "pid": {
            "example": 4242,
            "type": "number"
          }
        },
        "required": [
          "executionId"
        ],
        "type": "object"
      },
      "ExposePortDto": {
        "properties": {
          "access": {
            "default": "private",
            "description": "private: preview cookie or token required. public: not available yet (preview links are private only)",
            "enum": [
              "private",
              "public"
            ],
            "type": "string"
          },
          "autoWake": {
            "default": true,
            "description": "A request to a paused machine wakes it",
            "type": "boolean"
          },
          "label": {
            "example": "vite dev server",
            "maxLength": 60,
            "type": "string"
          },
          "port": {
            "description": "Guest TCP port (not 52, 5900-5999, 6080, 8052)",
            "example": 3000,
            "maximum": 65535,
            "minimum": 1,
            "type": "number"
          }
        },
        "required": [
          "port"
        ],
        "type": "object"
      },
      "ExposedPort": {
        "properties": {
          "access": {
            "enum": [
              "private",
              "public"
            ],
            "type": "string"
          },
          "autoWake": {
            "type": "boolean"
          },
          "blocked": {
            "description": "Blocked by the platform (abuse); the preview answers 451",
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "example": "prt_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "port": {
            "example": 3000,
            "maximum": 65535,
            "minimum": 1,
            "type": "number"
          },
          "sandboxId": {
            "example": "sbx_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
            "type": "string"
          },
          "url": {
            "description": "Preview URL; stable across pause/resume, never reused after removal",
            "example": "https://3000-k7m2x9qpz4.hbox.tr",
            "type": "string"
          }
        },
        "required": [
          "id",
          "sandboxId",
          "port",
          "url",
          "access",
          "autoWake",
          "label",
          "blocked",
          "createdAt"
        ],
        "type": "object"
      },
      "FanoutSnapshotDto": {
        "properties": {
          "allOrNothing": {
            "default": true,
            "description": "true: if the machine limit, the credit balance or the spend budget cannot cover all `count` machines, nothing is opened and the request fails (402). false: as many machines as fit are opened and the rest are listed in `failed`",
            "type": "boolean"
          },
          "count": {
            "description": "How many machines to open",
            "example": 3,
            "maximum": 10,
            "minimum": 1,
            "type": "number"
          },
          "namePrefix": {
            "description": "Machines are named `<namePrefix>-1` ... `<namePrefix>-N`; default: the snapshot name",
            "example": "deney",
            "pattern": "^[a-z0-9][a-z0-9-]{0,34}$",
            "type": "string"
          },
          "size": {
            "description": "Size of every machine; default: the snapshot default",
            "enum": [
              "small",
              "medium",
              "large"
            ],
            "type": "string"
          }
        },
        "required": [
          "count"
        ],
        "type": "object"
      },
      "IssuePreviewTokenDto": {
        "properties": {
          "ttlSeconds": {
            "default": 3600,
            "description": "Token lifetime in seconds; capped at the calling API key expiry",
            "maximum": 86400,
            "minimum": 60,
            "type": "number"
          }
        },
        "type": "object"
      },
      "IssueTerminalTicketDto": {
        "properties": {
          "cols": {
            "default": 80,
            "example": 120,
            "maximum": 1000,
            "minimum": 1,
            "type": "number"
          },
          "rows": {
            "default": 24,
            "example": 40,
            "maximum": 1000,
            "minimum": 1,
            "type": "number"
          },
          "term": {
            "default": "xterm-256color",
            "enum": [
              "xterm-256color",
              "xterm",
              "screen-256color",
              "tmux-256color",
              "vt100"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Machine": {
        "properties": {
          "autoPause": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "diskMib": {
            "nullable": true,
            "type": "number"
          },
          "displayGeometry": {
            "description": "Desktop machines only",
            "example": "1280x800",
            "nullable": true,
            "type": "string"
          },
          "goldenImage": {
            "type": "string"
          },
          "idleTimeoutMinutes": {
            "nullable": true,
            "type": "number"
          },
          "imageKind": {
            "enum": [
              "terminal",
              "desktop"
            ],
            "type": "string"
          },
          "imageTag": {
            "nullable": true,
            "type": "string"
          },
          "lastActiveAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "memoryMib": {
            "nullable": true,
            "type": "number"
          },
          "name": {
            "example": "web-1",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "ownerUserId": {
            "nullable": true,
            "type": "string"
          },
          "pausedReason": {
            "description": "Why the machine is paused; null otherwise",
            "enum": [
              "user",
              "idle",
              "max_runtime",
              "suspended",
              "abuse",
              "credit_exhausted",
              "budget"
            ],
            "nullable": true,
            "type": "string"
          },
          "runningSince": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sandboxId": {
            "example": "sbx_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
            "type": "string"
          },
          "size": {
            "enum": [
              "small",
              "medium",
              "large"
            ],
            "nullable": true,
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/MachineSource"
          },
          "sourceSnapshotId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "Clients MUST treat an unknown value as \"other\"",
            "enum": [
              "creating",
              "running",
              "paused",
              "stopped",
              "error"
            ],
            "type": "string"
          },
          "statusReason": {
            "description": "Set with status=error",
            "nullable": true,
            "type": "string"
          },
          "templateCode": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "vcpuCount": {
            "nullable": true,
            "type": "number"
          },
          "workspace": {
            "description": "persistent = /workspace is the owner's persistent volume (kept when the machine is deleted, reused by the next machine); ephemeral = /workspace is deleted with the machine. Clients MUST treat an unknown value as \"ephemeral\"",
            "enum": [
              "persistent",
              "ephemeral"
            ],
            "readOnly": true,
            "type": "string"
          },
          "workspaceRequestedSizeMib": {
            "description": "Pending grow of that volume in MiB (PUT /workspace/size), applied before the volume next boots on a new VM; null when no grow is pending or there is no persistent volume",
            "example": 61440,
            "nullable": true,
            "readOnly": true,
            "type": "number"
          },
          "workspaceSizeMib": {
            "description": "Size of the persistent /workspace volume attached to the machine, in MiB; null when workspace is ephemeral. diskMib is the temporary machine disk of the size preset (free), not this volume",
            "example": 51200,
            "nullable": true,
            "readOnly": true,
            "type": "number"
          }
        },
        "required": [
          "sandboxId",
          "name",
          "status",
          "statusReason",
          "goldenImage",
          "imageTag",
          "imageKind",
          "displayGeometry",
          "vcpuCount",
          "memoryMib",
          "lastActiveAt",
          "organizationId",
          "ownerUserId",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "size",
          "diskMib",
          "autoPause",
          "idleTimeoutMinutes",
          "templateCode",
          "sourceSnapshotId",
          "runningSince",
          "pausedReason",
          "source",
          "workspace",
          "workspaceSizeMib",
          "workspaceRequestedSizeMib"
        ],
        "type": "object"
      },
      "MachineDetail": {
        "properties": {
          "autoPause": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "diskMib": {
            "nullable": true,
            "type": "number"
          },
          "displayGeometry": {
            "description": "Desktop machines only",
            "example": "1280x800",
            "nullable": true,
            "type": "string"
          },
          "envKeys": {
            "description": "Environment variable names (never values)",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "goldenImage": {
            "type": "string"
          },
          "idleTimeoutMinutes": {
            "nullable": true,
            "type": "number"
          },
          "imageKind": {
            "enum": [
              "terminal",
              "desktop"
            ],
            "type": "string"
          },
          "imageTag": {
            "nullable": true,
            "type": "string"
          },
          "lastActiveAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "memoryMib": {
            "nullable": true,
            "type": "number"
          },
          "name": {
            "example": "web-1",
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "ownerUserId": {
            "nullable": true,
            "type": "string"
          },
          "pausedReason": {
            "description": "Why the machine is paused; null otherwise",
            "enum": [
              "user",
              "idle",
              "max_runtime",
              "suspended",
              "abuse",
              "credit_exhausted",
              "budget"
            ],
            "nullable": true,
            "type": "string"
          },
          "runningSince": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sandboxId": {
            "example": "sbx_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
            "type": "string"
          },
          "size": {
            "enum": [
              "small",
              "medium",
              "large"
            ],
            "nullable": true,
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/MachineSource"
          },
          "sourceSnapshotId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "Clients MUST treat an unknown value as \"other\"",
            "enum": [
              "creating",
              "running",
              "paused",
              "stopped",
              "error"
            ],
            "type": "string"
          },
          "statusReason": {
            "description": "Set with status=error",
            "nullable": true,
            "type": "string"
          },
          "templateCode": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "vcpuCount": {
            "nullable": true,
            "type": "number"
          },
          "workspace": {
            "description": "persistent = /workspace is the owner's persistent volume (kept when the machine is deleted, reused by the next machine); ephemeral = /workspace is deleted with the machine. Clients MUST treat an unknown value as \"ephemeral\"",
            "enum": [
              "persistent",
              "ephemeral"
            ],
            "readOnly": true,
            "type": "string"
          },
          "workspaceRequestedSizeMib": {
            "description": "Pending grow of that volume in MiB (PUT /workspace/size), applied before the volume next boots on a new VM; null when no grow is pending or there is no persistent volume",
            "example": 61440,
            "nullable": true,
            "readOnly": true,
            "type": "number"
          },
          "workspaceSizeMib": {
            "description": "Size of the persistent /workspace volume attached to the machine, in MiB; null when workspace is ephemeral. diskMib is the temporary machine disk of the size preset (free), not this volume",
            "example": 51200,
            "nullable": true,
            "readOnly": true,
            "type": "number"
          }
        },
        "required": [
          "sandboxId",
          "name",
          "status",
          "statusReason",
          "goldenImage",
          "imageTag",
          "imageKind",
          "displayGeometry",
          "vcpuCount",
          "memoryMib",
          "lastActiveAt",
          "organizationId",
          "ownerUserId",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "size",
          "diskMib",
          "autoPause",
          "idleTimeoutMinutes",
          "templateCode",
          "sourceSnapshotId",
          "runningSince",
          "pausedReason",
          "source",
          "workspace",
          "workspaceSizeMib",
          "workspaceRequestedSizeMib",
          "envKeys"
        ],
        "type": "object"
      },
      "MachineQuota": {
        "properties": {
          "limit": {
            "minimum": 0,
            "type": "number"
          },
          "organizationUsed": {
            "description": "Live machines of this organization alone (equals used when scope is organization)",
            "minimum": 0,
            "type": "number"
          },
          "scope": {
            "description": "owner = beta/free package: counted together across every organization the owner owns (DEC-170); organization = this organization's own machines",
            "enum": [
              "organization",
              "owner"
            ],
            "type": "string"
          },
          "used": {
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "used",
          "limit",
          "scope",
          "organizationUsed"
        ],
        "type": "object"
      },
      "MachineService": {
        "properties": {
          "command": {
            "description": "The command line. null for an API key without the `machines:exec` scope (a command may carry a secret); panel sessions and keys with `machines:exec` always get it",
            "example": "opencode serve --port 4096",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "cwd": {
            "example": "/workspace",
            "type": "string"
          },
          "enabled": {
            "description": "Desired: true = should run, false = stopped",
            "type": "boolean"
          },
          "lastError": {
            "description": "Short reason (code + text, at most 256 bytes), e.g. `cwd_missing: /workspace/app`",
            "example": null,
            "nullable": true,
            "type": "string"
          },
          "lastExitCode": {
            "example": null,
            "nullable": true,
            "type": "number"
          },
          "lastExitSignal": {
            "description": "e.g. SIGKILL",
            "example": null,
            "nullable": true,
            "type": "string"
          },
          "name": {
            "example": "opencode",
            "type": "string"
          },
          "observedAt": {
            "description": "Last report from the machine",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "pid": {
            "description": "Process id while it runs",
            "example": null,
            "nullable": true,
            "type": "number"
          },
          "restart": {
            "enum": [
              "always",
              "on-failure"
            ],
            "type": "string"
          },
          "restarts": {
            "description": "Restarts the machine made for this definition",
            "example": 0,
            "minimum": 0,
            "type": "number"
          },
          "state": {
            "description": "Observed state. pending = not applied yet (or the machine is not running); starting; running; backoff (exited, waiting to restart); crashloop (crashed too often, waits 5 min); stopped; failed (could not start, see lastError); unsupported (this machine image cannot run services). Clients MUST treat an unknown value as \"other\"",
            "enum": [
              "pending",
              "starting",
              "running",
              "backoff",
              "crashloop",
              "stopped",
              "failed",
              "unsupported"
            ],
            "type": "string"
          },
          "stateSince": {
            "description": "When it entered `state`",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "name",
          "command",
          "cwd",
          "enabled",
          "restart",
          "state",
          "pid",
          "restarts",
          "lastExitCode",
          "lastExitSignal",
          "lastError",
          "stateSince",
          "observedAt",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "MachineServiceLogs": {
        "properties": {
          "bytes": {
            "description": "Total bytes the service wrote since it started on this boot",
            "minimum": 0,
            "type": "number"
          },
          "name": {
            "example": "opencode",
            "type": "string"
          },
          "output": {
            "description": "Last output bytes (stdout and stderr, at most `tail` bytes)",
            "type": "string"
          },
          "truncated": {
            "description": "true when older output was cut off",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "output",
          "bytes",
          "truncated"
        ],
        "type": "object"
      },
      "MachineSource": {
        "properties": {
          "label": {
            "example": "ubuntu",
            "type": "string"
          },
          "ref": {
            "description": "`t:<imageRef>`, `s:<snapshot>` or `<image>[:tag]`",
            "example": "t:ubuntu-24.04",
            "type": "string"
          },
          "type": {
            "enum": [
              "template",
              "snapshot",
              "image"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "ref",
          "label"
        ],
        "type": "object"
      },
      "MachineTool": {
        "properties": {
          "errorCode": {
            "description": "Short failure code when state=failed",
            "example": null,
            "nullable": true,
            "type": "string"
          },
          "id": {
            "description": "Catalogue tool id",
            "example": "claude-code",
            "type": "string"
          },
          "progressPct": {
            "example": 0,
            "maximum": 100,
            "minimum": 0,
            "type": "number"
          },
          "state": {
            "description": "pending = queued; installing; ready; failed (POST .../retry). Clients MUST treat an unknown value as \"other\"",
            "enum": [
              "pending",
              "installing",
              "ready",
              "failed"
            ],
            "type": "string"
          },
          "step": {
            "description": "Current install step reported by the machine",
            "example": null,
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "Installed version (set when ready)",
            "example": null,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "state",
          "progressPct",
          "step",
          "version",
          "errorCode",
          "updatedAt"
        ],
        "type": "object"
      },
      "MachineUsage": {
        "properties": {
          "budget": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Budget"
              }
            ],
            "description": "The machine's own budget, if any",
            "nullable": true,
            "type": "object"
          },
          "currentRun": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MachineUsageRun"
              }
            ],
            "description": "The open run; null when not running",
            "nullable": true,
            "type": "object"
          },
          "hourlyRateKurus": {
            "description": "Current spend per hour in kuruş: the running price while running, 0 otherwise",
            "type": "number"
          },
          "monthSpentKurus": {
            "description": "Compute spend of this machine this month (Istanbul) in kuruş; approximate",
            "type": "number"
          },
          "periodEnd": {
            "format": "date-time",
            "type": "string"
          },
          "periodStart": {
            "format": "date-time",
            "type": "string"
          },
          "runningRateKurusPerHour": {
            "description": "Price per running hour of this machine (size and image kind) in kuruş; null without an active price book",
            "nullable": true,
            "type": "number"
          },
          "sandboxId": {
            "type": "string"
          },
          "status": {
            "description": "Machine status (creating | running | paused | stopped | error)",
            "type": "string"
          }
        },
        "required": [
          "sandboxId",
          "status",
          "periodStart",
          "periodEnd",
          "monthSpentKurus",
          "hourlyRateKurus",
          "runningRateKurusPerHour",
          "currentRun",
          "budget"
        ],
        "type": "object"
      },
      "MachineUsageRun": {
        "properties": {
          "costKurus": {
            "description": "Approximate cost of the current run in kuruş (minimum charge included)",
            "type": "number"
          },
          "minutes": {
            "description": "Whole minutes since the run started",
            "type": "number"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "startedAt",
          "minutes",
          "costKurus"
        ],
        "type": "object"
      },
      "MeApiKey": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "MeAuth": {
        "properties": {
          "apiKey": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeApiKey"
              }
            ],
            "description": "Present with an API key"
          },
          "type": {
            "enum": [
              "session",
              "api_key"
            ],
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "MeBetaInvites": {
        "properties": {
          "enabled": {
            "description": "TASK-218: false while SIGNUP_MODE=open — no user-owned invite codes are handed out (GET /invites/beta answers 409 BETA_INVITES_CLOSED); existing codes stay valid until used",
            "type": "boolean"
          },
          "total": {
            "type": "number"
          },
          "used": {
            "type": "number"
          }
        },
        "required": [
          "total",
          "used",
          "enabled"
        ],
        "type": "object"
      },
      "MeConsent": {
        "properties": {
          "acceptedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "changed": {
            "$ref": "#/components/schemas/MeConsentChanged"
          },
          "current": {
            "$ref": "#/components/schemas/MeConsentCurrent"
          },
          "kvkkNoticeVersion": {
            "nullable": true,
            "type": "string"
          },
          "required": {
            "description": "A published legal text changed since the last acceptance (TASK-300). Panel sessions must accept again (POST /me/consents) before mutating calls; API keys keep working with a Warning header",
            "type": "boolean"
          },
          "termsVersion": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "termsVersion",
          "kvkkNoticeVersion",
          "acceptedAt",
          "required",
          "changed",
          "current"
        ],
        "type": "object"
      },
      "MeConsentChanged": {
        "properties": {
          "kvkkNotice": {
            "type": "boolean"
          },
          "terms": {
            "type": "boolean"
          }
        },
        "required": [
          "terms",
          "kvkkNotice"
        ],
        "type": "object"
      },
      "MeConsentCurrent": {
        "properties": {
          "kvkkNoticeVersion": {
            "type": "string"
          },
          "termsVersion": {
            "type": "string"
          }
        },
        "required": [
          "termsVersion",
          "kvkkNoticeVersion"
        ],
        "type": "object"
      },
      "MeCredit": {
        "properties": {
          "balanceKurus": {
            "description": "Balance in kuruş",
            "type": "number"
          },
          "enforced": {
            "type": "boolean"
          },
          "state": {
            "enum": [
              "ok",
              "low",
              "exhausted"
            ],
            "type": "string"
          }
        },
        "required": [
          "balanceKurus",
          "state",
          "enforced"
        ],
        "type": "object"
      },
      "MeMachineSize": {
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "diskGib": {
            "type": "number"
          },
          "memoryGib": {
            "type": "number"
          },
          "size": {
            "enum": [
              "small",
              "medium",
              "large"
            ],
            "type": "string"
          },
          "vcpu": {
            "type": "number"
          }
        },
        "required": [
          "size",
          "vcpu",
          "memoryGib",
          "diskGib",
          "allowed"
        ],
        "type": "object"
      },
      "MeMembership": {
        "properties": {
          "role": {
            "enum": [
              "owner",
              "admin",
              "member"
            ],
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "type": "object"
      },
      "MeMembershipItem": {
        "properties": {
          "isPersonal": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "role": {
            "enum": [
              "owner",
              "admin",
              "member"
            ],
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "name",
          "isPersonal",
          "role"
        ],
        "type": "object"
      },
      "MeOrganization": {
        "properties": {
          "deletionKind": {
            "description": "TASK-230: why the organization is scheduled for deletion — standalone = an owner deleted it on its own (restorable by an owner inside the window, POST /organizations/current/restore); account = with its sole owner account (TASK-312). null = not scheduled",
            "enum": [
              "standalone",
              "account"
            ],
            "nullable": true,
            "type": "string"
          },
          "deletionScheduledAt": {
            "description": "TASK-312: the sole owner chose to delete this organization with their account; it is read-only until this time (mutating calls answer 409 ORGANIZATION_DELETION_PENDING). null = not scheduled",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isPersonal": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "isPersonal",
          "deletionScheduledAt",
          "deletionKind"
        ],
        "type": "object"
      },
      "MePackage": {
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "name"
        ],
        "type": "object"
      },
      "MePlan": {
        "properties": {
          "code": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "limits": {
            "$ref": "#/components/schemas/PlanLimits"
          },
          "machineSizes": {
            "items": {
              "$ref": "#/components/schemas/MeMachineSize"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "package": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MePackage"
              }
            ],
            "description": "The package (limit profile) the organization's limits come from, e.g. { code: 'beta', name: 'Beta' }; null when it has none (free default or a legacy paid period)",
            "nullable": true,
            "type": "object"
          },
          "source": {
            "enum": [
              "free_default",
              "subscription"
            ],
            "type": "string"
          },
          "tier": {
            "deprecated": true,
            "description": "Legacy display label of the plan row; do not branch on it — use `package` and `limits`",
            "enum": [
              "free",
              "pro"
            ],
            "type": "string"
          }
        },
        "required": [
          "code",
          "name",
          "tier",
          "package",
          "source",
          "expiresAt",
          "limits",
          "machineSizes"
        ],
        "type": "object"
      },
      "MeResponse": {
        "properties": {
          "auth": {
            "$ref": "#/components/schemas/MeAuth"
          },
          "betaInvites": {
            "$ref": "#/components/schemas/MeBetaInvites"
          },
          "consentRequired": {
            "description": "Same as user.consent.required (TASK-300)",
            "type": "boolean"
          },
          "credit": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeCredit"
              }
            ],
            "description": "Credit balance band (TASK-364); null while the organization has no credit account",
            "nullable": true,
            "type": "object"
          },
          "membership": {
            "$ref": "#/components/schemas/MeMembership"
          },
          "memberships": {
            "items": {
              "$ref": "#/components/schemas/MeMembershipItem"
            },
            "type": "array"
          },
          "organization": {
            "$ref": "#/components/schemas/MeOrganization"
          },
          "plan": {
            "$ref": "#/components/schemas/MePlan"
          },
          "platformOperator": {
            "description": "Operator console entry visible (always false for API keys)",
            "type": "boolean"
          },
          "user": {
            "$ref": "#/components/schemas/MeUser"
          }
        },
        "required": [
          "user",
          "organization",
          "membership",
          "memberships",
          "plan",
          "betaInvites",
          "auth",
          "platformOperator",
          "credit",
          "consentRequired"
        ],
        "type": "object"
      },
      "MeUser": {
        "properties": {
          "consent": {
            "$ref": "#/components/schemas/MeConsent"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "locale": {
            "description": "The account's language (DEC-190); default tr. PATCH /me changes it",
            "enum": [
              "tr",
              "en"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "notifyUsageEmails": {
            "type": "boolean"
          },
          "pendingEmail": {
            "nullable": true,
            "type": "string"
          },
          "pendingEmailExpiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "emailVerified",
          "createdAt",
          "pendingEmail",
          "pendingEmailExpiresAt",
          "consent",
          "notifyUsageEmails",
          "locale"
        ],
        "type": "object"
      },
      "Pagination": {
        "properties": {
          "limit": {
            "example": 20,
            "minimum": 1,
            "type": "number"
          },
          "page": {
            "example": 1,
            "minimum": 1,
            "type": "number"
          },
          "total": {
            "example": 1,
            "minimum": 0,
            "type": "number"
          },
          "totalPages": {
            "example": 1,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "page",
          "limit",
          "total",
          "totalPages"
        ],
        "type": "object"
      },
      "PlanLimits": {
        "properties": {
          "autoPauseOptional": {
            "type": "boolean"
          },
          "desktopAllowed": {
            "type": "boolean"
          },
          "idleTimeoutMinutes": {
            "type": "number"
          },
          "maxExposedPorts": {
            "type": "number"
          },
          "maxMembers": {
            "type": "number"
          },
          "maxMemoryMib": {
            "description": "Per machine, MiB",
            "type": "number"
          },
          "maxRunMinutes": {
            "description": "null = no limit",
            "nullable": true,
            "type": "number"
          },
          "maxSandboxes": {
            "type": "number"
          },
          "maxServicesPerMachine": {
            "description": "Background services per machine",
            "type": "number"
          },
          "maxSnapshots": {
            "type": "number"
          },
          "maxStorageMib": {
            "description": "Persistent volume per user, MiB",
            "type": "number"
          },
          "maxTerminalSessions": {
            "type": "number"
          },
          "maxVcpu": {
            "description": "Per machine",
            "type": "number"
          },
          "maxWorkspaceVolumeMib": {
            "description": "Largest persistent /workspace size (MiB) the owner may choose (20 / 50 / 100 GiB, grow only)",
            "enum": [
              20480,
              51200,
              102400
            ],
            "type": "number"
          },
          "premiumTemplates": {
            "type": "boolean"
          },
          "publicPortsAllowed": {
            "type": "boolean"
          }
        },
        "required": [
          "maxSandboxes",
          "maxVcpu",
          "maxMemoryMib",
          "maxStorageMib",
          "desktopAllowed",
          "maxMembers",
          "maxSnapshots",
          "idleTimeoutMinutes",
          "maxRunMinutes",
          "premiumTemplates",
          "maxExposedPorts",
          "publicPortsAllowed",
          "maxTerminalSessions",
          "autoPauseOptional",
          "maxServicesPerMachine",
          "maxWorkspaceVolumeMib"
        ],
        "type": "object"
      },
      "PreviewToken": {
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "jti": {
            "description": "Token id; DELETE …/tokens/:jti revokes it",
            "example": "Q2hhbmdlTWVQbGVhc2UxMg",
            "type": "string"
          },
          "token": {
            "description": "hb-pv+jwt token; send it as `X-Hadronbox-Preview-Token` (or `Authorization: Bearer`)",
            "type": "string"
          }
        },
        "required": [
          "token",
          "expiresAt",
          "jti"
        ],
        "type": "object"
      },
      "ReadFile": {
        "properties": {
          "content": {
            "description": "UTF-8 file content",
            "type": "string"
          },
          "path": {
            "example": "src/index.ts",
            "type": "string"
          }
        },
        "required": [
          "path",
          "content"
        ],
        "type": "object"
      },
      "ResponseMeta": {
        "properties": {
          "timestamp": {
            "example": "2026-11-25T12:00:00.000Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "timestamp"
        ],
        "type": "object"
      },
      "SandboxEnvVarDto": {
        "properties": {
          "key": {
            "example": "NODE_ENV",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,127}$",
            "type": "string"
          },
          "value": {
            "example": "production",
            "maxLength": 32768,
            "type": "string"
          }
        },
        "required": [
          "key",
          "value"
        ],
        "type": "object"
      },
      "Schedule": {
        "properties": {
          "command": {
            "type": "string"
          },
          "consecutiveFailures": {
            "description": "Failed or timed-out runs in a row (3 disables the job)",
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "cron": {
            "description": "5-field cron in Europe/Istanbul",
            "example": "0 3 * * *",
            "type": "string"
          },
          "disabledReason": {
            "description": "consecutive_failures (3 failed runs in a row) | machine_deleted | new_account; null while enabled",
            "nullable": true,
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "lastRunAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "lastStatus": {
            "enum": [
              "running",
              "succeeded",
              "failed",
              "timed_out",
              "skipped"
            ],
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nextRunAt": {
            "description": "Next cron firing; null when disabled",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sandboxId": {
            "description": "Machine the job runs on",
            "type": "string"
          },
          "sandboxName": {
            "nullable": true,
            "type": "string"
          },
          "timeoutMinutes": {
            "maximum": 60,
            "minimum": 1,
            "type": "number"
          },
          "triggerEnabled": {
            "description": "True once a trigger token exists (POST /schedules/{id}/trigger-token)",
            "type": "boolean"
          },
          "triggerTokenRotatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "triggerUrl": {
            "description": "URL of the incoming trigger; the token is never shown again",
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "sandboxId",
          "sandboxName",
          "name",
          "cron",
          "command",
          "timeoutMinutes",
          "enabled",
          "disabledReason",
          "consecutiveFailures",
          "lastRunAt",
          "lastStatus",
          "nextRunAt",
          "triggerEnabled",
          "triggerUrl",
          "triggerTokenRotatedAt",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "ScheduleRun": {
        "properties": {
          "durationMs": {
            "nullable": true,
            "type": "number"
          },
          "errorCode": {
            "description": "Why a run failed without a command exit: OVERLAP (skipped), TIMEOUT, EXIT_NONZERO, ABANDONED, or the error code of the resume / write / exec step (e.g. BUDGET_EXCEEDED, CREDIT_INSUFFICIENT)",
            "nullable": true,
            "type": "string"
          },
          "exitCode": {
            "nullable": true,
            "type": "number"
          },
          "finishedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "outputTail": {
            "description": "Last 4 KB of the output (stdout and stderr merged), known secret values replaced by ***",
            "nullable": true,
            "type": "string"
          },
          "scheduleId": {
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "description": "skipped = the previous run was still going",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "timed_out",
              "skipped"
            ],
            "type": "string"
          },
          "trigger": {
            "enum": [
              "cron",
              "url",
              "manual"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "scheduleId",
          "trigger",
          "status",
          "exitCode",
          "durationMs",
          "errorCode",
          "outputTail",
          "startedAt",
          "finishedAt"
        ],
        "type": "object"
      },
      "Snapshot": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "imageKind": {
            "enum": [
              "terminal",
              "desktop"
            ],
            "type": "string"
          },
          "name": {
            "example": "bireysel",
            "type": "string"
          },
          "readyAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "ref": {
            "description": "Machine source reference (create with `snapshotId`)",
            "example": "s:bireysel",
            "type": "string"
          },
          "sizeBytes": {
            "description": "Decimal string (64-bit)",
            "example": "1073741824",
            "nullable": true,
            "type": "string"
          },
          "snapshotId": {
            "example": "snp_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
            "type": "string"
          },
          "sourceMachine": {
            "$ref": "#/components/schemas/SnapshotSourceMachine"
          },
          "status": {
            "enum": [
              "pending",
              "creating",
              "ready",
              "failed"
            ],
            "type": "string"
          },
          "statusReason": {
            "nullable": true,
            "type": "string"
          },
          "templateCode": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "snapshotId",
          "name",
          "ref",
          "status",
          "statusReason",
          "sourceMachine",
          "templateCode",
          "imageKind",
          "sizeBytes",
          "createdAt",
          "readyAt"
        ],
        "type": "object"
      },
      "SnapshotFanout": {
        "properties": {
          "created": {
            "description": "Machines that were created, in name order",
            "items": {
              "$ref": "#/components/schemas/Machine"
            },
            "type": "array"
          },
          "estimate": {
            "$ref": "#/components/schemas/SnapshotFanoutEstimate"
          },
          "failed": {
            "description": "Machines that were not created",
            "items": {
              "$ref": "#/components/schemas/SnapshotFanoutFailure"
            },
            "type": "array"
          },
          "requested": {
            "maximum": 10,
            "minimum": 1,
            "type": "number"
          }
        },
        "required": [
          "created",
          "failed",
          "requested",
          "estimate"
        ],
        "type": "object"
      },
      "SnapshotFanoutEstimate": {
        "properties": {
          "hourlyKurusEach": {
            "description": "One machine for one hour, kurus (VAT included); null without an active price list",
            "nullable": true,
            "type": "number"
          },
          "hourlyKurusTotal": {
            "description": "Requested machines for one hour, kurus",
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "hourlyKurusEach",
          "hourlyKurusTotal"
        ],
        "type": "object"
      },
      "SnapshotFanoutFailure": {
        "properties": {
          "code": {
            "description": "Error code (same codes as POST /sandboxes)",
            "example": "PLAN_LIMIT_MACHINES",
            "type": "string"
          },
          "index": {
            "description": "1-based position, equal to the name suffix",
            "example": 2,
            "minimum": 1,
            "type": "number"
          },
          "name": {
            "example": "deney-2",
            "type": "string"
          }
        },
        "required": [
          "index",
          "name",
          "code"
        ],
        "type": "object"
      },
      "SnapshotSourceMachine": {
        "properties": {
          "name": {
            "type": "string"
          },
          "sandboxId": {
            "description": "null once the source machine is deleted",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "sandboxId",
          "name"
        ],
        "type": "object"
      },
      "Template": {
        "properties": {
          "code": {
            "example": "ubuntu",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "imageKind": {
            "enum": [
              "terminal",
              "desktop"
            ],
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "locked": {
            "description": "premium && the plan has no premium templates",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "premium": {
            "type": "boolean"
          },
          "ref": {
            "example": "t:ubuntu-24.04",
            "type": "string"
          }
        },
        "required": [
          "code",
          "ref",
          "name",
          "description",
          "imageKind",
          "premium",
          "isDefault",
          "locked"
        ],
        "type": "object"
      },
      "TerminalSession": {
        "properties": {
          "apiKeyId": {
            "description": "API key of a CLI / SDK session; null for the panel",
            "nullable": true,
            "type": "string"
          },
          "bytesIn": {
            "description": "Bytes client → machine (informational)",
            "minimum": 0,
            "type": "number"
          },
          "bytesOut": {
            "description": "Bytes machine → client (informational)",
            "minimum": 0,
            "type": "number"
          },
          "clientKind": {
            "enum": [
              "cli",
              "web",
              "sdk"
            ],
            "type": "string"
          },
          "command": {
            "description": "First word of the command (null = login shell)",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "endReason": {
            "enum": [
              "exit",
              "idle_detach",
              "max_duration",
              "revoked",
              "machine_stopped",
              "error"
            ],
            "nullable": true,
            "type": "string"
          },
          "endedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "exitCode": {
            "nullable": true,
            "type": "number"
          },
          "exitSignal": {
            "example": "SIGKILL",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": "trm_3f2a1b9c-0000-4000-8000-000000000001",
            "type": "string"
          },
          "lastActivityAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "lastAttachedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sandboxId": {
            "example": "sbx_3f2a1b9c-0000-4000-8000-000000000001",
            "type": "string"
          },
          "startedAt": {
            "description": "First attach",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "active",
              "detached",
              "ended"
            ],
            "type": "string"
          },
          "userId": {
            "description": "The member who opened the session (the API key creator for key sessions)",
            "type": "string"
          }
        },
        "required": [
          "id",
          "sandboxId",
          "userId",
          "apiKeyId",
          "clientKind",
          "command",
          "status",
          "createdAt",
          "startedAt",
          "lastAttachedAt",
          "lastActivityAt",
          "endedAt",
          "endReason",
          "exitCode",
          "exitSignal",
          "bytesIn",
          "bytesOut"
        ],
        "type": "object"
      },
      "TerminalTicket": {
        "properties": {
          "expiresIn": {
            "description": "Seconds the ticket stays valid",
            "example": 60,
            "type": "number"
          },
          "resume": {
            "description": "true: send RESUME as the first frame (reconnect to a running session)",
            "type": "boolean"
          },
          "sessionId": {
            "example": "trm_3f2a1b9c-0000-4000-8000-000000000001",
            "type": "string"
          },
          "status": {
            "description": "`waking`: the machine was paused and is being resumed — wait until GET /v1/sandboxes/{id} is running",
            "enum": [
              "running",
              "waking"
            ],
            "type": "string"
          },
          "ticket": {
            "description": "Single-use, 60 s. Send it ONLY as the WebSocket subprotocol `hb.tkt.<ticket>` next to `hb.term.v1` — never in the URL; never log it.",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "type": "string"
          },
          "wsUrl": {
            "example": "wss://edge.hadronbox.tr/v1/term",
            "type": "string"
          }
        },
        "required": [
          "sessionId",
          "ticket",
          "wsUrl",
          "expiresIn",
          "status",
          "resume"
        ],
        "type": "object"
      },
      "TriggerToken": {
        "properties": {
          "rotatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "token": {
            "description": "Shown once; only its SHA-256 hash is stored. Rotating invalidates the previous token",
            "type": "string"
          },
          "triggerUrl": {
            "example": "https://api.hadronbox.tr/v1/triggers/sch_0123",
            "type": "string"
          }
        },
        "required": [
          "token",
          "triggerUrl",
          "rotatedAt"
        ],
        "type": "object"
      },
      "UpdateBudgetDto": {
        "properties": {
          "action": {
            "enum": [
              "warn",
              "pause"
            ],
            "type": "string"
          },
          "limitKurus": {
            "maximum": 100000000,
            "minimum": 100,
            "type": "number"
          },
          "warnPercent": {
            "maximum": 99,
            "minimum": 1,
            "type": "number"
          }
        },
        "type": "object"
      },
      "UpdateMachineServiceDto": {
        "properties": {
          "command": {
            "description": "Shell command, run with `bash -lc` as the machine user (1-4096 bytes, no NUL). Never put secrets in it: read them from a file in /workspace instead (e.g. `set -a; . /workspace/.env; set +a; opencode serve`).",
            "example": "opencode serve --port 4096",
            "type": "string"
          },
          "cwd": {
            "description": "Working directory (absolute, no \"..\")",
            "example": "/workspace",
            "type": "string"
          },
          "restart": {
            "enum": [
              "always",
              "on-failure"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateSandboxSettingsDto": {
        "properties": {
          "autoPause": {
            "description": "false = never auto-pause when idle (package autoPauseOptional; beta package: 403 AUTO_PAUSE_REQUIRED)",
            "example": true,
            "type": "boolean"
          },
          "idleTimeoutMinutes": {
            "description": "Idle minutes before auto-pause; 5..package idleTimeoutMinutes (beta package 15)",
            "example": 10,
            "maximum": 1440,
            "minimum": 5,
            "type": "number"
          }
        },
        "type": "object"
      },
      "UpdateScheduleDto": {
        "properties": {
          "command": {
            "maxLength": 2000,
            "type": "string"
          },
          "cron": {
            "example": "0 3 * * *",
            "maxLength": 120,
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "name": {
            "maxLength": 80,
            "type": "string"
          },
          "timeoutMinutes": {
            "maximum": 60,
            "minimum": 1,
            "type": "number"
          }
        },
        "type": "object"
      },
      "UpdateWorkspaceSizeDto": {
        "properties": {
          "sizeGib": {
            "description": "New size of your persistent /workspace disk in GB (GiB). Grow only; the plan decides the largest size (free: 20). Without a disk yet, it is created with this size and your first machine boots with it",
            "enum": [
              20,
              50,
              100
            ],
            "example": 50,
            "type": "number"
          }
        },
        "required": [
          "sizeGib"
        ],
        "type": "object"
      },
      "UsageDay": {
        "properties": {
          "date": {
            "description": "Europe/Istanbul calendar day",
            "example": "2026-11-25",
            "type": "string"
          },
          "hours": {
            "type": "number"
          }
        },
        "required": [
          "date",
          "hours"
        ],
        "type": "object"
      },
      "UsageDisk": {
        "properties": {
          "machineCount": {
            "type": "number"
          },
          "snapshotBytes": {
            "description": "Decimal string (64-bit)",
            "example": "0",
            "type": "string"
          },
          "totalGib": {
            "type": "number"
          }
        },
        "required": [
          "totalGib",
          "machineCount",
          "snapshotBytes"
        ],
        "type": "object"
      },
      "UsageLimit": {
        "properties": {
          "enforced": {
            "description": "false = on the plan but not enforced yet",
            "type": "boolean"
          },
          "key": {
            "enum": [
              "machines",
              "snapshots",
              "members",
              "maxRunMinutes",
              "exposedPorts",
              "terminalSessions"
            ],
            "type": "string"
          },
          "limit": {
            "description": "null = no limit",
            "nullable": true,
            "type": "number"
          },
          "percent": {
            "nullable": true,
            "type": "number"
          },
          "scope": {
            "enum": [
              "organization",
              "machine",
              "user"
            ],
            "type": "string"
          },
          "state": {
            "enum": [
              "ok",
              "warning",
              "exceeded"
            ],
            "type": "string"
          },
          "unit": {
            "enum": [
              "count",
              "vcpu",
              "mib",
              "minutes",
              "boolean"
            ],
            "type": "string"
          },
          "used": {
            "type": "number"
          }
        },
        "required": [
          "key",
          "unit",
          "scope",
          "used",
          "limit",
          "percent",
          "state",
          "enforced"
        ],
        "type": "object"
      },
      "UsageMachine": {
        "properties": {
          "deleted": {
            "type": "boolean"
          },
          "hours": {
            "type": "number"
          },
          "lastRunAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "memoryMib": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "sandboxId": {
            "type": "string"
          },
          "vcpuCount": {
            "type": "number"
          },
          "vcpuHours": {
            "type": "number"
          }
        },
        "required": [
          "sandboxId",
          "name",
          "vcpuCount",
          "memoryMib",
          "hours",
          "vcpuHours",
          "lastRunAt",
          "deleted"
        ],
        "type": "object"
      },
      "UsageQuota": {
        "properties": {
          "limit": {
            "type": "number"
          },
          "organizationUsed": {
            "description": "Live machines of this organization alone (equals used when scope is organization)",
            "minimum": 0,
            "type": "number"
          },
          "scope": {
            "description": "owner = beta/free package: counted together across every organization the owner owns (DEC-170); organization = this organization's own machines",
            "enum": [
              "organization",
              "owner"
            ],
            "type": "string"
          },
          "used": {
            "type": "number"
          }
        },
        "required": [
          "used",
          "limit",
          "scope",
          "organizationUsed"
        ],
        "type": "object"
      },
      "UsageRange": {
        "properties": {
          "from": {
            "format": "date-time",
            "type": "string"
          },
          "key": {
            "enum": [
              "7d",
              "14d",
              "30d",
              "period"
            ],
            "type": "string"
          },
          "to": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "key",
          "from",
          "to"
        ],
        "type": "object"
      },
      "UsageSummary": {
        "properties": {
          "billable": {
            "type": "boolean"
          },
          "daily": {
            "items": {
              "$ref": "#/components/schemas/UsageDay"
            },
            "type": "array"
          },
          "disk": {
            "$ref": "#/components/schemas/UsageDisk"
          },
          "generatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "limits": {
            "items": {
              "$ref": "#/components/schemas/UsageLimit"
            },
            "type": "array"
          },
          "machineHours": {
            "type": "number"
          },
          "machines": {
            "items": {
              "$ref": "#/components/schemas/UsageMachine"
            },
            "type": "array"
          },
          "paymentsEnabled": {
            "type": "boolean"
          },
          "quota": {
            "$ref": "#/components/schemas/UsageQuota"
          },
          "range": {
            "$ref": "#/components/schemas/UsageRange"
          },
          "vcpuHours": {
            "type": "number"
          }
        },
        "required": [
          "range",
          "machineHours",
          "vcpuHours",
          "disk",
          "quota",
          "daily",
          "machines",
          "billable",
          "limits",
          "paymentsEnabled",
          "generatedAt"
        ],
        "type": "object"
      },
      "WorkspaceSizeSchema": {
        "properties": {
          "applies": {
            "description": "now = a new size applies at once; next_start = it is applied before the disk next boots on a new VM (a new machine after the current one is deleted, or a cold restart). Pause and resume keep the current size. The data on the disk is kept",
            "enum": [
              "now",
              "next_start"
            ],
            "type": "string"
          },
          "choices": {
            "description": "Sizes your plan allows (ascending)",
            "example": [
              20,
              50,
              100
            ],
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "exists": {
            "description": "false = no persistent disk yet; the size chosen now is used by your first machine",
            "type": "boolean"
          },
          "extraPricePerGibMonthKurus": {
            "description": "Monthly price per GB above the included 20 GB, in kuruş (KDV dahil); 0 = free",
            "example": 0,
            "type": "number"
          },
          "growAvailable": {
            "description": "false = a larger size cannot be chosen right now (see unavailableReason)",
            "type": "boolean"
          },
          "includedGib": {
            "description": "Included in the persistent disk price",
            "example": 20,
            "type": "number"
          },
          "maxSizeGib": {
            "example": 100,
            "nullable": true,
            "type": "number"
          },
          "pendingSizeGib": {
            "description": "A larger size you chose that is applied the next time the disk boots on a new VM (a new machine after the current one is deleted, or a cold restart of the machine); null = none",
            "example": 50,
            "nullable": true,
            "type": "number"
          },
          "sizeGib": {
            "description": "Current size (GB); null without a disk",
            "example": 20,
            "nullable": true,
            "type": "number"
          },
          "unavailableReason": {
            "description": "host_agent = the server holding your disk is being updated; host_capacity = no room on that server; in_transition = the disk is being moved or restored; lost = the disk is lost. Clients MUST treat an unknown value as \"unavailable\"",
            "enum": [
              "host_agent",
              "host_capacity",
              "in_transition",
              "lost"
            ],
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "exists",
          "sizeGib",
          "pendingSizeGib",
          "includedGib",
          "choices",
          "maxSizeGib",
          "growAvailable",
          "unavailableReason",
          "applies",
          "extraPricePerGibMonthKurus"
        ],
        "type": "object"
      },
      "WriteFile": {
        "properties": {
          "bytesWritten": {
            "minimum": 0,
            "type": "number"
          },
          "path": {
            "example": "src/index.ts",
            "type": "string"
          }
        },
        "required": [
          "path",
          "bytesWritten"
        ],
        "type": "object"
      },
      "WriteFileDto": {
        "properties": {
          "content": {
            "example": "# hello\nprint(\"hi\")\n",
            "maxLength": 1048576,
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "hb_live_…",
        "description": "API key created in the panel (Ayarlar → API anahtarları). A key may be restricted to scopes; each operation names the scope it needs in `x-hadronbox-scope` and a scoped key without it gets 403 INSUFFICIENT_SCOPE. Keys without scopes may call every operation.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "contact": {},
    "description": "hadronbox public REST API v1: machines (sandboxes), command execution and files, snapshots, templates, usage and the current principal. Authenticate with an API key: `Authorization: Bearer hb_live_…`. Success bodies are `{ data, meta }` (lists: `{ data, pagination, meta }`); errors are `{ statusCode, error, code, message, details? }`. Clients MUST ignore unknown response fields, enum values and error codes (handle an unknown code by its HTTP status class). The `message` of an error is answered in the language of the request: send `Accept-Language: en` for English (default Turkish); the answer carries `Content-Language` and `Vary: Accept-Language`, while `code` and the status never change. Versioning and deprecation policy: https://hadronbox.tr/docs/api/degisiklikler",
    "title": "hadronbox Public API",
    "version": "1.0.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/v1/agent-run-groups": {
      "get": {
        "operationId": "agents.listRunGroups",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 50,
              "minimum": 1,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/AgentRunGroup"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "{ data, pagination, meta }",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUNS_DISABLED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUNS_DISABLED"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List comparison groups (newest first, paginated)",
        "tags": [
          "Agent runs"
        ],
        "x-hadronbox-scope": "agent_runs:read"
      },
      "post": {
        "operationId": "agents.createRunGroup",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRunGroupDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentRunGroup"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "AgentRunGroup (runs queued)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION / REPO_URL_INVALID / AGENT_RUN_SECRET_NOT_FOUND (details { names })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "REPO_URL_INVALID",
              "AGENT_RUN_SECRET_NOT_FOUND"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PLAN_LIMIT_MACHINES (details { limit, used, requested }) / PLAN_LIMIT_SIZE / CREDIT_INSUFFICIENT / BUDGET_EXCEEDED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PLAN_LIMIT_MACHINES",
              "PLAN_LIMIT_SIZE",
              "CREDIT_INSUFFICIENT",
              "BUDGET_EXCEEDED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUNS_DISABLED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUNS_DISABLED"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUN_LIMIT (5 unfinished runs per organization)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUN_LIMIT"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Compare agents: run the same repository and task with 2..4 agents (one run and one machine each). The machine limit, credit balance and spend budget are checked for the whole group first; there is no queueing",
        "tags": [
          "Agent runs"
        ],
        "x-hadronbox-scope": "agent_runs:write"
      }
    },
    "/v1/agent-run-groups/{id}": {
      "get": {
        "operationId": "agents.getRunGroup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentRunGroup"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "AgentRunGroup",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUN_GROUP_NOT_FOUND / AGENT_RUNS_DISABLED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUNS_DISABLED",
              "AGENT_RUN_GROUP_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get a comparison group: per run status, duration, cost, exit code, changed files and diff summary side by side",
        "tags": [
          "Agent runs"
        ],
        "x-hadronbox-scope": "agent_runs:read"
      }
    },
    "/v1/agent-run-groups/{id}/cancel": {
      "post": {
        "operationId": "agents.cancelRunGroup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentRunGroup"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "AgentRunGroup (unfinished runs cancelling)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUN_GROUP_NOT_FOUND / AGENT_RUNS_DISABLED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUNS_DISABLED",
              "AGENT_RUN_GROUP_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUN_NOT_CANCELLABLE (every run has ended)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUN_NOT_CANCELLABLE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Cancel every unfinished run of a group (finished runs are left as they are)",
        "tags": [
          "Agent runs"
        ],
        "x-hadronbox-scope": "agent_runs:write"
      }
    },
    "/v1/agent-runs": {
      "get": {
        "operationId": "agents.listRuns",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 50,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "queued",
                "provisioning",
                "installing",
                "cloning",
                "running",
                "succeeded",
                "failed",
                "timed_out",
                "cancelled"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agent",
            "required": false,
            "schema": {
              "enum": [
                "claude-code",
                "codex",
                "gemini-cli",
                "aider",
                "opencode"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/AgentRun"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "{ data, pagination, meta }",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUNS_DISABLED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUNS_DISABLED"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List agent runs (newest first, paginated, filter by status / agent)",
        "tags": [
          "Agent runs"
        ],
        "x-hadronbox-scope": "agent_runs:read"
      },
      "post": {
        "operationId": "agents.startRun",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRunDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "AgentRun (status queued)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION / REPO_URL_INVALID (details { reason }) / AGENT_RUN_SECRET_NOT_FOUND (details { names })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "REPO_URL_INVALID",
              "AGENT_RUN_SECRET_NOT_FOUND"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "BUDGET_EXCEEDED / CREDIT_INSUFFICIENT / PLAN_LIMIT_SIZE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PLAN_LIMIT_SIZE",
              "CREDIT_INSUFFICIENT",
              "BUDGET_EXCEEDED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUNS_DISABLED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUNS_DISABLED"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUN_LIMIT (5 unfinished runs per organization)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUN_LIMIT"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Start an agent run: a fresh machine with the chosen AI CLI clones a public repository and runs the task headless. Returns the run (queued) at once",
        "tags": [
          "Agent runs"
        ],
        "x-hadronbox-scope": "agent_runs:write"
      }
    },
    "/v1/agent-runs/{id}": {
      "get": {
        "operationId": "agents.getRun",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "AgentRun",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUN_NOT_FOUND / AGENT_RUNS_DISABLED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUNS_DISABLED",
              "AGENT_RUN_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get an agent run: status, result (exit code, changed files, diff summary) and failure reason",
        "tags": [
          "Agent runs"
        ],
        "x-hadronbox-scope": "agent_runs:read"
      }
    },
    "/v1/agent-runs/{id}/cancel": {
      "post": {
        "operationId": "agents.cancelRun",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "AgentRun (cancelRequested true; status cancelled within seconds)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUN_NOT_FOUND / AGENT_RUNS_DISABLED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUNS_DISABLED",
              "AGENT_RUN_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUN_NOT_CANCELLABLE (details { status })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUN_NOT_CANCELLABLE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Cancel an unfinished run: its command is stopped and the machine is paused (deleted with destroyOnFinish)",
        "tags": [
          "Agent runs"
        ],
        "x-hadronbox-scope": "agent_runs:write"
      }
    },
    "/v1/agent-runs/{id}/output": {
      "get": {
        "operationId": "agents.streamRunOutput",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "text/event-stream - same events, `X-Sse-Data-Encoding: json` option and `: ping` heartbeat as GET /sandboxes/{id}/executions/{executionId}/output",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AGENT_RUN_NOT_FOUND / AGENT_RUNS_DISABLED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "AGENT_RUNS_DISABLED",
              "AGENT_RUN_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE: the command has not started yet, or its live output is not on this server",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Stream the command output of a run (Server-Sent Events: stdout, stderr, exit); known secret values are masked as ***. A finished run answers its stored tail",
        "tags": [
          "Agent runs"
        ],
        "x-hadronbox-scope": "agent_runs:read"
      }
    },
    "/v1/credits": {
      "get": {
        "operationId": "credits.get",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Credit"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Credit",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Credit balance (kuruş), state (ok | low ≤ 20 % of the cycle base | exhausted ≤ 0), burn rate, estimated remaining minutes, lots expiring within 14 days and whether the balance is enforced",
        "tags": [
          "Credits"
        ],
        "x-hadronbox-scope": "account:read"
      }
    },
    "/v1/credits/budgets": {
      "get": {
        "operationId": "credits.listBudgets",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BudgetList"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "BudgetList",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Spend budgets of the organization with this month's (Europe/Istanbul) spend, percentage and live state; approximate (metering lags a few minutes)",
        "tags": [
          "Credits"
        ],
        "x-hadronbox-scope": "account:read"
      },
      "post": {
        "operationId": "credits.createBudget",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBudgetDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Budget"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Budget",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FORBIDDEN_ROLE (owner / admin only)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "FORBIDDEN_ROLE",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "BUDGET_EXISTS (details { budgetId })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "BUDGET_EXISTS"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a monthly spend budget for the organization (no sandboxId) or one machine. Defaults: warn at 80 %, pause at 100 %. Works whether or not the balance is enforced",
        "tags": [
          "Credits"
        ],
        "x-hadronbox-scope": "budgets:write"
      }
    },
    "/v1/credits/budgets/{id}": {
      "delete": {
        "operationId": "credits.deleteBudget",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FORBIDDEN_ROLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "FORBIDDEN_ROLE",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "BUDGET_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "BUDGET_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Remove a budget. Machines it paused stay paused (resume them yourself)",
        "tags": [
          "Credits"
        ],
        "x-hadronbox-scope": "budgets:write"
      },
      "patch": {
        "operationId": "credits.updateBudget",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBudgetDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Budget"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Budget",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION (no field, out of range)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FORBIDDEN_ROLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "FORBIDDEN_ROLE",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "BUDGET_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "BUDGET_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change the limit, warning threshold or action of a budget. Machines it paused stay paused (resume them yourself)",
        "tags": [
          "Credits"
        ],
        "x-hadronbox-scope": "budgets:write"
      }
    },
    "/v1/credits/ledger": {
      "get": {
        "operationId": "credits.ledger",
        "parameters": [
          {
            "description": "nextCursor of the previous page (opaque)",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 400,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "enum": [
                "grant",
                "usage",
                "adjustment",
                "expiry",
                "refund",
                "reversal"
              ],
              "type": "string"
            }
          },
          {
            "description": "Inclusive start (ISO 8601 with a zone, or YYYY-MM-DD)",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exclusive end (ISO 8601 with a zone, or YYYY-MM-DD)",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditLedgerPage"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "{ items, nextCursor }",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION (cursor, type, from / to)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Credit ledger, newest first, keyset pages. Hourly usage rows are folded into one row per Istanbul day; filter by type and date range",
        "tags": [
          "Credits"
        ],
        "x-hadronbox-scope": "account:read"
      }
    },
    "/v1/credits/packages": {
      "get": {
        "operationId": "credits.packages",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/CreditPackage"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "CreditPackage[]",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Active credit packages in display order (price, credit, validity, purchasable); paid packages are monthly",
        "tags": [
          "Credits"
        ],
        "x-hadronbox-scope": "account:read"
      }
    },
    "/v1/credits/usage": {
      "get": {
        "operationId": "credits.usage",
        "parameters": [
          {
            "description": "First Istanbul day (YYYY-MM-DD)",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "example": "2026-11-01",
              "type": "string"
            }
          },
          {
            "description": "Last Istanbul day, inclusive (YYYY-MM-DD)",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "example": "2026-11-29",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "groupBy",
            "required": false,
            "schema": {
              "default": "day",
              "enum": [
                "day",
                "machine"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditUsage"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "CreditUsage",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION (from after to, more than 366 days)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Spend breakdown from the usage accruals (compute and storage): per Istanbul day or per machine / volume / snapshot, in kuruş, minutes and GiB-hours",
        "tags": [
          "Credits"
        ],
        "x-hadronbox-scope": "account:read"
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "me.get",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MeResponse"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "MeResponse (user incl. pendingEmail, pendingEmailExpiresAt, consent)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not authenticated / INVALID_API_KEY",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "NOT_A_MEMBER",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Current user, organization, memberships, plan and auth type. With an API key and User-Agent hadronbox-cli/… it also records the first CLI login once (onboarding, TASK-156)",
        "tags": [
          "Auth"
        ],
        "x-hadronbox-scope": "account:read"
      }
    },
    "/v1/sandboxes": {
      "get": {
        "operationId": "sandboxes.list",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 10000,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortOrder",
            "required": false,
            "schema": {
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "creating",
                "running",
                "paused",
                "stopped",
                "error"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "required": false,
            "schema": {
              "default": "createdAt",
              "enum": [
                "name",
                "status",
                "createdAt"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Machine"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    },
                    "quota": {
                      "$ref": "#/components/schemas/MachineQuota"
                    }
                  },
                  "required": [
                    "data",
                    "pagination",
                    "quota",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "{ data, pagination, quota: { used, limit }, meta }",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List machines (paginated, search/sort) with the machine quota",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:read"
      },
      "post": {
        "operationId": "sandboxes.create",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSandboxDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Machine"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Machine created or returned existing (idempotent)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION / RESERVED_ENV_KEY / CONFLICTING_SOURCE / IDLE_TIMEOUT_OUT_OF_RANGE (details { min, max, requested }) / TOOLS_WITH_SNAPSHOT / TOOLS_DISK_BUDGET (details { limitMib, requestedMib }) / DESKTOP_SIZE_TOO_SMALL (desktop image below medium, details { size, minSize })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "RESERVED_ENV_KEY",
              "CONFLICTING_SOURCE",
              "IDLE_TIMEOUT_OUT_OF_RANGE",
              "TOOLS_WITH_SNAPSHOT",
              "TOOLS_DISK_BUDGET",
              "DESKTOP_SIZE_TOO_SMALL"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PLAN_LIMIT_MACHINES / PLAN_LIMIT_SIZE (size above plan maxVcpu/maxMemoryMib) / PLAN_UPGRADE_REQUIRED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PLAN_UPGRADE_REQUIRED",
              "PLAN_LIMIT_MACHINES",
              "PLAN_LIMIT_SIZE"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AUTO_PAUSE_REQUIRED (autoPause=false, plan without autoPauseOptional) / ACCOUNT_SUSPENDED / ACCOUNT_INACTIVE / NEW_ACCOUNT_LIMIT (new account: running machines, details { resource, limit, used, until })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "AUTO_PAUSE_REQUIRED",
              "INSUFFICIENT_SCOPE",
              "NEW_ACCOUNT_LIMIT"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "TEMPLATE_NOT_FOUND / SNAPSHOT_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SNAPSHOT_NOT_FOUND",
              "TEMPLATE_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "NAME_TAKEN / SNAPSHOT_NOT_READY",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "NAME_TAKEN",
              "SNAPSHOT_NOT_READY"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "ENCRYPTION_UNAVAILABLE (env given, no key)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "ENCRYPTION_UNAVAILABLE"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create machine (idempotent via optional sandboxId)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:create"
      }
    },
    "/v1/sandboxes/bulk/pause": {
      "post": {
        "operationId": "sandboxes.bulkPause",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkSandboxDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BulkResult"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "{ results: [{ sandboxId, ok, status?, error? }] }",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Pause up to 50 machines (per-id results; already paused = ok)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/bulk/resume": {
      "post": {
        "operationId": "sandboxes.bulkResume",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkSandboxDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BulkResult"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "{ results: [{ sandboxId, ok, status?, error? }] }",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Resume up to 50 machines (per-id results; already running = ok)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}": {
      "get": {
        "operationId": "sandboxes.get",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MachineDetail"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Machine found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get machine by ID (adds envKeys: names only, never values)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:read"
      },
      "patch": {
        "operationId": "sandboxes.update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSandboxSettingsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Machine"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "MachineResponse with the new autoPause / idleTimeoutMinutes",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION / IDLE_TIMEOUT_OUT_OF_RANGE (details { min, max, requested })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "IDLE_TIMEOUT_OUT_OF_RANGE"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "AUTO_PAUSE_REQUIRED — the package does not allow auto-pause off (beta package)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "AUTO_PAUSE_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Machine auto-pause settings: idleTimeoutMinutes (5..plan idleTimeoutMinutes) and autoPause (TASK-194)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/destroy": {
      "post": {
        "operationId": "sandboxes.destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Machine"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Machine deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete machine (soft delete; env vars and secret links are hard-deleted)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:delete"
      }
    },
    "/v1/sandboxes/{id}/exec": {
      "post": {
        "operationId": "sandboxes.exec",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecDaemonDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExecStarted"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Execution started — stream output at GET /sandboxes/:id/executions/:executionId/output",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION (empty / too long command); COMMAND_BLOCKED — the command scan refused it, nothing ran: details { reason: metadata | internal_network | loopback | not_allowlisted | metadata_path | escape_path, target: { text, host? }, hint: use_shell_or_script | not_allowed }",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "COMMAND_BLOCKED"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_HOST_BUSY + Retry-After (firecracker: host exec capacity in use); RATE_LIMITED + Retry-After (rate limit, incl. the stricter window of new accounts)",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_HOST_BUSY",
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Run a command in the machine (returns executionId + pid; stream the output separately)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/executions/{executionId}/cancel": {
      "post": {
        "operationId": "sandboxes.cancelExecution",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CancelExecution"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "cancelled: true = the command was stopped, false = it had already ended",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Sandbox or execution not found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Stop a running execution (kills its process group in the machine; idempotent)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/executions/{executionId}/output": {
      "get": {
        "operationId": "sandboxes.streamOutput",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "text/event-stream — events: stdout, stderr, exit, error. `data` encoding: by default line breaks (CR and LF) are written as the two characters \\n and nothing else is escaped (a literal backslash-n in the output cannot be told apart). Send the request header `X-Sse-Data-Encoding: json` to get every `data` as a JSON string (exact; decode with JSON.parse); the response then carries `X-Sse-Data-Encoding: json` (any other value than `escaped` or `json` is 400). While the stream is open the server also sends a comment line `: ping` every 15 s (heartbeat; SSE parsers ignore it), so a client may use a short idle timeout, e.g. 60 s.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Sandbox or execution not found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Stream the output of an execution (Server-Sent Events: stdout, stderr, exit)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/files": {
      "get": {
        "operationId": "sandboxes.readFile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "example": "workspace/agent/main.py",
              "maxLength": 500,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReadFile"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "File content",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Invalid path",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Sandbox or file not found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Read a file of the machine (path relative to the workspace; no escape from it)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      },
      "put": {
        "operationId": "sandboxes.writeFile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "example": "workspace/agent/main.py",
              "maxLength": 500,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteFileDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WriteFile"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "File written",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Invalid path",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Write a file of the machine (path relative to the workspace; no escape from it)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/files/raw": {
      "get": {
        "operationId": "sandboxes.downloadFile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "example": "workspace/agent/main.py",
              "maxLength": 500,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The file content, unchanged (Content-Length set)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Invalid path; VALIDATION with details.reason = is_directory for a directory",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Sandbox or file not found",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE: the machine is not running (details.status)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE"
            ]
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "The file is larger than the limit (100 MiB; 8 MiB on hosts not yet upgraded)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Download a file of the machine as raw bytes, streamed (≤ 100 MiB; 8 MiB on hosts not yet upgraded; path relative to /workspace; the machine must be running)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      },
      "put": {
        "operationId": "sandboxes.uploadFile",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "example": "workspace/agent/main.py",
              "maxLength": 500,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WriteFile"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "File written",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Invalid path; VALIDATION with details.reason = is_directory for a directory",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE: the machine is not running (details.status)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE"
            ]
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "The body is larger than the limit (see summary)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Content-Type must be application/octet-stream",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Upload a file to the machine as raw bytes, streamed (≤ 100 MiB with Content-Length; 8 MiB for chunked bodies and hosts not yet upgraded; replaces the file atomically, creates parent directories; the machine must be running)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/pause": {
      "post": {
        "operationId": "sandboxes.pause",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Machine"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Machine paused (pausedReason=user; others: idle | max_runtime | suspended, see MachineResponse)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Pause running machine",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/ports": {
      "get": {
        "operationId": "ports.list",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ExposedPort"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Live preview ports, oldest first",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List the preview ports of a machine",
        "tags": [
          "Ports"
        ],
        "x-hadronbox-scope": "machines:read"
      },
      "post": {
        "operationId": "ports.expose",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExposePortDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExposedPort"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Port exposed; `url` is the preview URL",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION / PORT_RESERVED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "PORT_RESERVED"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PLAN_LIMIT_PORTS / PLAN_UPGRADE_REQUIRED (access public, only when public previews are enabled platform-wide and the package lacks them)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PLAN_UPGRADE_REQUIRED",
              "PLAN_LIMIT_PORTS"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FEATURE_NOT_AVAILABLE (access public while public previews are not offered; checked before the plan) / EMAIL_NOT_VERIFIED (access public)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE",
              "FEATURE_NOT_AVAILABLE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PORT_ALREADY_EXPOSED",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PORT_ALREADY_EXPOSED"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Expose a machine port at a private preview URL (https://<port>-<random>.hbox.tr)",
        "tags": [
          "Ports"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/ports/{portId}": {
      "delete": {
        "operationId": "ports.remove",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "portId",
            "required": true,
            "schema": {
              "example": "prt_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PORT_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PORT_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Remove a preview port; its URL stops working at once and is never reused",
        "tags": [
          "Ports"
        ],
        "x-hadronbox-scope": "machines:manage"
      },
      "get": {
        "operationId": "ports.get",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "portId",
            "required": true,
            "schema": {
              "example": "prt_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExposedPort"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The preview port",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PORT_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PORT_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get one preview port of a machine",
        "tags": [
          "Ports"
        ],
        "x-hadronbox-scope": "machines:read"
      }
    },
    "/v1/sandboxes/{id}/ports/{portId}/tokens": {
      "post": {
        "operationId": "ports.createToken",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "portId",
            "required": true,
            "schema": {
              "example": "prt_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssuePreviewTokenDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PreviewToken"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Token created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION (ttlSeconds 60..86400)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_API_KEY (revoked, or expires within 60 s)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PREVIEW_BLOCKED / ACCOUNT_SUSPENDED / ACCOUNT_INACTIVE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "INSUFFICIENT_SCOPE",
              "PREVIEW_BLOCKED"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PORT_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PORT_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "EDGE_UNAVAILABLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EDGE_UNAVAILABLE"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a preview token for a private port (header X-Hadronbox-Preview-Token)",
        "tags": [
          "Ports"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/ports/{portId}/tokens/{jti}": {
      "delete": {
        "operationId": "ports.revokeToken",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "portId",
            "required": true,
            "schema": {
              "example": "prt_0f8e6c1a-2b3c-4d5e-8f90-123456789abc",
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "jti",
            "required": true,
            "schema": {
              "example": "Q2hhbmdlTWVQbGVhc2UxMg",
              "pattern": "^[A-Za-z0-9_-]{22}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PORT_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PORT_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Revoke a preview token (effective at the edge within 35 s; 204 for any well-formed jti)",
        "tags": [
          "Ports"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/resume": {
      "post": {
        "operationId": "sandboxes.resume",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Machine"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Machine running",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal / NEW_ACCOUNT_LIMIT (the machine owner is a new account at its running-machine limit)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE",
              "NEW_ACCOUNT_LIMIT"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Resume paused machine",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/schedules": {
      "get": {
        "operationId": "sandboxes.listSchedules",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Schedule"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Schedule[]",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Scheduled jobs of a machine",
        "tags": [
          "Schedules"
        ],
        "x-hadronbox-scope": "machines:read"
      },
      "post": {
        "operationId": "sandboxes.createSchedule",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Schedule"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Schedule",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION; SCHEDULE_CRON_INVALID (details { problem, minIntervalMinutes })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "SCHEDULE_CRON_INVALID"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FORBIDDEN_ROLE (owner / admin only); SCHEDULE_NEW_ORGANIZATION (details { until })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "FORBIDDEN_ROLE",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE",
              "SCHEDULE_NEW_ORGANIZATION"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SCHEDULE_LIMIT (details { limit })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SCHEDULE_LIMIT"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a scheduled job: a cron expression (Europe/Istanbul, at least 15 minutes apart) and a command run with `sh` on the machine. At most 5 jobs per organization; closed during the first 7 days of an organization",
        "tags": [
          "Schedules"
        ],
        "x-hadronbox-scope": "schedules:write"
      }
    },
    "/v1/sandboxes/{id}/services": {
      "get": {
        "operationId": "services.list",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/MachineService"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "One entry per service",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Background services of a machine with their state",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:read"
      },
      "post": {
        "description": "The machine starts it within seconds when it is running (or when it next runs). The command runs with `bash -lc` as the machine user and is restarted when it exits (restart policy). Do not put secrets in the command: read them from a file in /workspace.",
        "operationId": "services.create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMachineServiceDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MachineService"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The new service (state pending)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PLAN_LIMIT_SERVICES (details { limit, used })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PLAN_LIMIT_SERVICES"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SERVICE_NAME_TAKEN (details { name })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SERVICE_NAME_TAKEN"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Add a background service to a machine",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/services/{name}": {
      "delete": {
        "operationId": "services.delete",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "example": "opencode",
              "pattern": "^[a-z][a-z0-9-]{0,31}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND / SERVICE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND",
              "SERVICE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Stop and remove a background service",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      },
      "patch": {
        "description": "A changed service is restarted with the new definition. The name cannot change.",
        "operationId": "services.update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "example": "opencode",
              "pattern": "^[a-z][a-z0-9-]{0,31}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMachineServiceDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MachineService"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The service",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND / SERVICE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND",
              "SERVICE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change the command, working directory or restart policy of a service",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/services/{name}/logs": {
      "get": {
        "operationId": "services.logs",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "example": "opencode",
              "pattern": "^[a-z][a-z0-9-]{0,31}$",
              "type": "string"
            }
          },
          {
            "description": "Last N bytes of output to return",
            "in": "query",
            "name": "tail",
            "required": false,
            "schema": {
              "default": 65536,
              "maximum": 262144,
              "minimum": 1,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MachineServiceLogs"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Output tail",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION (tail 1-262144)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND / SERVICE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND",
              "SERVICE_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE (the machine is not running, or the service has not started yet) / SERVICES_UNSUPPORTED (details { reason }: `image` = the machine image cannot run services, re-create the machine; `unavailable` = not right now)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE",
              "SERVICES_UNSUPPORTED"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_HOST_UNAVAILABLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_HOST_UNAVAILABLE"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Last output of a service (kept in the machine memory only, last 256 KiB)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/services/{name}/restart": {
      "post": {
        "operationId": "services.restart",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "example": "opencode",
              "pattern": "^[a-z][a-z0-9-]{0,31}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MachineService"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The service as the machine reports it",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND / SERVICE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND",
              "SERVICE_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SERVICE_DISABLED (start it first) / INVALID_STATE (the machine is not running, or the service has not started yet) / SERVICES_UNSUPPORTED (details { reason }: `image` = the machine image cannot run services, re-create the machine; `unavailable` = not right now)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE",
              "SERVICES_UNSUPPORTED",
              "SERVICE_DISABLED"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_HOST_UNAVAILABLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_HOST_UNAVAILABLE"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Restart a running service now (the machine must be running)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/services/{name}/start": {
      "post": {
        "operationId": "services.start",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "example": "opencode",
              "pattern": "^[a-z][a-z0-9-]{0,31}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MachineService"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The service",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND / SERVICE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND",
              "SERVICE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Start a stopped service (enabled = true; idempotent)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/services/{name}/stop": {
      "post": {
        "operationId": "services.stop",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "example": "opencode",
              "pattern": "^[a-z][a-z0-9-]{0,31}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MachineService"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The service",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND / SERVICE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND",
              "SERVICE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Stop a service and keep its definition (enabled = false; idempotent)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/stop": {
      "post": {
        "operationId": "sandboxes.stop",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Machine"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Machine stopped",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Stop running/paused machine",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/terminal-sessions": {
      "get": {
        "operationId": "terminals.list",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 10000,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "pending",
                "active",
                "detached",
                "ended"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/TerminalSession"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Paginated sessions",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Terminal sessions of a machine, newest first (members see their own, owner/admin all)",
        "tags": [
          "Terminal sessions"
        ],
        "x-hadronbox-scope": "machines:read"
      },
      "post": {
        "description": "A paused machine is resumed first (`status: \"waking\"`). The ticket goes ONLY in the WebSocket subprotocol header (`Sec-WebSocket-Protocol: hb.term.v1, hb.tkt.<ticket>`). `command` may carry secrets: it is never logged and only its first word is stored.",
        "operationId": "terminals.create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTerminalSessionDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TerminalTicket"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Session created (pending) + ticket",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_API_KEY (the calling key was revoked or expired meanwhile)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PLAN_LIMIT_TERMINALS: open sessions (pending + active + detached) reached the plan limit",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PLAN_LIMIT_TERMINALS"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE (machine stopped / error / creating), MACHINE_OWNER_SUSPENDED, MACHINE_ABUSE_HOLD",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE",
              "MACHINE_OWNER_SUSPENDED",
              "MACHINE_ABUSE_HOLD"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "TERMINAL_LIMIT_MACHINE (8 sessions on this machine, nothing was created) or RATE_LIMITED (+ Retry-After)",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED",
              "TERMINAL_LIMIT_MACHINE"
            ]
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "EDGE_UNAVAILABLE (terminals are switched off on this deployment), or the terminal / machine host is unavailable; retry shortly",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EDGE_UNAVAILABLE"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Open a terminal on a machine: returns a single-use 60 s ticket for wss://edge.hadronbox.tr/v1/term",
        "tags": [
          "Terminal sessions"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/sandboxes/{id}/tools": {
      "get": {
        "operationId": "sandboxes.listTools",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/MachineTool"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "One entry per tool of the machine",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Tools of a machine with their install state",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:read"
      },
      "post": {
        "description": "Works on every running machine, including one created from a snapshot (create refuses tools + snapshotId only because the snapshot already carries its tools). A machine that is still creating answers 409 INVALID_STATE: wait until it is running, or choose the tools with `tools` in the create request.",
        "operationId": "sandboxes.addTools",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddMachineToolsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/MachineTool"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Every tool of the machine; new ones are pending",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION / TOOLS_DISK_BUDGET (details { limitMib, requestedMib })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "TOOLS_DISK_BUDGET"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE (the machine is not running, e.g. still creating)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Add catalogue tools to a running machine (installed in the background; idempotent)",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/tools/{toolId}/retry": {
      "post": {
        "description": "Only a failed tool is re-queued; a pending, installing or ready tool answers 409 INVALID_STATE. At most 3 install rounds per tool (409 TOOL_NOT_RETRYABLE, reason attempt_limit); a tool that left the catalogue cannot be retried (409 TOOL_NOT_RETRYABLE, reason not_selectable).",
        "operationId": "sandboxes.retryTool",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "toolId",
            "required": true,
            "schema": {
              "example": "claude-code",
              "pattern": "^[a-z0-9][a-z0-9-]{0,63}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MachineTool"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The tool, pending again",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND / TOOL_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND",
              "TOOL_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE (the machine is not running, or the tool is pending / installing / ready) / TOOL_NOT_RETRYABLE (details { reason: attempt_limit | not_selectable, attempts?, maxAttempts? })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE",
              "TOOL_NOT_RETRYABLE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Re-queue a failed tool install",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    },
    "/v1/sandboxes/{id}/usage": {
      "get": {
        "operationId": "sandboxes.usage",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MachineUsage"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "MachineUsage",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "A machine's compute spend this month (Istanbul), its hourly rate, the approximate cost of the current run and its own budget",
        "tags": [
          "Sandboxes"
        ],
        "x-hadronbox-scope": "machines:read"
      }
    },
    "/v1/schedules/{id}": {
      "delete": {
        "operationId": "schedules.delete",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FORBIDDEN_ROLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "FORBIDDEN_ROLE",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SCHEDULE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SCHEDULE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a scheduled job (its history is no longer listed)",
        "tags": [
          "Schedules"
        ],
        "x-hadronbox-scope": "schedules:write"
      },
      "get": {
        "operationId": "schedules.get",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Schedule"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Schedule",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SCHEDULE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SCHEDULE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "One scheduled job",
        "tags": [
          "Schedules"
        ],
        "x-hadronbox-scope": "machines:read"
      },
      "patch": {
        "operationId": "schedules.update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Schedule"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Schedule",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION (no field); SCHEDULE_CRON_INVALID",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "SCHEDULE_CRON_INVALID"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FORBIDDEN_ROLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "FORBIDDEN_ROLE",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SCHEDULE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SCHEDULE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change name, cron, command, timeout or enabled. enabled: true clears the failure counter and the disable reason",
        "tags": [
          "Schedules"
        ],
        "x-hadronbox-scope": "schedules:write"
      }
    },
    "/v1/schedules/{id}/run": {
      "post": {
        "operationId": "schedules.run",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ScheduleRun"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ScheduleRun",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FORBIDDEN_ROLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "FORBIDDEN_ROLE",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SCHEDULE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SCHEDULE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Run the job now (also when disabled). Returns the run at once; poll GET /schedules/{id}/runs. status skipped = a previous run is still going",
        "tags": [
          "Schedules"
        ],
        "x-hadronbox-scope": "schedules:write"
      }
    },
    "/v1/schedules/{id}/runs": {
      "get": {
        "operationId": "schedules.listRuns",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ScheduleRun"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "ScheduleRun[]",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SCHEDULE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SCHEDULE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Run history of a job: the last 50 runs, newest first (status, exit code, duration, output tail)",
        "tags": [
          "Schedules"
        ],
        "x-hadronbox-scope": "machines:read"
      }
    },
    "/v1/schedules/{id}/trigger-token": {
      "post": {
        "operationId": "schedules.rotateTriggerToken",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TriggerToken"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "TriggerToken",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FORBIDDEN_ROLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "FORBIDDEN_ROLE",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SCHEDULE_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SCHEDULE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create or rotate the incoming-trigger token. The raw token is in this answer only; the previous token stops working at once",
        "tags": [
          "Schedules"
        ],
        "x-hadronbox-scope": "schedules:write"
      }
    },
    "/v1/snapshots": {
      "get": {
        "operationId": "snapshots.list",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 10000,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortOrder",
            "required": false,
            "schema": {
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "pending",
                "creating",
                "ready",
                "failed"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "required": false,
            "schema": {
              "default": "createdAt",
              "enum": [
                "name",
                "createdAt"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Snapshot"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Paginated snapshots; sizeBytes is a decimal string",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List user snapshots (paginated, search/status/sort)",
        "tags": [
          "Snapshots"
        ],
        "x-hadronbox-scope": "snapshots:read"
      },
      "post": {
        "operationId": "snapshots.create",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSnapshotDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Snapshot"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Snapshot queued (status pending)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PLAN_LIMIT_SNAPSHOTS",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PLAN_LIMIT_SNAPSHOTS"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SANDBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SANDBOX_NOT_SNAPSHOTTABLE / NAME_TAKEN",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "NAME_TAKEN",
              "SANDBOX_NOT_SNAPSHOTTABLE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SNAPSHOTS_UNAVAILABLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SNAPSHOTS_UNAVAILABLE"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Take a snapshot of a running or paused machine (asynchronous)",
        "tags": [
          "Snapshots"
        ],
        "x-hadronbox-scope": "snapshots:write"
      }
    },
    "/v1/snapshots/{id}": {
      "delete": {
        "operationId": "snapshots.delete",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted (soft) and artifact removal queued",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "FORBIDDEN_ROLE",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "FORBIDDEN_ROLE",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SNAPSHOT_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SNAPSHOT_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a snapshot (owner, admin or its creator)",
        "tags": [
          "Snapshots"
        ],
        "x-hadronbox-scope": "snapshots:write"
      }
    },
    "/v1/snapshots/{id}/fanout": {
      "post": {
        "operationId": "snapshots.fanout",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FanoutSnapshotDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SnapshotFanout"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "{ created, failed, requested, estimate }; failed lists the machines that were not opened with an error code",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION / DESKTOP_SIZE_TOO_SMALL",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION",
              "DESKTOP_SIZE_TOO_SMALL"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "PLAN_LIMIT_MACHINES / PLAN_LIMIT_SIZE / CREDIT_INSUFFICIENT / BUDGET_EXCEEDED (details { requested, remaining, estimatedHourlyKurus })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "PLAN_LIMIT_MACHINES",
              "PLAN_LIMIT_SIZE",
              "CREDIT_INSUFFICIENT",
              "BUDGET_EXCEEDED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SNAPSHOT_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SNAPSHOT_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "SNAPSHOT_NOT_READY / NAME_TAKEN (details { names })",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "NAME_TAKEN",
              "SNAPSHOT_NOT_READY"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Open 1..10 machines from one snapshot at once. The machine limit, credit balance and spend budget are checked first (allOrNothing, default true: nothing is opened when they do not cover every machine)",
        "tags": [
          "Snapshots"
        ],
        "x-hadronbox-scope": "machines:create"
      }
    },
    "/v1/templates": {
      "get": {
        "operationId": "templates.list",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Template"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Templates ordered by sortOrder",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Machine template catalogue; locked = premium && !plan.premiumTemplates",
        "tags": [
          "Templates"
        ],
        "x-hadronbox-scope": "machines:read"
      }
    },
    "/v1/terminal-sessions/{id}": {
      "delete": {
        "operationId": "terminals.delete",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Ended (or already ended)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "TERMINAL_SESSION_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "TERMINAL_SESSION_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Revocation could not be written; nothing changed, retry",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "End a terminal session (its opener, or an owner/admin); the connection closes within 35 s",
        "tags": [
          "Terminal sessions"
        ],
        "x-hadronbox-scope": "machines:exec"
      },
      "get": {
        "operationId": "terminals.get",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TerminalSession"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "TERMINAL_SESSION_NOT_FOUND",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "TERMINAL_SESSION_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "One terminal session (audit fields; never input or output)",
        "tags": [
          "Terminal sessions"
        ],
        "x-hadronbox-scope": "machines:read"
      }
    },
    "/v1/terminal-sessions/{id}/tickets": {
      "post": {
        "description": "Only the member who opened the session gets a ticket (owner/admin can only end it). A paused machine is resumed first (`status: \"waking\"`).",
        "operationId": "terminals.issueTicket",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{1,64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueTerminalTicketDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TerminalTicket"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Ticket",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_API_KEY (the calling key was revoked or expired meanwhile)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "TERMINAL_SESSION_NOT_FOUND (unknown, ended, or not yours)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "TERMINAL_SESSION_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "INVALID_STATE (machine stopped / error), MACHINE_OWNER_SUSPENDED, MACHINE_ABUSE_HOLD",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "INVALID_STATE",
              "MACHINE_OWNER_SUSPENDED",
              "MACHINE_ABUSE_HOLD"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "TERMINAL_LIMIT_MACHINE (8 sessions on this machine, nothing was created) or RATE_LIMITED (+ Retry-After)",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED",
              "TERMINAL_LIMIT_MACHINE"
            ]
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "EDGE_UNAVAILABLE (terminals are switched off on this deployment), or the terminal / machine host is unavailable; retry shortly",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EDGE_UNAVAILABLE"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "New single-use ticket to reconnect to your own session (`resume: true` → send RESUME first)",
        "tags": [
          "Terminal sessions"
        ],
        "x-hadronbox-scope": "machines:exec"
      }
    },
    "/v1/usage/summary": {
      "get": {
        "operationId": "usage.summary",
        "parameters": [
          {
            "in": "query",
            "name": "range",
            "required": false,
            "schema": {
              "default": "14d",
              "enum": [
                "7d",
                "14d",
                "30d",
                "period"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UsageSummary"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "UsageSummary (limits[], paymentsEnabled — TASK-193)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Usage summary: machine/vCPU hours, daily series (Europe/Istanbul days), per machine, and every plan limit with used / limit / percent / state (ok | warning ≥80% | exceeded ≥100%)",
        "tags": [
          "Usage"
        ],
        "x-hadronbox-scope": "account:read"
      }
    },
    "/v1/workspace": {
      "get": {
        "operationId": "workspace.get",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkspaceSizeSchema"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The disk (exists false = none yet)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Your persistent disk: size, choices and price above 20 GB",
        "tags": [
          "Workspace"
        ],
        "x-hadronbox-scope": "machines:read"
      }
    },
    "/v1/workspace/size": {
      "put": {
        "description": "Without a disk, it is created with this size. A disk not placed on a server yet changes at once. Otherwise the size is applied before the disk next boots on a new VM: a new machine after the current one is deleted (the disk and its data stay), or a cold restart of the machine. Pause and resume keep the current size. Choosing the current size cancels a pending grow.",
        "operationId": "workspace.resize",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkspaceSizeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkspaceSizeSchema"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The disk after the change",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "VALIDATION (sizeGib must be 20, 50 or 100)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "VALIDATION"
            ]
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Missing, invalid, revoked or expired API key / session",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "SESSION_INVALID",
              "INVALID_API_KEY",
              "ACCOUNT_SUSPENDED",
              "ACCOUNT_INACTIVE",
              "ACCOUNT_DELETION_PENDING",
              "UNAUTHENTICATED"
            ]
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "WORKSPACE_SIZE_NOT_ALLOWED / CREDIT_INSUFFICIENT (new disk)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "CREDIT_INSUFFICIENT",
              "WORKSPACE_SIZE_NOT_ALLOWED"
            ]
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Not allowed for this principal",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "EMAIL_NOT_VERIFIED",
              "NOT_A_MEMBER",
              "SESSION_REQUIRED",
              "INSUFFICIENT_SCOPE"
            ]
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "WORKSPACE_SHRINK_REFUSED / WORKSPACE_GROW_UNAVAILABLE (details.reason)",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "WORKSPACE_SHRINK_REFUSED",
              "WORKSPACE_GROW_UNAVAILABLE"
            ]
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Rate limited; retry after `Retry-After` seconds",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "x-error-codes": [
              "RATE_LIMITED"
            ]
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Choose a larger persistent disk (20 / 50 / 100 GB, grow only, data kept)",
        "tags": [
          "Workspace"
        ],
        "x-hadronbox-scope": "machines:manage"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.hadronbox.tr"
    }
  ],
  "tags": []
}
