{
  "openapi": "3.1.0",
  "info": {
    "title": "TruoCloud API",
    "version": "1.15.0",
    "description": "The TruoCloud public API. Every infrastructure resource in an account —VPS, DNS, databases, containers, load balancers, Object Storage, Mail Gateway, Image Services, serverless primitives, and managed WordPress— manageable over HTTP, through the `truo` CLI, and via MCP. Since v1.2 the account can also **order** products and receive **webhooks**, so the whole lifecycle —buy, operate, cancel— fits in a script. Since v1.3, **recipes** turn a fresh WordPress into your stack (pinned plugins, config, roles, generated secrets) in one operation. Since v1.4, an Enterprise CaaS service —a three-node cluster— deploys docker-compose **stacks** with versions and rollback, secrets, private registries, and its own domains. Since v1.15, a Truo Deploy service creates **databases and caches** in one call and connects them to its stacks.\n\n## Authentication\n\nBearer token: `Authorization: Bearer tc_live_...`. Keys are created from the panel or with `POST /v1/api-keys` using a session.\n\nAn API key can **never** create, modify, or revoke API keys, nor manage users — not even with the `*` scope. That is what makes revoking a key final.\n\nA key's effective authority is the intersection of four things: its scopes, the permissions of the user who created it, that user's per-service permissions, and the key's service allowlist. If a permission is revoked from the user who created the key, the key loses it too.\n\n## Conventions\n\n- IDs are returned with a typed prefix (`svc_10432`); they are accepted with or without it.\n- Pagination uses an opaque cursor (`?limit=&cursor=`). There is no total count.\n- Every mutation accepts `Idempotency-Key`. Only 2xx responses are stored.\n- Every response carries `X-Request-Id`; include it when reporting a problem.\n- Long-running work returns `202` + `Location: /v1/operations/{id}`.",
    "contact": {
      "name": "TruoCloud Support",
      "url": "https://www.truocloud.com"
    }
  },
  "servers": [
    {
      "url": "https://api.truo.cloud",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Meta",
      "description": "What this instance supports."
    },
    {
      "name": "Account",
      "description": "The account and the credential in use."
    },
    {
      "name": "Services",
      "description": "Contracted services. The entry point to everything else."
    },
    {
      "name": "VPS",
      "description": "Virtual servers: power, metrics, console, rebuilds, and backups."
    },
    {
      "name": "DNS",
      "description": "Records in zones already hosted here."
    },
    {
      "name": "DBaaS",
      "description": "Managed PostgreSQL, MySQL, and Valkey instances."
    },
    {
      "name": "CaaS",
      "description": "Containerized applications: deploys, logs, environment, and domains."
    },
    {
      "name": "Load Balancer",
      "description": "Listeners and backends in front of a dedicated failover IP."
    },
    {
      "name": "Object Storage",
      "description": "Buckets and credentials. Objects themselves go to the S3-compatible endpoint, not here."
    },
    {
      "name": "Mail Gateway",
      "description": "Sending domains, keys, and delivery stats. Sending a message goes to the Mail Gateway endpoint, not here."
    },
    {
      "name": "Image Services",
      "description": "Transformation tenants, allowed origins, and signing keys."
    },
    {
      "name": "Serverless",
      "description": "KV, SQL databases, functions, and cron: tenants, quotas, and tokens. Reads and writes go to each service endpoint, not here."
    },
    {
      "name": "WordPress",
      "description": "Managed WordPress sites: plugins, themes, backups, staging, domains, security, WP-CLI, one-time admin login, and recipes (declarative stacks applied over WP-CLI)."
    },
    {
      "name": "Orders",
      "description": "Buying and cancelling: the orderable catalog priced in the account currency, orders that return a followable operation, and cancellation requests. A key needs `orders:write` to spend."
    },
    {
      "name": "Operations",
      "description": "Asynchronous work."
    },
    {
      "name": "Webhooks",
      "description": "Signed HTTP notifications instead of polling: `operation.completed`, service lifecycle events and failed Truo Deploy builds (`deploy.build.failed`) and previews (`deploy.preview.ready|failed`), with retries and a delivery log."
    },
    {
      "name": "API Keys",
      "description": "Credentials. Requires a session."
    },
    {
      "name": "Audit",
      "description": "The account's API activity."
    }
  ],
  "externalDocs": {
    "description": "Documentation",
    "url": "https://docs.truo.cloud"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key: `Authorization: Bearer tc_live_...`. The `/v1/api-keys` endpoints require a panel session — no API key can manage API keys, not even with the `*` scope."
      }
    },
    "schemas": {
      "Capabilities": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "capabilities"
            ]
          },
          "api_version": {
            "type": "string",
            "example": "v1"
          },
          "brand": {
            "type": "string",
            "example": "truocloud"
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopes_never_grantable_to_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "These scopes exist only for sessions. No API key can hold them, not even under `*`."
          },
          "limits": {
            "type": "object",
            "properties": {
              "max_page_size": {
                "type": "integer"
              },
              "default_page_size": {
                "type": "integer"
              },
              "rate_limits": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "per_key": {
                      "type": "integer"
                    },
                    "per_account": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "per_key",
                    "per_account"
                  ]
                }
              }
            },
            "required": [
              "max_page_size",
              "default_page_size",
              "rate_limits"
            ]
          },
          "features": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          }
        },
        "required": [
          "object",
          "api_version",
          "brand",
          "resources",
          "scopes",
          "scopes_never_grantable_to_keys",
          "limits",
          "features"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "authentication_error",
                  "authorization_error",
                  "invalid_request_error",
                  "rate_limit_error",
                  "api_error"
                ],
                "description": "The broad class of the error."
              },
              "code": {
                "type": "string",
                "description": "The error's specific, stable identity. Never renamed.",
                "example": "insufficient_scope"
              },
              "message": {
                "type": "string",
                "description": "A prose explanation, safe to display."
              },
              "param": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The field that failed, in dot notation.",
                "example": "records.0.ttl"
              },
              "request_id": {
                "type": "string",
                "example": "req_01JQ8XKM4N7P2R9TAB12CD34EF"
              },
              "required_scope": {
                "type": "string"
              },
              "retry_after": {
                "type": "integer"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "param": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "param",
                    "message"
                  ]
                },
                "description": "Per-field detail when `code` is `validation_failed`."
              }
            },
            "required": [
              "type",
              "code",
              "message",
              "param",
              "request_id"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Account": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "account"
            ]
          },
          "id": {
            "type": "string",
            "example": "cus_1043"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "credit": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit balance, in the account's currency."
          },
          "credential": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "enum": [
                  "credential"
                ]
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "key_42"
              },
              "type": {
                "type": "string",
                "enum": [
                  "api_key",
                  "session"
                ]
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "service_allowlist": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Empty = the credential reaches every service in the account."
              },
              "is_owner": {
                "type": "boolean",
                "description": "true when the user who owns the credential is the account owner."
              },
              "rate_limit_tier": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "object",
              "id",
              "type",
              "scopes",
              "service_allowlist",
              "is_owner",
              "rate_limit_tier"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "company",
          "email",
          "country",
          "status",
          "credit",
          "credential"
        ]
      },
      "ApiKey": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "api_key"
            ]
          },
          "id": {
            "type": "string",
            "example": "key_42"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "token_prefix": {
            "type": [
              "string",
              "null"
            ],
            "example": "tc_live_aB3d"
          },
          "token_last4": {
            "type": [
              "string",
              "null"
            ],
            "example": "Xy7Q"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "service_allowlist": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Empty = the key reaches every service in the account."
          },
          "rate_limit_tier": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "token_prefix",
          "token_last4",
          "scopes",
          "service_allowlist",
          "rate_limit_tier",
          "last_used_at",
          "expires_at",
          "created_at",
          "revoked_at"
        ]
      },
      "ApiKeyList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKey"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "ApiKeyCreated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ApiKey"
          },
          {
            "type": "object",
            "properties": {
              "token": {
                "type": "string",
                "description": "The plaintext token. **Shown only once**: it is never stored, only its SHA-256 hash. If it is lost, create a new key.",
                "example": "tc_live_aB3dEf..."
              }
            },
            "required": [
              "token"
            ]
          }
        ]
      },
      "ApiKeyCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "example": "terraform-prod"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "description": "Concrete scopes. `*` is not accepted: enumerate what the key needs. `apikeys:*` and `users:*` are not grantable.",
            "example": [
              "services:read",
              "vps:read",
              "vps:power"
            ]
          },
          "service_allowlist": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Restricts the key to these services. Omitted or empty = the whole account.",
            "example": [
              "svc_10432"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration in ISO 8601. Without it, the key never expires."
          }
        },
        "required": [
          "name",
          "scopes"
        ]
      },
      "ApiKeyUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "description": "Can only be **narrowed**. Widening returns 403."
          },
          "service_allowlist": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Can only be narrowed: an unrestricted key can gain a restriction, never lose one."
          }
        }
      },
      "Service": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "service"
            ]
          },
          "id": {
            "type": "string",
            "example": "svc_10432"
          },
          "family": {
            "type": "string",
            "enum": [
              "vps",
              "dns",
              "dbaas",
              "caas",
              "lb",
              "objectstorage",
              "mailgateway",
              "images",
              "serverless",
              "wordpress",
              "other"
            ],
            "description": "The service's family. It determines which resource manages it. `other` is a real product in the account that has no dedicated resource in v1 yet."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "suspended",
              "terminated",
              "cancelled",
              "fraud",
              "unknown"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The product's name in the catalog."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service's label: domain, hostname, or an identifier the customer set."
          },
          "primary_ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_cycle": {
            "type": [
              "string",
              "null"
            ]
          },
          "next_due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "capabilities": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "This service's actual capabilities. Requesting an operation whose capability is `false` returns 400 `unsupported_for_product`."
          }
        },
        "required": [
          "object",
          "id",
          "family",
          "status",
          "name",
          "label",
          "primary_ip",
          "billing_cycle",
          "next_due_date",
          "created_at",
          "capabilities"
        ]
      },
      "ServiceList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Service"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "Operation": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "operation"
            ]
          },
          "id": {
            "type": "string",
            "example": "op_01JQ8XKM4N7P2R9TAB12CD34EF"
          },
          "type": {
            "type": "string",
            "example": "vps.reinstall"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "progress": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "resource": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "object": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "object",
              "id"
            ],
            "description": "The resource the operation runs against."
          },
          "result": {
            "description": "The result payload. Its shape depends on `type`."
          },
          "error": {
            "description": "Failure detail when `status` is `failed`."
          },
          "stale": {
            "type": "boolean",
            "description": "true when the backend could not be reached and this is the last known state. Retry: the operation was not lost."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "type",
          "status",
          "progress",
          "resource",
          "created_at",
          "completed_at"
        ]
      },
      "OperationList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operation"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "AuditLog": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "audit_log"
            ]
          },
          "id": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "route": {
            "type": "string",
            "description": "The route template, not the concrete path. Aggregatable by definition.",
            "example": "/v1/vps/:id/power"
          },
          "path": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "scope_required": {
            "type": [
              "string",
              "null"
            ]
          },
          "credential_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "via": {
            "type": [
              "string",
              "null"
            ],
            "description": "`api`, `cli`, or `mcp`."
          },
          "ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "request_id",
          "method",
          "route",
          "path",
          "status",
          "error_code",
          "scope_required",
          "credential_id",
          "via",
          "ip",
          "duration_ms",
          "created_at"
        ]
      },
      "AuditLogList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLog"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "Vps": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "vps"
            ]
          },
          "id": {
            "type": "string",
            "example": "svc_10432"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "suspended",
              "terminated",
              "cancelled",
              "fraud",
              "unknown"
            ]
          },
          "hostname": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "qemu",
              "lxc"
            ],
            "description": "`qemu` = full virtualization (KVM). `lxc` = container."
          },
          "node": {
            "type": [
              "string",
              "null"
            ],
            "description": "The physical node. Informational: it changes if we migrate the VM and is not addressable."
          },
          "vmid": {
            "type": [
              "integer",
              "null"
            ]
          },
          "primary_ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "running",
              "stopped",
              "paused",
              "unknown"
            ],
            "description": "The machine's actual state. Distinct from `status`, which is the **contract** state in billing: an `active` VPS can be `stopped` because the customer powered it off."
          },
          "uptime_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "cpu": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "cores": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "usage_percent": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "cores",
              "usage_percent"
            ]
          },
          "memory": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "used_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "total_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "used_bytes",
              "total_bytes"
            ]
          },
          "disk": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "used_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "total_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "used_bytes",
              "total_bytes"
            ]
          },
          "reinstalling": {
            "type": "boolean",
            "description": "A reinstall is in progress. Power operations fail while it lasts."
          },
          "capabilities": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "Which `/v1` endpoints respond for THIS VPS. A capability set to `false` returns `400 unsupported_for_product`; it is not a transient error and retrying does not help."
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "hostname",
          "type",
          "node",
          "vmid",
          "primary_ip",
          "state",
          "uptime_seconds",
          "cpu",
          "memory",
          "disk",
          "reinstalling",
          "capabilities"
        ]
      },
      "VpsList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Vps"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "VpsConfig": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "vps_config"
            ]
          },
          "vmid": {
            "type": [
              "integer",
              "null"
            ]
          },
          "node": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "qemu",
              "lxc"
            ],
            "description": "`qemu` = full virtualization (KVM). `lxc` = container."
          },
          "cores": {
            "type": [
              "number",
              "null"
            ]
          },
          "memory_mb": {
            "type": [
              "number",
              "null"
            ]
          },
          "boot_disk": {
            "type": [
              "string",
              "null"
            ],
            "description": "The storage descriptor exactly as the hypervisor reports it."
          },
          "os_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "hostname": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "vmid",
          "node",
          "type",
          "cores",
          "memory_mb",
          "boot_disk",
          "os_type",
          "hostname"
        ]
      },
      "VpsMetricPoint": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string"
          },
          "cpu_percent": {
            "type": [
              "number",
              "null"
            ]
          },
          "memory_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "disk_read_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "disk_write_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "net_in_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "net_out_bytes": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "time",
          "cpu_percent",
          "memory_bytes",
          "disk_read_bytes",
          "disk_write_bytes",
          "net_in_bytes",
          "net_out_bytes"
        ]
      },
      "VpsMetrics": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "vps_metrics"
            ]
          },
          "timeframe": {
            "type": "string",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VpsMetricPoint"
            }
          }
        },
        "required": [
          "object",
          "timeframe",
          "data"
        ]
      },
      "VpsIp": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "vps_ip"
            ]
          },
          "version": {
            "anyOf": [
              {
                "type": "number",
                "enum": [
                  4
                ]
              },
              {
                "type": "number",
                "enum": [
                  6
                ]
              }
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "netmask": {
            "type": [
              "string",
              "null"
            ]
          },
          "gateway": {
            "type": [
              "string",
              "null"
            ]
          },
          "prefix": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "version",
          "address",
          "netmask",
          "gateway",
          "prefix"
        ]
      },
      "VpsIpList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VpsIp"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "VpsTemplate": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "vps_template"
            ]
          },
          "id": {
            "type": "string",
            "description": "Pass it as `template` in the reinstall."
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "qemu",
              "lxc"
            ],
            "description": "`qemu` = full virtualization (KVM). `lxc` = container."
          },
          "storage": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "type",
          "storage"
        ]
      },
      "VpsTemplateList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VpsTemplate"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "ConsoleTicket": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "console_ticket"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "vnc",
              "spice"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "noVNC: open it in the browser."
          },
          "file": {
            "type": [
              "string",
              "null"
            ],
            "description": "SPICE: the `.vv` contents for `remote-viewer`. **It is a credential**: it grants full access to the operating system. Do not log it or store it."
          },
          "filename": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "type",
          "url",
          "file",
          "filename"
        ]
      },
      "VpsBackup": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "vps_backup"
            ]
          },
          "id": {
            "type": "string",
            "example": "local:backup/vzdump-qemu-101-2026_07_27-03_00_01.vma.zst"
          },
          "size_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "format": {
            "type": [
              "string",
              "null"
            ]
          },
          "storage": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "size_bytes",
          "format",
          "storage",
          "created_at"
        ]
      },
      "VpsBackupList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VpsBackup"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "DnsZone": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dns_zone"
            ]
          },
          "id": {
            "type": "string",
            "example": "example.com"
          },
          "service": {
            "type": "string",
            "description": "The service backing the zone. For billing and support only.",
            "example": "svc_10432"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "suspended",
              "terminated",
              "cancelled",
              "fraud",
              "unknown"
            ]
          },
          "record_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "serial": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "service",
          "status",
          "record_count",
          "serial"
        ]
      },
      "DnsZoneList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DnsZone"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "DnsZoneExport": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dns_zone_export"
            ]
          },
          "zone": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "bind"
            ]
          },
          "content": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "zone",
          "format",
          "content"
        ]
      },
      "DnsRecord": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dns_record"
            ]
          },
          "id": {
            "type": "string",
            "example": "www.example.com/A"
          },
          "name": {
            "type": "string",
            "description": "FQDN without the trailing dot.",
            "example": "www.example.com"
          },
          "type": {
            "type": "string",
            "enum": [
              "A",
              "AAAA",
              "CNAME",
              "MX",
              "TXT",
              "NS",
              "SRV",
              "CAA",
              "PTR"
            ],
            "description": "The `SOA` and the delegation `NS` are managed by the platform and cannot be edited."
          },
          "ttl": {
            "type": "integer"
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "All the RRset's values. For `MX` they include the priority (`10 mail.example.com`); for `SRV`, priority, weight, and port.",
            "example": [
              "1.2.3.4"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "type",
          "ttl",
          "values"
        ]
      },
      "DnsRecordList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DnsRecord"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "Dbaas": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dbaas"
            ]
          },
          "id": {
            "type": "string",
            "example": "svc_10432"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "suspended",
              "terminated",
              "cancelled",
              "fraud",
              "unknown"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "running",
              "stopped",
              "provisioning",
              "error",
              "unknown"
            ],
            "description": "The engine's actual state. Distinct from `status`, which is the **contract** state in billing: an `active` service can be `provisioning` for its first few minutes."
          },
          "engine": {
            "type": [
              "string",
              "null"
            ],
            "description": "The engine: `mysql`, `postgresql`, `mongodb`, `valkey` (or the historical `redis`).",
            "example": "postgresql"
          },
          "engine_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ]
          },
          "node": {
            "type": [
              "string",
              "null"
            ],
            "description": "The physical node. Informational and not addressable; `null` on the shared tier."
          },
          "region": {
            "type": [
              "string",
              "null"
            ],
            "description": "Region code: `us-east` (Virginia, US) or `ca-east` (Montreal, Canada). `null` while unknown.",
            "example": "us-east"
          },
          "plan": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "cpu_cores": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "ram_mb": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "storage_gb": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "cpu_cores",
              "ram_mb",
              "storage_gb"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "capabilities": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "Which `/v1` endpoints respond for THIS service. A capability set to `false` returns `400 unsupported_for_product`: it is not transient and retrying does not help. An **absent** key is different from `false` — it means it was not queried (see the listing)."
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "state",
          "engine",
          "engine_version",
          "host",
          "port",
          "node",
          "region",
          "plan",
          "created_at",
          "capabilities"
        ]
      },
      "DbaasList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Dbaas"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "DbaasConnection": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dbaas_connection"
            ]
          },
          "engine": {
            "type": [
              "string",
              "null"
            ],
            "description": "The engine: `mysql`, `postgresql`, `mongodb`, `valkey` (or the historical `redis`).",
            "example": "postgresql"
          },
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ]
          },
          "database": {
            "type": [
              "string",
              "null"
            ],
            "description": "The default database. `null` on services where the admin picks one on connect."
          },
          "username": {
            "type": [
              "string",
              "null"
            ],
            "description": "The engine's admin user."
          },
          "sslmode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The TLS mode in the engine's vocabulary (`verify-ca`, `VERIFY_CA`, `rediss`).",
            "example": "verify-ca"
          },
          "ca_cert": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service CA's PEM, for `sslrootcert`/`--ssl-ca`. It is **public**: it verifies the server, it does not grant access."
          }
        },
        "required": [
          "object",
          "engine",
          "host",
          "port",
          "database",
          "username",
          "sslmode",
          "ca_cert"
        ]
      },
      "DbaasCredential": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dbaas_credential"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "password": {
            "type": [
              "string",
              "null"
            ],
            "description": "The admin password, in plaintext. **It is full access to the data**: do not log it, do not store it in a shared configuration file, and do not pass it on the command line. No URI is returned: a URI with the credential inside ends up in shell history and in the logs of whatever process receives it."
          },
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ]
          },
          "database": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "username",
          "password",
          "host",
          "port",
          "database"
        ]
      },
      "DbaasStats": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dbaas_stats"
            ]
          },
          "cpu_percent": {
            "type": [
              "number",
              "null"
            ]
          },
          "memory_used_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "memory_total_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "disk_used_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "disk_total_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "connections": {
            "type": [
              "number",
              "null"
            ]
          },
          "max_connections": {
            "type": [
              "number",
              "null"
            ]
          },
          "uptime_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "database_count": {
            "type": [
              "number",
              "null"
            ]
          },
          "total_size_bytes": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "cpu_percent",
          "memory_used_bytes",
          "memory_total_bytes",
          "disk_used_bytes",
          "disk_total_bytes",
          "connections",
          "max_connections",
          "uptime_seconds",
          "database_count",
          "total_size_bytes"
        ],
        "description": "Which fields are populated depends on the service's backend: some measure the **container** (CPU, memory, disk) and others the **engine** (connections, size, uptime). A `null` means \"not measured here\", not zero."
      },
      "DbaasLogs": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dbaas_logs"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Oldest to newest, as the engine returns them."
          }
        },
        "required": [
          "object",
          "lines"
        ]
      },
      "DbaasDatabase": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dbaas_database"
            ]
          },
          "id": {
            "type": "string",
            "example": "appdb"
          },
          "name": {
            "type": "string"
          },
          "owner": {
            "type": [
              "string",
              "null"
            ]
          },
          "size_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "table_count": {
            "type": [
              "number",
              "null"
            ],
            "description": "Tables (or collections in MongoDB). `null` when the engine does not report it."
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "owner",
          "size_bytes",
          "table_count"
        ]
      },
      "DbaasDatabaseList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DbaasDatabase"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "DbaasUser": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dbaas_user"
            ]
          },
          "id": {
            "type": "string",
            "example": "app@%"
          },
          "username": {
            "type": "string"
          },
          "host": {
            "type": [
              "string",
              "null"
            ],
            "description": "MySQL only: where the user can connect from. `%` means any origin."
          },
          "can_login": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "can_create_db": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "username",
          "host",
          "can_login",
          "can_create_db"
        ]
      },
      "DbaasUserList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DbaasUser"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "DbaasBackup": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "dbaas_backup"
            ]
          },
          "id": {
            "type": "string",
            "example": "20260727-030001F"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "`full`, `diff`, `incr`, `manual`…"
          },
          "size_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ],
            "description": "`local`, `s3`, or `both`."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "type",
          "size_bytes",
          "location",
          "created_at"
        ]
      },
      "DbaasBackupList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DbaasBackup"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasCluster": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cluster hostname. Point your domains at it with a CNAME.",
            "example": "d-10432.deploy.truo.cloud"
          },
          "quorum": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the control plane has quorum. `null` until the first health check (under a minute)."
          },
          "nodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "description": "Node position, 0 to 2."
                },
                "healthy": {
                  "type": "boolean"
                },
                "in_rotation": {
                  "type": "boolean",
                  "description": "Whether the cluster hostname currently sends traffic to this node."
                }
              },
              "required": [
                "index",
                "healthy",
                "in_rotation"
              ]
            },
            "description": "Empty until the first health check."
          },
          "checked_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "quorum",
          "nodes",
          "checked_at"
        ],
        "description": "`enterprise` only, and only in `GET /v1/caas/{id}`. `null` otherwise."
      },
      "Caas": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas"
            ]
          },
          "id": {
            "type": "string",
            "example": "svc_10432"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "suspended",
              "terminated",
              "cancelled",
              "fraud",
              "unknown"
            ]
          },
          "topology": {
            "type": "string",
            "enum": [
              "discovery",
              "enterprise"
            ],
            "description": "`discovery`: one machine, apps deployed from a repository or an image (`/v1/caas/{id}/apps`). `enterprise`: a three-node cluster that deploys docker-compose stacks (`/v1/caas/{id}/stacks`) and keeps serving when a node goes down. The two expose different endpoints; `capabilities` lists the ones that respond for this service."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "The service's identifier."
          },
          "primary_ip": {
            "type": [
              "string",
              "null"
            ],
            "description": "`null` on `enterprise`: traffic enters through the cluster hostname, not one IP."
          },
          "provisioning_state": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "draft",
              "provisioning",
              "active",
              "suspended",
              "terminated",
              "error",
              "unknown"
            ],
            "description": "Provisioning progress. Distinct from `status`, which is the **contract** state in billing: a service that is `active` in billing can still be `provisioning` here. Until it is `active`, the app endpoints return `400 unsupported_for_product`."
          },
          "machine": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "running",
                  "stopped",
                  "unknown"
                ]
              },
              "uptime_seconds": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "state",
              "uptime_seconds"
            ],
            "description": "The machine running the service. `null` in the listing and also when it does not exist yet — a freshly purchased service has no machine until provisioning finishes. Always `null` on `enterprise`: see `cluster`."
          },
          "cluster": {
            "$ref": "#/components/schemas/CaasCluster"
          },
          "capabilities": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "Which `/v1` endpoints respond for THIS service. A capability set to `false` returns `400 unsupported_for_product`; it is not a transient error and retrying does not help."
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "topology",
          "label",
          "primary_ip",
          "provisioning_state",
          "machine",
          "cluster",
          "capabilities"
        ]
      },
      "CaasList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Caas"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasAppSource": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "git",
              "docker_image",
              "other"
            ],
            "description": "`other` = the source was configured outside this API and cannot be represented here."
          },
          "ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "The repository URL, or the image reference (`nginx:1.27`)."
          },
          "branch": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "type",
          "ref",
          "branch"
        ],
        "description": "The code source. It comes back `null` in the listing —the backend does not include it there— and also when the app was created without a configured source. Use `GET /v1/caas/{id}/apps/{app_id}`."
      },
      "CaasApp": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_app"
            ]
          },
          "id": {
            "type": "string",
            "example": "app_9f2c1b7e"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "idle",
              "deploying",
              "deployed",
              "error",
              "unknown"
            ],
            "description": "The outcome of the **latest deployment**. It is not a health check: a `deployed` does not guarantee the process is still alive right now. `idle` = never deployed since creation."
          },
          "source": {
            "$ref": "#/components/schemas/CaasAppSource"
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "status",
          "source"
        ]
      },
      "CaasAppList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasApp"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasDeployment": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_deployment"
            ]
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "unknown"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "created_at"
        ]
      },
      "CaasDeploymentList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasDeployment"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasLogs": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_logs"
            ]
          },
          "app": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "description": "Output exactly as the app emits it, with line breaks. It can come back empty."
          }
        },
        "required": [
          "object",
          "app",
          "content"
        ]
      },
      "CaasEnvVar": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_env_var"
            ]
          },
          "key": {
            "type": "string",
            "example": "DATABASE_URL"
          }
        },
        "required": [
          "object",
          "key"
        ]
      },
      "CaasEnvVarList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasEnvVar"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasDomain": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_domain"
            ]
          },
          "host": {
            "type": "string",
            "example": "app.example.com"
          },
          "https": {
            "type": "boolean"
          },
          "certificate_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "none",
              "letsencrypt",
              "custom",
              "unknown"
            ],
            "description": "Which issuer is configured, **not** whether the certificate was already issued: issuance is asynchronous, with no state or id to query. It comes back `null` in the creation response, because at that point there is no certificate yet. The only real check that the domain is serving is an HTTPS request to the host."
          }
        },
        "required": [
          "object",
          "host",
          "https",
          "certificate_type"
        ]
      },
      "CaasDomainList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasDomain"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasDatabase": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_database"
            ]
          },
          "id": {
            "type": "string"
          },
          "engine": {
            "type": "string",
            "example": "postgres"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "idle",
              "deploying",
              "deployed",
              "error",
              "unknown"
            ],
            "description": "The outcome of the **latest deployment**. It is not a health check: a `deployed` does not guarantee the process is still alive right now. `idle` = never deployed since creation."
          }
        },
        "required": [
          "object",
          "id",
          "engine",
          "name",
          "status"
        ]
      },
      "CaasDatabaseList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasDatabase"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasStackService": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "As in the compose file.",
            "example": "web"
          },
          "image": {
            "type": "string",
            "example": "nginx:1.27"
          },
          "mode": {
            "type": "string",
            "enum": [
              "replicated",
              "global",
              "unknown"
            ]
          },
          "replicas": {
            "type": "object",
            "properties": {
              "running": {
                "type": "integer"
              },
              "desired": {
                "type": "integer"
              }
            },
            "required": [
              "running",
              "desired"
            ]
          },
          "update": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "state": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "state",
              "message"
            ],
            "description": "The last rolling update, if there was one (`updating`, `completed`, `rollback_completed`…). A `rollback_completed` here means the cluster reverted a version whose healthcheck failed."
          }
        },
        "required": [
          "name",
          "image",
          "mode",
          "replicas",
          "update"
        ]
      },
      "CaasStack": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_stack"
            ]
          },
          "name": {
            "type": "string",
            "example": "web"
          },
          "version": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "deployed",
              "failed",
              "removed",
              "unknown"
            ],
            "description": "The outcome of the stack's **latest version**. `failed` means that version was rejected; the previous `deployed` one keeps running (see `deployed_version`)."
          },
          "origin": {
            "type": "string",
            "enum": [
              "deploy",
              "rollback",
              "scale",
              "webhook",
              "remove",
              "restore",
              "unknown"
            ],
            "description": "What created the version. `restore` = the platform redeployed it after rebuilding the cluster."
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "services": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CaasStackService"
            },
            "description": "What is running now, read from the cluster. `null` when the cluster did not answer: the rest of the resource is still accurate."
          }
        },
        "required": [
          "object",
          "name",
          "version",
          "status",
          "origin",
          "error",
          "updated_at",
          "services"
        ]
      },
      "CaasStackList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasStack"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasStackVersion": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_stack_version"
            ]
          },
          "version": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "deployed",
              "failed",
              "removed",
              "unknown"
            ],
            "description": "The outcome of the stack's **latest version**. `failed` means that version was rejected; the previous `deployed` one keeps running (see `deployed_version`)."
          },
          "origin": {
            "type": "string",
            "enum": [
              "deploy",
              "rollback",
              "scale",
              "webhook",
              "remove",
              "restore",
              "unknown"
            ],
            "description": "What created the version. `restore` = the platform redeployed it after rebuilding the cluster."
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "version",
          "status",
          "origin",
          "error",
          "created_at"
        ]
      },
      "CaasStackTask": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string"
          },
          "desired_state": {
            "type": "string"
          },
          "current_state": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "service",
          "desired_state",
          "current_state",
          "error"
        ]
      },
      "CaasStackDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaasStack"
          },
          {
            "type": "object",
            "properties": {
              "deployed_version": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The version running now. `null` if none ever deployed successfully, or the stack was removed."
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The compose file of `deployed_version`, exactly as it was sent."
              },
              "versions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CaasStackVersion"
                },
                "description": "Newest first. The last 20 are kept."
              },
              "tasks": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/CaasStackTask"
                },
                "description": "Tasks that are not running, with their error. Empty when everything is healthy; `null` when the cluster did not answer."
              }
            },
            "required": [
              "deployed_version",
              "source",
              "versions",
              "tasks"
            ]
          }
        ]
      },
      "CaasStackVersionSource": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaasStackVersion"
          },
          {
            "type": "object",
            "properties": {
              "stack": {
                "type": "string"
              },
              "source": {
                "type": "string",
                "description": "The compose file of that version, exactly as it was sent."
              }
            },
            "required": [
              "stack",
              "source"
            ]
          }
        ]
      },
      "CaasStackLogs": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_stack_logs"
            ]
          },
          "stack": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Every replica, interleaved, each line prefixed with its timestamp. A snapshot, not a stream: to follow a service, call again with `since`."
          }
        },
        "required": [
          "object",
          "stack",
          "service",
          "lines"
        ]
      },
      "CaasSecret": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_secret"
            ]
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "name",
          "updated_at"
        ]
      },
      "CaasSecretList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasSecret"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasObjectWrite": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_object_write"
            ]
          },
          "name": {
            "type": "string"
          },
          "changed": {
            "type": "boolean",
            "description": "`false` if the stored value was already this one."
          },
          "redeploy_needed": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Stacks that use it. A running service keeps the value it started with: redeploy these (`PUT /v1/caas/{id}/stacks/{stack}` with the same compose) for them to pick up the new one."
          }
        },
        "required": [
          "object",
          "name",
          "changed",
          "redeploy_needed"
        ]
      },
      "CaasConfig": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_config"
            ]
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "name",
          "updated_at"
        ]
      },
      "CaasConfigList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasConfig"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasRegistry": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_registry"
            ]
          },
          "server": {
            "type": "string",
            "example": "ghcr.io"
          },
          "username": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "server",
          "username",
          "updated_at"
        ]
      },
      "CaasRegistryList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasRegistry"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasClusterDomain": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_cluster_domain"
            ]
          },
          "host": {
            "type": "string",
            "example": "app.example.com"
          },
          "primary": {
            "type": "boolean",
            "description": "The cluster hostname. It cannot be removed."
          },
          "dns_ok": {
            "type": "boolean",
            "description": "Whether the host resolves to the cluster right now."
          },
          "resolves_to": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The addresses the host resolves to right now."
          },
          "certificate_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "`null` while the certificate is being issued, or if issuance failed."
          }
        },
        "required": [
          "object",
          "host",
          "primary",
          "dns_ok",
          "resolves_to",
          "certificate_expires_at"
        ]
      },
      "CaasClusterDomainList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasClusterDomain"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasDeployKey": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_deploy_key"
            ]
          },
          "key": {
            "type": "string",
            "description": "Shown once. Send it as `Authorization: Bearer <key>` to the webhook."
          },
          "webhook_url": {
            "type": "string",
            "description": "Replace `{stack}` with the stack name. A `POST` redeploys the current version of that stack; with `{\"images\": {\"web\": \"ghcr.io/acme/app:sha\"}}` it swaps those images first."
          }
        },
        "required": [
          "object",
          "key",
          "webhook_url"
        ]
      },
      "CaasBuildTarget": {
        "type": "object",
        "properties": {
          "stack": {
            "type": "string",
            "example": "web"
          },
          "service": {
            "type": "string",
            "description": "As in the compose file.",
            "example": "app"
          }
        },
        "required": [
          "stack",
          "service"
        ]
      },
      "CaasBuild": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_build"
            ]
          },
          "id": {
            "type": "string",
            "description": "Opaque. Builds are addressed by `number`."
          },
          "number": {
            "type": "integer",
            "description": "Sequential per service.",
            "example": 12
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "deploying",
              "succeeded",
              "failed",
              "canceled",
              "unknown"
            ],
            "description": "`queued` → `running` → (`deploying`, only with `deploy`) → `succeeded` | `failed` | `canceled`. `succeeded` with an `error` means the image was built but deploying it to its target failed."
          },
          "repo": {
            "type": "string",
            "example": "https://github.com/acme/app"
          },
          "ref": {
            "type": "string",
            "description": "Branch or tag.",
            "example": "main"
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Directory inside the repository; `null` = its root."
          },
          "dockerfile": {
            "type": [
              "string",
              "null"
            ],
            "description": "Relative to `path`. `null` = `Dockerfile` if there is one."
          },
          "mode": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "dockerfile",
              "railpack"
            ],
            "description": "`dockerfile` when the repository has one; otherwise `railpack` (detects the language and builds without a Dockerfile). `null` until the build starts."
          },
          "commit": {
            "type": [
              "string",
              "null"
            ],
            "description": "The commit that was built. `null` until the clone."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "The image by digest in your cluster registry, ready for a compose file. Being a digest, rolling a stack back brings back the same bytes. `null` until the build succeeds.",
            "example": "127.0.0.1:5000/app@sha256:4f1c…"
          },
          "image_name": {
            "type": "string",
            "description": "Name in the cluster registry.",
            "example": "app"
          },
          "deploy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaasBuildTarget"
              },
              {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "version": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "The stack version the build created. `null` until then."
                  }
                },
                "required": [
                  "version"
                ]
              }
            ],
            "description": "Where the image is deployed when the build succeeds. `null` = build only."
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "origin": {
            "type": "string",
            "enum": [
              "api",
              "rerun",
              "push",
              "platform",
              "unknown"
            ],
            "description": "`push` = a push to a connected repository; `platform` = started by TruoCloud."
          },
          "member": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The cluster node that ran it, 0 to 2."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "seconds": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Duration, once finished."
          },
          "pruned": {
            "type": "boolean",
            "description": "The image was removed from the registry to free space."
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `id` of the source it built, if any."
          },
          "preview": {
            "type": [
              "string",
              "null"
            ],
            "description": "The preview environment that asked for it, if any.",
            "example": "pr-12"
          }
        },
        "required": [
          "object",
          "id",
          "number",
          "status",
          "repo",
          "ref",
          "path",
          "dockerfile",
          "mode",
          "commit",
          "image",
          "image_name",
          "deploy",
          "error",
          "origin",
          "member",
          "created_at",
          "started_at",
          "finished_at",
          "seconds",
          "pruned",
          "source_id",
          "preview"
        ]
      },
      "CaasBuildList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasBuild"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasBuildStarted": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaasBuild"
          },
          {
            "type": "object",
            "properties": {
              "coalesced": {
                "type": "boolean",
                "description": "Starting from a source: `true` when a build of that source was already waiting in the queue and that build is returned instead of a new one. It clones the branch when it starts, so it builds the latest push too. Always `false` for a public repository."
              }
            },
            "required": [
              "coalesced"
            ]
          }
        ]
      },
      "CaasStartBuildRequest": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string",
            "maxLength": 300,
            "format": "uri",
            "description": "An `https` URL of a **public** repository. For a private one, connect it as a source and send `source` instead.",
            "example": "https://github.com/acme/app"
          },
          "ref": {
            "type": "string",
            "maxLength": 100,
            "description": "Branch or tag. Defaults to `main`."
          },
          "path": {
            "type": "string",
            "maxLength": 200,
            "description": "Directory inside the repository to build. Defaults to its root."
          },
          "dockerfile": {
            "type": "string",
            "maxLength": 200,
            "description": "Relative to `path`. Without it: `Dockerfile` if there is one, otherwise automatic detection."
          },
          "image": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
            "description": "Name in the cluster registry. Defaults to the repository name.",
            "example": "app"
          },
          "deploy": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "stack": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,29}$",
                "example": "web"
              },
              "service": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,39}$",
                "example": "app"
              }
            },
            "required": [
              "stack",
              "service"
            ],
            "description": "Deploy the image as a new version of this stack service when the build succeeds. The stack must already be deployed with that service; the rest of its compose file is kept."
          },
          "source": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
            "description": "Build a connected repository (`GET /v1/caas/{id}/sources`) with its own settings, instead of `repo`. With it, only `ref` and `deploy` may be sent, as in `POST /v1/caas/{id}/sources/{name}/build`.",
            "example": "web"
          }
        }
      },
      "CaasBuildLog": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_build_log"
            ]
          },
          "number": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "deploying",
              "succeeded",
              "failed",
              "canceled",
              "unknown"
            ],
            "description": "`queued` → `running` → (`deploying`, only with `deploy`) → `succeeded` | `failed` | `canceled`. `succeeded` with an `error` means the image was built but deploying it to its target failed."
          },
          "offset": {
            "type": "integer",
            "description": "Pass it as `offset` on the next call."
          },
          "text": {
            "type": "string",
            "description": "The log from the requested `offset` on."
          },
          "done": {
            "type": "boolean",
            "description": "`true` once the build no longer changes: stop polling."
          }
        },
        "required": [
          "object",
          "number",
          "status",
          "offset",
          "text",
          "done"
        ]
      },
      "CaasSource": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_source"
            ]
          },
          "id": {
            "type": "string",
            "description": "Opaque. Sources are addressed by `name`."
          },
          "name": {
            "type": "string",
            "example": "web"
          },
          "provider": {
            "type": "string",
            "enum": [
              "github",
              "git"
            ],
            "description": "`github`: through the TruoCloud GitHub App. `git`: any Git server over SSH, with a deploy key."
          },
          "repo": {
            "type": "string",
            "description": "The repository, for display. Never carries credentials."
          },
          "branch": {
            "type": "string",
            "example": "main"
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "dockerfile": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": "string",
            "description": "Name in the cluster registry.",
            "example": "web"
          },
          "deploy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CaasBuildTarget"
              },
              {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Where each successful build is deployed. `null` = build only."
              }
            ]
          },
          "auto_deploy": {
            "type": "boolean",
            "description": "A push to `branch` builds (and deploys, with `deploy`)."
          },
          "deploy_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "`git` only: the OpenSSH public key to add to the repository as a **read-only** deploy key."
          },
          "webhook_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "`git` only: point the repository's push webhook here, signed with the `webhook_secret`."
          },
          "host_key_pinned": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "`git` only: the server's SSH host key seen on the first clone is the only one accepted afterwards. If the server changes its key, `PATCH` with `reset_host_key: true`."
          },
          "last_push_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_commit": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "provider",
          "repo",
          "branch",
          "path",
          "dockerfile",
          "image",
          "deploy",
          "auto_deploy",
          "deploy_key",
          "webhook_url",
          "host_key_pinned",
          "last_push_at",
          "last_commit",
          "created_at",
          "updated_at"
        ]
      },
      "CaasSourceList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasSource"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasSourceWithSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CaasSource"
          },
          {
            "type": "object",
            "properties": {
              "webhook_secret": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`git` only, and **shown once**: the secret that signs the push webhook (HMAC signature on GitHub, Gitea, Forgejo, and Bitbucket; secret token on GitLab). `null` for `github` sources, which receive pushes through the app."
              }
            },
            "required": [
              "webhook_secret"
            ]
          }
        ]
      },
      "CaasCreateSourceRequest": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "github",
              "git"
            ],
            "description": "Defaults to `github`."
          },
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
            "description": "Unique in the service. Defaults to `image`."
          },
          "repo": {
            "type": "string",
            "minLength": 3,
            "maxLength": 400,
            "description": "`github`: `owner/name`. `git`: an SSH URL, `git@host:owner/repo.git` or `ssh://git@host[:port]/owner/repo.git`.",
            "example": "acme/app"
          },
          "branch": {
            "type": "string",
            "maxLength": 100,
            "description": "Defaults to `main`."
          },
          "path": {
            "type": "string",
            "maxLength": 200,
            "description": "Directory inside the repository to build. Defaults to its root."
          },
          "dockerfile": {
            "type": "string",
            "maxLength": 200,
            "description": "Relative to `path`. Without it: `Dockerfile` if there is one, otherwise automatic detection."
          },
          "image": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
            "description": "Name in the cluster registry. Defaults to the repository name.",
            "example": "app"
          },
          "deploy": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "stack": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,29}$",
                "example": "web"
              },
              "service": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,39}$",
                "example": "app"
              }
            },
            "required": [
              "stack",
              "service"
            ],
            "description": "Deploy the image as a new version of this stack service when the build succeeds. The stack must already be deployed with that service; the rest of its compose file is kept."
          },
          "auto_deploy": {
            "type": "boolean",
            "description": "Defaults to `true`."
          }
        },
        "required": [
          "repo"
        ]
      },
      "CaasUpdateSourceRequest": {
        "type": "object",
        "properties": {
          "branch": {
            "type": "string",
            "maxLength": 100
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "`null` = the repository root."
          },
          "dockerfile": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "`null` = detect."
          },
          "image": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
            "description": "Name in the cluster registry. Defaults to the repository name.",
            "example": "app"
          },
          "deploy": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "stack": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,29}$",
                "example": "web"
              },
              "service": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,39}$",
                "example": "app"
              }
            },
            "required": [
              "stack",
              "service"
            ],
            "description": "`null` = build only, do not deploy."
          },
          "auto_deploy": {
            "type": "boolean"
          },
          "reset_host_key": {
            "type": "boolean",
            "description": "`git` only: forget the pinned SSH host key; the next clone pins the server's current one."
          }
        },
        "description": "Only what is sent changes. The repository and provider cannot change: delete and create again."
      },
      "CaasSourceBuildRequest": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "maxLength": 100,
            "description": "Another branch or tag of the repository. Defaults to the source `branch`. A different `ref` without `deploy` builds only: a branch never lands on the source stack unless you name that stack.",
            "example": "feature/new-checkout"
          },
          "deploy": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "stack": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9-]{0,29}$",
                "example": "web"
              },
              "service": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,39}$",
                "example": "app"
              }
            },
            "required": [
              "stack",
              "service"
            ],
            "description": "Where the image goes when the build succeeds, instead of the source target. `null` = build only."
          }
        }
      },
      "CaasGithub": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_github"
            ]
          },
          "available": {
            "type": "boolean",
            "description": "`false` while the GitHub connection is not offered yet."
          },
          "app": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "slug": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "example": "https://github.com/apps/truocloud"
              }
            },
            "required": [
              "slug",
              "url"
            ]
          },
          "installations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "installation_id": {
                  "type": "integer"
                },
                "account": {
                  "type": "string",
                  "description": "The GitHub user or organization.",
                  "example": "acme"
                },
                "connected_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "installation_id",
                "account",
                "connected_at"
              ]
            },
            "description": "The app installations connected to this service."
          }
        },
        "required": [
          "object",
          "available",
          "app",
          "installations"
        ]
      },
      "CaasGithubInstallLink": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_github_install_link"
            ]
          },
          "url": {
            "type": "string",
            "description": "Open it in a browser signed in to GitHub."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "One hour after it was issued."
          }
        },
        "required": [
          "object",
          "url",
          "expires_at"
        ]
      },
      "CaasPreview": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_preview"
            ]
          },
          "name": {
            "type": "string",
            "example": "pr-12"
          },
          "status": {
            "type": "string",
            "enum": [
              "building",
              "deploying",
              "ready",
              "failed",
              "closing",
              "closed",
              "unknown"
            ],
            "description": "`building` (the branch is building) → `deploying` → `ready` (the address answers over HTTPS) | `failed` (see `error`; a new push or `POST …/build` tries again). `closing` → `closed` once its stack, secret and database are gone."
          },
          "url": {
            "type": "string",
            "description": "Where it answers.",
            "example": "https://pr-12.d-1368.app.truo.dev"
          },
          "ref": {
            "type": "string",
            "description": "The branch it builds.",
            "example": "feature/new-checkout"
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "The connected repository it builds from.",
            "example": "web"
          },
          "base_stack": {
            "type": "string",
            "description": "The production stack its compose file is derived from.",
            "example": "web"
          },
          "service": {
            "type": "string",
            "description": "The service of `base_stack` that runs the built image.",
            "example": "app"
          },
          "stack": {
            "type": "string",
            "description": "Its own stack, `pv-<name>`.",
            "example": "pv-pr-12"
          },
          "pr_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "database": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "dbaas_service_id": {
                "type": "string",
                "example": "svc_1371"
              },
              "secret": {
                "type": "string",
                "description": "The preview secret that holds its URL, mounted with the production secret name.",
                "example": "app-db-url-pv-pr-12"
              },
              "database": {
                "type": "string",
                "example": "pv_pr_12"
              },
              "user": {
                "type": "string",
                "example": "pv_pr_12"
              }
            },
            "required": [
              "dbaas_service_id",
              "secret",
              "database",
              "user"
            ],
            "description": "Its own empty database, when it was opened with one. Never the URL or the password."
          },
          "last_build": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The `number` of its latest build."
          },
          "last_commit": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "ttl_hours": {
            "type": "integer",
            "description": "Hours without a push before it closes by itself."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "ready_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "closed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "closed_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "`api`, `expired`, or the state the service went to."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "name",
          "status",
          "url",
          "ref",
          "source",
          "base_stack",
          "service",
          "stack",
          "pr_url",
          "database",
          "last_build",
          "last_commit",
          "error",
          "ttl_hours",
          "expires_at",
          "ready_at",
          "closed_at",
          "closed_reason",
          "created_at",
          "updated_at"
        ]
      },
      "CaasPreviewList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasPreview"
            }
          },
          "has_more": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "next_cursor": {
            "type": "null"
          },
          "enabled": {
            "type": "boolean",
            "description": "Previews were enabled on this service (`POST …/previews/enable`)."
          },
          "limit": {
            "type": "integer",
            "description": "How many may be open at once.",
            "example": 3
          },
          "wildcard": {
            "type": "string",
            "example": "*.d-1368.app.truo.dev"
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor",
          "enabled",
          "limit",
          "wildcard"
        ]
      },
      "CaasOpenPreviewRequest": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
            "description": "The connected repository of production (`GET /v1/caas/{id}/sources`).",
            "example": "web"
          },
          "ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "The branch of the pull request.",
            "example": "feature/new-checkout"
          },
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,24}[a-z0-9])?$",
            "description": "Defaults to the branch, shortened. It becomes the address: `<name>.<cluster name>`.",
            "example": "pr-12"
          },
          "base_stack": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{0,29}$",
            "description": "Defaults to the source target stack."
          },
          "service": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{0,39}$",
            "description": "Defaults to the source target service."
          },
          "pr_url": {
            "type": "string",
            "maxLength": 300,
            "format": "uri"
          },
          "ttl_hours": {
            "type": "integer",
            "minimum": 1,
            "maximum": 336,
            "description": "Defaults to 24.",
            "example": 24
          },
          "database": {
            "type": "object",
            "properties": {
              "dbaas_service_id": {
                "type": "string",
                "description": "A PostgreSQL DBaaS service of the same account.",
                "example": "svc_1371"
              },
              "secret": {
                "type": "string",
                "description": "The secret of `base_stack` that holds the database URL.",
                "example": "app-db-url"
              }
            },
            "required": [
              "dbaas_service_id",
              "secret"
            ],
            "description": "Give the preview its own empty database instead of the production one."
          },
          "shared_secrets": {
            "type": "boolean",
            "description": "Without `database`, a production stack with secrets is refused: the preview would share them, database included. `true` says none of them leads to production data."
          }
        },
        "required": [
          "source",
          "ref"
        ]
      },
      "CaasPreviewBuild": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_preview_build"
            ]
          },
          "preview": {
            "type": "string"
          },
          "build": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Follow it in `GET /v1/caas/{id}/builds/{number}`."
          },
          "coalesced": {
            "type": "boolean",
            "description": "A build of this preview was already waiting and builds the latest push too."
          }
        },
        "required": [
          "object",
          "preview",
          "build",
          "coalesced"
        ]
      },
      "CaasAddonCatalog": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_addon_catalog"
            ]
          },
          "engines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "engine": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                },
                "default_variable": {
                  "type": "string"
                },
                "local": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean",
                      "description": "`false` on three-node services: the data cannot live on a single node."
                    },
                    "min_memory_mb": {
                      "type": "integer"
                    },
                    "default_memory_mb": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "available",
                    "min_memory_mb",
                    "default_memory_mb"
                  ]
                },
                "managed": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean"
                    },
                    "dbaas_service_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Services of this account that can hold it."
                    }
                  },
                  "required": [
                    "available",
                    "dbaas_service_ids"
                  ]
                }
              },
              "required": [
                "engine",
                "version",
                "default_variable",
                "local",
                "managed"
              ]
            }
          },
          "memory": {
            "type": "object",
            "properties": {
              "plan_mb": {
                "type": "integer"
              },
              "system_reserve_mb": {
                "type": "integer"
              },
              "used_mb": {
                "type": "integer"
              },
              "free_mb": {
                "type": "integer"
              }
            },
            "required": [
              "plan_mb",
              "system_reserve_mb",
              "used_mb",
              "free_mb"
            ],
            "description": "What the plan leaves for `local` databases and caches."
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "object",
          "engines",
          "memory",
          "keys",
          "limit",
          "count"
        ]
      },
      "CaasAddon": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_addon"
            ]
          },
          "name": {
            "type": "string",
            "example": "main-db"
          },
          "engine": {
            "type": "string",
            "description": "`postgresql`, `mysql` or `valkey`.",
            "example": "postgresql"
          },
          "version": {
            "type": "string",
            "example": "17"
          },
          "mode": {
            "type": "string",
            "enum": [
              "local",
              "managed"
            ],
            "description": "`local` runs inside the service’s own machine, on its disk. `managed` is a database in a managed PostgreSQL service of the same account."
          },
          "status": {
            "type": "string",
            "enum": [
              "creating",
              "ready",
              "failed",
              "deleting",
              "unknown"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "memory_mb": {
            "type": [
              "integer",
              "null"
            ],
            "description": "`local` only: memory reserved and capped for the engine."
          },
          "dbaas_service_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "`managed` only.",
            "example": "svc_1371"
          },
          "host": {
            "type": "string",
            "description": "Reachable from the stacks of this service only.",
            "example": "main-db.truo.internal"
          },
          "port": {
            "type": "integer"
          },
          "database": {
            "type": "string"
          },
          "user": {
            "type": "string"
          },
          "reference": {
            "type": "string",
            "description": "Write it as the value of an environment variable in a compose file to receive the connection URL. Replace `URL` with `HOST`, `PORT`, `USER`, `PASSWORD` or `DATABASE` for a single part.",
            "example": "${{main-db.URL}}"
          },
          "default_variable": {
            "type": "string",
            "example": "DATABASE_URL"
          },
          "managed_backups": {
            "type": "boolean",
            "description": "`false` for `local`: its data is carried by the machine’s daily backup only, with no point-in-time restore."
          },
          "running": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "`null` if the cluster did not answer."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "name",
          "engine",
          "version",
          "mode",
          "status",
          "error",
          "memory_mb",
          "dbaas_service_id",
          "host",
          "port",
          "database",
          "user",
          "reference",
          "default_variable",
          "managed_backups",
          "running",
          "created_at",
          "updated_at"
        ]
      },
      "CaasAddonList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaasAddon"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CaasAddonDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "caas_addon"
            ]
          },
          "name": {
            "type": "string",
            "example": "main-db"
          },
          "engine": {
            "type": "string",
            "description": "`postgresql`, `mysql` or `valkey`.",
            "example": "postgresql"
          },
          "version": {
            "type": "string",
            "example": "17"
          },
          "mode": {
            "type": "string",
            "enum": [
              "local",
              "managed"
            ],
            "description": "`local` runs inside the service’s own machine, on its disk. `managed` is a database in a managed PostgreSQL service of the same account."
          },
          "status": {
            "type": "string",
            "enum": [
              "creating",
              "ready",
              "failed",
              "deleting",
              "unknown"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "memory_mb": {
            "type": [
              "integer",
              "null"
            ],
            "description": "`local` only: memory reserved and capped for the engine."
          },
          "dbaas_service_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "`managed` only.",
            "example": "svc_1371"
          },
          "host": {
            "type": "string",
            "description": "Reachable from the stacks of this service only.",
            "example": "main-db.truo.internal"
          },
          "port": {
            "type": "integer"
          },
          "database": {
            "type": "string"
          },
          "user": {
            "type": "string"
          },
          "reference": {
            "type": "string",
            "description": "Write it as the value of an environment variable in a compose file to receive the connection URL. Replace `URL` with `HOST`, `PORT`, `USER`, `PASSWORD` or `DATABASE` for a single part.",
            "example": "${{main-db.URL}}"
          },
          "default_variable": {
            "type": "string",
            "example": "DATABASE_URL"
          },
          "managed_backups": {
            "type": "boolean",
            "description": "`false` for `local`: its data is carried by the machine’s daily backup only, with no point-in-time restore."
          },
          "running": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "`null` if the cluster did not answer."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "connected_stacks": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Stacks whose compose references it."
          },
          "last_machine_backup_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "`local` only: the last good backup of the machine."
          }
        },
        "required": [
          "object",
          "name",
          "engine",
          "version",
          "mode",
          "status",
          "error",
          "memory_mb",
          "dbaas_service_id",
          "host",
          "port",
          "database",
          "user",
          "reference",
          "default_variable",
          "managed_backups",
          "running",
          "created_at",
          "updated_at",
          "connected_stacks",
          "last_machine_backup_at"
        ]
      },
      "LbReplica": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Stable identifier of the replica.",
            "example": "A"
          },
          "public_ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "healthy": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "`null` = could not be verified (provisioning, or being rebuilt after a failure)."
          }
        },
        "required": [
          "label",
          "public_ip",
          "healthy"
        ]
      },
      "LoadBalancer": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "load_balancer"
            ]
          },
          "id": {
            "type": "string",
            "example": "svc_10432"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "suspended",
              "terminated",
              "cancelled",
              "fraud",
              "unknown"
            ]
          },
          "provisioning_state": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "draft",
              "provisioning",
              "active",
              "suspended",
              "terminated",
              "error",
              "unknown"
            ],
            "description": "Provisioning progress. Distinct from `status`, which is the **contract** state in billing. Until it is `active`, writing listeners returns `400 unsupported_for_product`."
          },
          "hostname": {
            "type": [
              "string",
              "null"
            ],
            "description": "The balancer's stable name. Point your DNS records here, not at the IP: with a `pair` it resolves to both public IPs and drops the one of a replica that is down."
          },
          "public_ip": {
            "type": [
              "string",
              "null"
            ],
            "description": "The IP traffic enters through (the first replica in a `pair`). It can move to another machine on failure: that is part of how the service recovers, which is why it is not what belongs in DNS."
          },
          "public_ips": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Every public IP of the service, in replica order: one for `single`, two for `pair`. Empty until provisioning assigns them."
          },
          "topology": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "single",
              "pair"
            ],
            "description": "`null` when the control plane could not be reached."
          },
          "replicas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LbReplica"
            },
            "description": "State of each replica. Empty when the control plane could not be reached."
          },
          "healthy": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Is the balancer responding? With a `pair`, `true` as soon as one replica serves. `null` = could not be verified, which is different from `false`: it happens while provisioning. It says nothing about the health of your backends — that is in `GET /v1/load-balancers/{id}/stats`."
          },
          "config_pending": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "A replica has not received the latest listener configuration yet (it is being rebuilt); the service converges it on its own. `null` when the control plane could not be reached."
          },
          "listener_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "capabilities": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "Which `/v1` endpoints respond for THIS service. A capability set to `false` returns `400 unsupported_for_product`."
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "provisioning_state",
          "hostname",
          "public_ip",
          "public_ips",
          "topology",
          "replicas",
          "healthy",
          "config_pending",
          "listener_count",
          "capabilities"
        ]
      },
      "LoadBalancerList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoadBalancer"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "LbListener": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "lb_listener"
            ]
          },
          "id": {
            "type": "string",
            "example": "web"
          },
          "name": {
            "type": "string"
          },
          "protocol": {
            "type": "string",
            "enum": [
              "http",
              "tcp"
            ],
            "description": "`tcp` balances at the connection level and works for any protocol. `http` understands the request and is what enables routing by domain."
          },
          "port": {
            "type": "integer"
          },
          "tls": {
            "type": "string",
            "enum": [
              "none",
              "passthrough",
              "terminate"
            ],
            "description": "`passthrough` hands TLS to your backends intact. `terminate` decrypts it at the balancer —requires `protocol: http` and `domain`— and traffic to your backends travels in plaintext over the internal network."
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "algorithm": {
            "type": "string",
            "enum": [
              "roundrobin",
              "leastconn",
              "source"
            ],
            "description": "`source` always sends each origin IP to the same backend: it is what you use when the application keeps sessions in memory."
          },
          "health_check": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "tcp",
                  "http",
                  "https"
                ],
                "description": "`tcp` opens a connection. `http` requests `path` in plaintext. `https` requests `path` over TLS without validating the certificate (use it for backends that only speak TLS; an `http` probe against port 443 always fails)."
              },
              "path": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "interval_ms": {
                "type": "integer"
              },
              "expect_status": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "HTTP status the probe expects (`http`/`https`). `null` = any 2xx/3xx."
              },
              "expect_body": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Text the probe expects in the response body (`http`/`https`)."
              },
              "healthy_threshold": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Consecutive passing probes before a backend is back in rotation. `null` = 2."
              },
              "unhealthy_threshold": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Consecutive failing probes before a backend is taken out of rotation. `null` = 3."
              }
            },
            "required": [
              "type",
              "path",
              "interval_ms",
              "expect_status",
              "expect_body",
              "healthy_threshold",
              "unhealthy_threshold"
            ]
          },
          "proxy_protocol": {
            "type": "boolean",
            "description": "Send the PROXY protocol v2 header to the backends so they see the real client IP. The backends must expect it, or every connection fails."
          },
          "allowed_sources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "CIDR ranges allowed to connect. Empty = any source."
          },
          "forwarded_headers": {
            "type": "boolean",
            "description": "HTTP mode: the balancer adds `X-Forwarded-For`, `X-Forwarded-Proto` and `X-Forwarded-Port` so your backends see the visitor, not the balancer."
          },
          "redirect_http": {
            "type": "boolean",
            "description": "Port 80 answers plain HTTP with a 301 to this HTTPS listener."
          },
          "sticky_sessions": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "cookie"
                ]
              },
              "cookie_name": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "cookie_name"
            ],
            "description": "Session affinity by cookie (HTTP mode). `null` = none."
          },
          "backends": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ip": {
                  "type": "string"
                },
                "port": {
                  "type": "integer"
                },
                "weight": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "ip",
                "port",
                "weight"
              ]
            }
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "protocol",
          "port",
          "tls",
          "domain",
          "algorithm",
          "health_check",
          "proxy_protocol",
          "allowed_sources",
          "forwarded_headers",
          "redirect_http",
          "sticky_sessions",
          "backends"
        ]
      },
      "LbListenerList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LbListener"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "LbBackend": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "lb_backend"
            ]
          },
          "id": {
            "type": "string",
            "example": "web/10.0.0.5/8080"
          },
          "listener": {
            "type": "string"
          },
          "ip": {
            "type": "string",
            "description": "The backend's IP or hostname."
          },
          "port": {
            "type": "integer"
          },
          "weight": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Traffic share relative to the listener's other backends. Defaults to 1."
          }
        },
        "required": [
          "object",
          "id",
          "listener",
          "ip",
          "port",
          "weight"
        ]
      },
      "LbBackendList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LbBackend"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "LbStats": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "lb_stats"
            ]
          },
          "listeners": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "listener": {
                  "type": "string"
                },
                "protocol": {
                  "type": "string",
                  "enum": [
                    "http",
                    "tcp",
                    "unknown"
                  ]
                },
                "port": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "up",
                    "down",
                    "unknown"
                  ]
                },
                "sessions": {
                  "type": "integer",
                  "description": "Connections in flight."
                },
                "bytes_in": {
                  "type": "number"
                },
                "bytes_out": {
                  "type": "number"
                },
                "backends": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "target": {
                        "type": "string",
                        "description": "The backend as declared, in `host:port` form.",
                        "example": "10.0.0.5:8080"
                      },
                      "health": {
                        "type": "string",
                        "enum": [
                          "healthy",
                          "unhealthy",
                          "unknown"
                        ]
                      }
                    },
                    "required": [
                      "target",
                      "health"
                    ]
                  }
                }
              },
              "required": [
                "listener",
                "protocol",
                "port",
                "state",
                "sessions",
                "bytes_in",
                "bytes_out",
                "backends"
              ]
            }
          }
        },
        "required": [
          "object",
          "listeners"
        ]
      },
      "LbHistoryPoint": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "description": "Start of the bucket (ISO 8601, UTC)."
          },
          "connections_per_sec": {
            "type": [
              "number",
              "null"
            ],
            "description": "New connections per second."
          },
          "bytes_in_per_sec": {
            "type": [
              "number",
              "null"
            ]
          },
          "bytes_out_per_sec": {
            "type": [
              "number",
              "null"
            ]
          },
          "sessions_avg": {
            "type": [
              "number",
              "null"
            ],
            "description": "Average concurrent connections."
          },
          "sessions_max": {
            "type": [
              "number",
              "null"
            ],
            "description": "Peak concurrent connections."
          },
          "backends_up_min": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Lowest number of healthy backends seen in the bucket."
          },
          "backends_total": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "at",
          "connections_per_sec",
          "bytes_in_per_sec",
          "bytes_out_per_sec",
          "sessions_avg",
          "sessions_max",
          "backends_up_min",
          "backends_total"
        ],
        "description": "One bucket. Every field is `null` when there is no data for it (a gap, not a zero)."
      },
      "LbStatsHistory": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "lb_stats_history"
            ]
          },
          "range": {
            "type": "string",
            "enum": [
              "1h",
              "6h",
              "24h",
              "7d",
              "14d"
            ],
            "description": "Window to return. Bucket size: `1h` → 1 min, `6h` → 5 min, `24h` → 15 min, `7d` → 1 h, `14d` → 2 h. Samples are kept 14 days."
          },
          "bucket_seconds": {
            "type": "integer"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "total": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LbHistoryPoint"
            },
            "description": "All listeners together."
          },
          "listeners": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "listener": {
                  "type": "string"
                },
                "points": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LbHistoryPoint"
                  }
                }
              },
              "required": [
                "listener",
                "points"
              ]
            }
          }
        },
        "required": [
          "object",
          "range",
          "bucket_seconds",
          "from",
          "to",
          "total",
          "listeners"
        ]
      },
      "ObjectStorage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "object_storage"
            ]
          },
          "service": {
            "type": [
              "string",
              "null"
            ],
            "example": "svc_10432"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "error"
            ]
          },
          "endpoint": {
            "type": "string",
            "description": "The S3 endpoint. Configure your client with `addressing_style=path`.",
            "example": "s3.truo.cloud"
          },
          "storage_bytes": {
            "type": "integer"
          },
          "objects": {
            "type": "integer"
          },
          "buckets": {
            "type": "integer"
          },
          "egress_used_bytes": {
            "type": "integer",
            "description": "Downloaded in the last 30 days."
          },
          "egress_included_bytes": {
            "type": "integer",
            "description": "The period's included egress, derived from the storage in use."
          },
          "requests_30d": {
            "type": "integer"
          }
        },
        "required": [
          "object",
          "service",
          "status",
          "endpoint",
          "storage_bytes",
          "objects",
          "buckets",
          "egress_used_bytes",
          "egress_included_bytes",
          "requests_30d"
        ]
      },
      "StorageBucketCachePolicy": {
        "type": "object",
        "properties": {
          "respect_origin_cache_control": {
            "type": "boolean",
            "description": "Use the `Cache-Control` each object was uploaded with. When `false`, the bucket's settings apply to every object."
          },
          "default_cache_control": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 256,
            "description": "Applied to objects that have no `Cache-Control` of their own. `no-cache` for files that change under the same name (manifests); `public, max-age=31536000, immutable` for files with a version in the name. `null` = none.",
            "example": "no-cache"
          },
          "edge_ttl_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 31536000,
            "description": "How long the edge keeps a copy when neither the object nor `default_cache_control` set a lifetime. `0` = do not cache. `null` = the service default.",
            "example": 3600
          },
          "purge_on_write": {
            "type": "boolean",
            "description": "On a public bucket, overwriting or deleting an object purges the old copy from every edge location within seconds."
          }
        },
        "required": [
          "respect_origin_cache_control",
          "default_cache_control",
          "edge_ttl_seconds",
          "purge_on_write"
        ]
      },
      "StorageBucket": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "storage_bucket"
            ]
          },
          "id": {
            "type": "string",
            "example": "backups"
          },
          "name": {
            "type": "string",
            "example": "backups"
          },
          "access": {
            "type": "string",
            "enum": [
              "private",
              "public"
            ],
            "description": "`public` publishes the bucket at a read-only URL (`public_url`). `private` withdraws it: objects remain accessible with a key or a presigned URL."
          },
          "objects": {
            "type": "integer"
          },
          "size_bytes": {
            "type": "integer"
          },
          "public_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The anonymous read base URL. `null` while the bucket is private.",
            "example": "https://s3.truo.cloud/_public/k3m9xz4n/"
          },
          "cdn": {
            "type": "boolean",
            "description": "Cache what `public_url` serves at the edge. On by default when the bucket is made public."
          },
          "cache_policy": {
            "$ref": "#/components/schemas/StorageBucketCachePolicy"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null for a bucket created by a direct S3 client, which has no registry row."
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "access",
          "objects",
          "size_bytes",
          "public_url",
          "cdn",
          "cache_policy",
          "created_at"
        ]
      },
      "StorageBucketList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageBucket"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "StorageCachePurge": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "storage_cache_purge"
            ]
          },
          "purged": {
            "type": "integer",
            "description": "Keys or prefixes accepted by the purge."
          }
        },
        "required": [
          "object",
          "purged"
        ]
      },
      "StorageDeletion": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "storage_deletion"
            ]
          },
          "bucket": {
            "type": "string"
          },
          "deleted": {
            "type": "integer",
            "description": "Objects actually deleted."
          }
        },
        "required": [
          "object",
          "bucket",
          "deleted"
        ]
      },
      "StorageBucketMetrics": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "storage_bucket_metrics"
            ]
          },
          "bucket": {
            "type": "string"
          },
          "range": {
            "type": "string",
            "enum": [
              "7d",
              "30d",
              "90d"
            ]
          },
          "storage_bytes": {
            "type": "integer"
          },
          "storage_delta_bytes": {
            "type": "integer",
            "description": "Difference against the first snapshot in the range. Negative if the bucket shrank."
          },
          "objects": {
            "type": "integer"
          },
          "objects_delta": {
            "type": "integer"
          },
          "egress_used_bytes": {
            "type": "integer"
          },
          "egress_included_bytes": {
            "type": "integer"
          },
          "requests_30d": {
            "type": "integer",
            "description": "Always 30 days, regardless of `range`."
          },
          "get_pct": {
            "type": "integer",
            "description": "Reads as a percentage of the range's total requests."
          },
          "storage_series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "bytes": {
                  "type": "integer"
                }
              },
              "required": [
                "date",
                "bytes"
              ]
            },
            "description": "One point per UTC day. Empty until there are snapshots."
          },
          "requests_series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "get": {
                  "type": "integer"
                },
                "put": {
                  "type": "integer"
                }
              },
              "required": [
                "date",
                "get",
                "put"
              ]
            },
            "description": "One point per UTC day. Empty if there was no traffic in the range."
          },
          "egress_by_origin": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "bytes": {
                  "type": "integer"
                }
              },
              "required": [
                "label",
                "bytes"
              ]
            },
            "description": "How much left through the edge cache versus the origin."
          }
        },
        "required": [
          "object",
          "bucket",
          "range",
          "storage_bytes",
          "storage_delta_bytes",
          "objects",
          "objects_delta",
          "egress_used_bytes",
          "egress_included_bytes",
          "requests_30d",
          "get_pct",
          "storage_series",
          "requests_series",
          "egress_by_origin"
        ]
      },
      "StorageObject": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "storage_object"
            ]
          },
          "id": {
            "type": "string",
            "example": "photos/logo.png"
          },
          "key": {
            "type": "string",
            "description": "Relative to the bucket. Folders end in `/`.",
            "example": "photos/logo.png"
          },
          "name": {
            "type": "string",
            "description": "The key's last segment.",
            "example": "logo.png"
          },
          "is_folder": {
            "type": "boolean",
            "description": "A folder is not an object: it is a shared prefix. It is listed for navigation, and has no size or date."
          },
          "content_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Inferred from the extension, not read from the object.",
            "example": "image/png"
          },
          "size_bytes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_modified": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "key",
          "name",
          "is_folder",
          "content_type",
          "size_bytes",
          "last_modified"
        ]
      },
      "StorageObjectList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageObject"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "StoragePresignedUrl": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "storage_presigned_url"
            ]
          },
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "PUT"
            ]
          },
          "expires_in": {
            "type": "integer"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "url",
          "method",
          "expires_in",
          "expires_at"
        ]
      },
      "StorageAccessKey": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "storage_access_key"
            ]
          },
          "id": {
            "type": "string",
            "description": "Currently equal to `access_key_id`; still treat it as the resource's identifier.",
            "example": "AKIA7QF2K3M9XZ4NPRTV"
          },
          "name": {
            "type": "string"
          },
          "access_key_id": {
            "type": "string",
            "description": "What goes in the S3 client."
          },
          "scope": {
            "type": "string",
            "description": "The bucket the key is limited to, or `*` for all.",
            "example": "*"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readwrite",
              "full"
            ],
            "description": "`read` only downloads, `readwrite` uploads and deletes, `full` adds bucket management through the S3 protocol."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_used": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "access_key_id",
          "scope",
          "permission",
          "created_at",
          "last_used"
        ]
      },
      "StorageAccessKeyList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageAccessKey"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "StorageAccessKeyWithSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StorageAccessKey"
          },
          {
            "type": "object",
            "properties": {
              "secret_access_key": {
                "type": "string",
                "description": "Appears **exactly once**, in this response. It is not stored in plaintext on our side and no endpoint recovers it: if it is lost, the way out is to issue another key and rotate the application."
              }
            },
            "required": [
              "secret_access_key"
            ]
          }
        ]
      },
      "MailGatewayUsage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "mail_gateway_usage"
            ]
          },
          "period": {
            "type": "string",
            "description": "The current UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
            "example": "2026-07"
          },
          "sends": {
            "type": "integer",
            "description": "Sends accepted during the period."
          },
          "rejected": {
            "type": "integer",
            "description": "Sends rejected by the gateway before reaching SES (unverified domain, suspended tenant, invalid payload). They are not billed."
          }
        },
        "required": [
          "object",
          "period",
          "sends",
          "rejected"
        ]
      },
      "MailGateway": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "mail_gateway"
            ]
          },
          "id": {
            "type": "string",
            "example": "mg3f9a2b1c4d5e"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "deprovisioned",
              "unknown"
            ]
          },
          "plan": {
            "type": [
              "string",
              "null"
            ]
          },
          "api_endpoint": {
            "type": "string",
            "description": "Where sending happens. Sending does NOT go through this API: it goes against this endpoint with an API key from `POST /v1/mail-gateway/keys`.",
            "example": "https://mg.truo.cloud/v1"
          },
          "config_set": {
            "type": [
              "string",
              "null"
            ],
            "description": "The tenant's SES config set. It reports the delivery events that feed `/metrics` and `/messages`; `null` means the tenant has no metrics yet."
          },
          "domain_count": {
            "type": "integer"
          },
          "key_count": {
            "type": "integer",
            "description": "Active and revoked API keys."
          },
          "usage_month": {
            "$ref": "#/components/schemas/MailGatewayUsage"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "plan",
          "api_endpoint",
          "config_set",
          "domain_count",
          "key_count",
          "usage_month",
          "created_at"
        ]
      },
      "MailGatewayMetrics": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "mail_gateway_metrics"
            ]
          },
          "range": {
            "type": "string",
            "enum": [
              "7d",
              "30d",
              "90d"
            ]
          },
          "sends": {
            "type": "integer"
          },
          "sends_delta_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Change versus the previous period, as a fraction (`0.12` = +12%). `null` when the previous period had no sends: dividing by zero is not a 0%."
          },
          "delivery_rate": {
            "type": "number",
            "description": "A 0–1 fraction, not a percentage."
          },
          "open_rate": {
            "type": "number"
          },
          "bounce_rate": {
            "type": "number"
          },
          "complaint_rate": {
            "type": "number"
          },
          "bounce_rate_limit": {
            "type": "number",
            "description": "The SES bounce threshold. Crossing it puts the whole platform's sending reputation at risk, so the gateway suspends before getting there.",
            "example": 0.05
          },
          "complaint_rate_limit": {
            "type": "number",
            "example": 0.001
          },
          "complaints": {
            "type": "integer"
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Start of the UTC day, ISO 8601."
                },
                "sends": {
                  "type": "integer"
                },
                "opens": {
                  "type": "integer"
                },
                "bounces": {
                  "type": "integer"
                }
              },
              "required": [
                "date",
                "sends",
                "opens",
                "bounces"
              ]
            },
            "description": "The daily series for the range."
          },
          "latency": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stage": {
                  "type": "string",
                  "description": "The measured stage. Currently only `send_to_delivery`.",
                  "example": "send_to_delivery"
                },
                "p50_seconds": {
                  "type": "number"
                },
                "p95_seconds": {
                  "type": "number"
                },
                "p99_seconds": {
                  "type": "number"
                }
              },
              "required": [
                "stage",
                "p50_seconds",
                "p95_seconds",
                "p99_seconds"
              ]
            },
            "description": "Empty when there were no deliveries in the range."
          },
          "by_domain": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "domain": {
                  "type": "string"
                },
                "sends": {
                  "type": "integer"
                },
                "delivery_rate": {
                  "type": "number"
                },
                "open_rate": {
                  "type": "number"
                },
                "bounce_rate": {
                  "type": "number"
                }
              },
              "required": [
                "domain",
                "sends",
                "delivery_rate",
                "open_rate",
                "bounce_rate"
              ]
            }
          }
        },
        "required": [
          "object",
          "range",
          "sends",
          "sends_delta_pct",
          "delivery_rate",
          "open_rate",
          "bounce_rate",
          "complaint_rate",
          "bounce_rate_limit",
          "complaint_rate_limit",
          "complaints",
          "series",
          "latency",
          "by_domain"
        ]
      },
      "MailGatewayDnsRecord": {
        "type": "object",
        "properties": {
          "purpose": {
            "type": "string",
            "description": "What the record is for. Current values: `dkim`, `spf`, `mail_from_mx`, `mail_from_spf`, `dmarc`.",
            "example": "dkim"
          },
          "type": {
            "type": "string",
            "example": "TXT"
          },
          "host": {
            "type": "string",
            "description": "The record's full name, without the trailing dot.",
            "example": "mg._domainkey.example.com"
          },
          "value": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "info",
              "unknown"
            ],
            "description": "`info` = nothing verifies it, but publishing it improves deliverability. `pending` = SES has not seen it yet."
          }
        },
        "required": [
          "purpose",
          "type",
          "host",
          "value",
          "status"
        ]
      },
      "MailGatewayDomain": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "mail_gateway_domain"
            ]
          },
          "id": {
            "type": "string",
            "example": "example.com"
          },
          "domain": {
            "type": "string",
            "example": "example.com"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "failed",
              "unknown"
            ]
          },
          "verified_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailGatewayDnsRecord"
            },
            "description": "The records that must be published in the domain's zone."
          }
        },
        "required": [
          "object",
          "id",
          "domain",
          "status",
          "verified_at",
          "records"
        ]
      },
      "MailGatewayDomainList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailGatewayDomain"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "MailGatewayMessage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "mail_gateway_message"
            ]
          },
          "id": {
            "type": "string",
            "example": "0100019a2b3c4d5e-..."
          },
          "recipient": {
            "type": [
              "string",
              "null"
            ]
          },
          "subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "delivered",
              "opened",
              "deferred",
              "bounced",
              "complained",
              "unknown"
            ]
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `mg-category` tag set on the send, if any was set."
          },
          "from_domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "occurred_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "The time of the message's latest event, not of the send."
          }
        },
        "required": [
          "object",
          "id",
          "recipient",
          "subject",
          "status",
          "category",
          "from_domain",
          "occurred_at"
        ]
      },
      "MailGatewayMessageList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailGatewayMessage"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "MailGatewayKey": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "mail_gateway_key"
            ]
          },
          "id": {
            "type": "string",
            "example": "mgk3f9a2b1c4d5"
          },
          "hint": {
            "type": [
              "string",
              "null"
            ],
            "description": "A display prefix, to recognize the key without seeing it whole.",
            "example": "mg_live_AbCd..."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "unknown"
            ]
          },
          "secret": {
            "type": [
              "string",
              "null"
            ],
            "description": "The full key. **Only present in the creation response, exactly once**: we store this key's hash, so there is no way to recover it later — not even for us. In the listing it is always `null`.",
            "example": "mg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "api_endpoint": {
            "type": "string",
            "description": "Where this key is used: `POST {api_endpoint}/emails`.",
            "example": "https://mg.truo.cloud/v1"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "hint",
          "status",
          "secret",
          "api_endpoint",
          "created_at"
        ]
      },
      "MailGatewayKeyList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MailGatewayKey"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "MailGatewaySmtp": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "mail_gateway_smtp"
            ]
          },
          "host": {
            "type": "string",
            "example": "smtp.mg.truo.cloud"
          },
          "port": {
            "type": "integer",
            "description": "SMTPS, implicit TLS from the greeting. There is no STARTTLS on 587.",
            "example": 465
          },
          "username": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "revoked",
              "unknown"
            ],
            "description": "`suspended` = SMTP sending is cut off, usually over reputation or unpaid bills."
          },
          "config_set": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "host",
          "port",
          "username",
          "status",
          "config_set"
        ]
      },
      "MailGatewaySmtpCredentials": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "mail_gateway_smtp"
            ]
          },
          "host": {
            "type": "string",
            "example": "smtp.mg.truo.cloud"
          },
          "port": {
            "type": "integer",
            "description": "SMTPS, implicit TLS from the greeting. There is no STARTTLS on 587.",
            "example": 465
          },
          "username": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "revoked",
              "unknown"
            ],
            "description": "`suspended` = SMTP sending is cut off, usually over reputation or unpaid bills."
          },
          "config_set": {
            "type": [
              "string",
              "null"
            ]
          },
          "password": {
            "type": "string",
            "description": "The SMTP password in plaintext. Treat it as a secret: it sends on your behalf."
          }
        },
        "required": [
          "object",
          "host",
          "port",
          "username",
          "status",
          "config_set",
          "password"
        ]
      },
      "ImageUsage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "image_usage"
            ]
          },
          "period": {
            "type": "string",
            "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
            "example": "2026-07"
          },
          "transformations": {
            "type": "integer",
            "description": "Cache misses served: real CPU work by the engine. Cached hits do not count here."
          },
          "deliveries": {
            "type": "integer",
            "description": "Images delivered (hits + misses)."
          },
          "bytes_out": {
            "type": "integer",
            "description": "Egress traffic, in bytes."
          },
          "errors": {
            "type": "integer"
          }
        },
        "required": [
          "object",
          "period",
          "transformations",
          "deliveries",
          "bytes_out",
          "errors"
        ]
      },
      "ImageServices": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "image_services"
            ]
          },
          "id": {
            "type": "string",
            "example": "img3f9a2b1c4d5e"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "deleted",
              "unknown"
            ]
          },
          "tier": {
            "type": "string",
            "description": "The plan. `free` has a hard cap: the service stops at the quota.",
            "example": "free"
          },
          "api_endpoint": {
            "type": "string",
            "description": "The delivery plane. Transformations are requested against `{api_endpoint}/v1/img?url=…` with a token from `POST /v1/images/keys`, and signed URLs are served from `{api_endpoint}/s/…`. Delivery does NOT go through this API.",
            "example": "https://img.truo.cloud"
          },
          "origin_count": {
            "type": "integer",
            "description": "Origins in the allowlist. **Zero means nothing is served**: the allowlist is fail-closed by design."
          },
          "usage_month": {
            "$ref": "#/components/schemas/ImageUsage"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "tier",
          "api_endpoint",
          "origin_count",
          "usage_month",
          "created_at"
        ]
      },
      "ImageUsageReport": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "image_usage_report"
            ]
          },
          "period": {
            "type": "string",
            "example": "2026-07"
          },
          "tier": {
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/ImageUsage"
          },
          "included": {
            "type": "object",
            "properties": {
              "base_usd": {
                "type": "number",
                "description": "The base monthly price of the plan, in USD."
              },
              "transformations": {
                "type": "integer"
              },
              "deliveries": {
                "type": "integer"
              },
              "bytes_gb": {
                "type": "number"
              },
              "hard_cap": {
                "type": "boolean",
                "description": "true = the plan stops serving at the quota instead of billing overage (the free plan)."
              }
            },
            "required": [
              "base_usd",
              "transformations",
              "deliveries",
              "bytes_gb",
              "hard_cap"
            ],
            "description": "What the plan's quota includes."
          },
          "overage": {
            "type": "object",
            "properties": {
              "transformations": {
                "type": "integer"
              },
              "deliveries": {
                "type": "integer"
              },
              "bytes_gb": {
                "type": "number"
              },
              "amount_usd": {
                "type": "number",
                "description": "What the overage adds to the invoice, in USD."
              }
            },
            "required": [
              "transformations",
              "deliveries",
              "bytes_gb",
              "amount_usd"
            ],
            "description": "Consumption beyond the quota."
          },
          "total_usd": {
            "type": "number",
            "description": "Base + overage for the period, in USD."
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "description": "UTC day, `YYYY-MM-DD`.",
                  "example": "2026-07-30"
                },
                "transformations": {
                  "type": "integer"
                },
                "deliveries": {
                  "type": "integer"
                },
                "bytes_out": {
                  "type": "integer"
                }
              },
              "required": [
                "day",
                "transformations",
                "deliveries",
                "bytes_out"
              ]
            },
            "description": "Daily series, oldest first."
          }
        },
        "required": [
          "object",
          "period",
          "tier",
          "usage",
          "included",
          "overage",
          "total_usd",
          "series"
        ]
      },
      "ImageOrigin": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "image_origin"
            ]
          },
          "pattern": {
            "type": "string",
            "example": "images.example.com"
          }
        },
        "required": [
          "object",
          "pattern"
        ]
      },
      "ImageOriginList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImageOrigin"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "ImageOriginCreate": {
        "type": "object",
        "properties": {
          "pattern": {
            "type": "string",
            "minLength": 1,
            "maxLength": 253,
            "description": "A hostname (`images.example.com`) or a wildcard for its subdomains (`*.example.com`). Lowercased on save.",
            "example": "images.example.com"
          }
        },
        "required": [
          "pattern"
        ]
      },
      "ImageKey": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "image_key"
            ]
          },
          "token": {
            "type": "string",
            "description": "The full `imgt_…` token, **exactly once**: only its hash is stored, so there is no way to show it again. It authenticates the delivery plane (`GET {api_endpoint}/v1/img` and `POST {api_endpoint}/v1/sign`), never this API."
          },
          "api_endpoint": {
            "type": "string",
            "example": "https://img.truo.cloud"
          }
        },
        "required": [
          "object",
          "token",
          "api_endpoint"
        ]
      },
      "ImageRotateRequest": {
        "type": "object",
        "properties": {
          "grace_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 604800,
            "description": "How long the previous credential stays valid after the rotation, in seconds (up to 7 days). With `0` it dies immediately.",
            "example": 3600
          }
        }
      },
      "ImageSigningSecret": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "image_signing_secret"
            ]
          },
          "secret": {
            "type": "string",
            "description": "The per-tenant HMAC-SHA256 secret that signs delivery URLs. It belongs on your server, **never in the browser**: anyone holding it can mint URLs that serve — and bill — through your tenant."
          },
          "previous_valid_until": {
            "type": [
              "string",
              "null"
            ],
            "description": "After a rotation with `grace_seconds`, until when URLs signed with the previous secret keep working. `null` outside a grace window."
          }
        },
        "required": [
          "object",
          "secret",
          "previous_valid_until"
        ]
      },
      "ServerlessKv": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_kv"
            ]
          },
          "id": {
            "type": "string",
            "example": "t3f9a2b1c4d5e6f70"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "deleted",
              "unknown"
            ]
          },
          "tier": {
            "type": "string",
            "description": "The plan. `free` has a hard cap: the service stops at the quota.",
            "example": "free"
          },
          "api_endpoint": {
            "type": "string",
            "description": "The data plane. Keys are read and written against `{api_endpoint}/v1/ns/{namespace}/keys/{key}` with a token from `POST /v1/serverless/kv/keys`. Data does NOT go through this API.",
            "example": "https://kv.truo.cloud"
          },
          "limits": {
            "type": "object",
            "properties": {
              "reads_month": {
                "type": "integer"
              },
              "writes_month": {
                "type": "integer"
              },
              "storage_gb": {
                "type": "number"
              },
              "hard_cap": {
                "type": "boolean",
                "description": "true = the plan stops serving at the quota instead of billing overage (the free plan)."
              }
            },
            "required": [
              "reads_month",
              "writes_month",
              "storage_gb",
              "hard_cap"
            ]
          },
          "usage_month": {
            "type": "object",
            "properties": {
              "period": {
                "type": "string",
                "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
                "example": "2026-07"
              },
              "reads": {
                "type": "integer"
              },
              "writes": {
                "type": "integer"
              },
              "storage_bytes": {
                "type": "integer",
                "description": "The month's storage peak, sampled daily."
              }
            },
            "required": [
              "period",
              "reads",
              "writes",
              "storage_bytes"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "tier",
          "api_endpoint",
          "limits",
          "usage_month"
        ]
      },
      "ServerlessKvUsage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_kv_usage"
            ]
          },
          "period": {
            "type": "string",
            "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
            "example": "2026-07"
          },
          "tier": {
            "type": "string",
            "description": "The plan. `free` has a hard cap: the service stops at the quota.",
            "example": "free"
          },
          "usage": {
            "type": "object",
            "properties": {
              "reads": {
                "type": "integer"
              },
              "writes": {
                "type": "integer"
              },
              "storage_bytes": {
                "type": "integer"
              }
            },
            "required": [
              "reads",
              "writes",
              "storage_bytes"
            ]
          },
          "included": {
            "type": "object",
            "properties": {
              "base_usd": {
                "type": "number"
              },
              "reads": {
                "type": "integer"
              },
              "writes": {
                "type": "integer"
              },
              "storage_gb": {
                "type": "number"
              },
              "hard_cap": {
                "type": "boolean",
                "description": "true = the plan stops serving at the quota instead of billing overage (the free plan)."
              }
            },
            "required": [
              "base_usd",
              "reads",
              "writes",
              "storage_gb",
              "hard_cap"
            ]
          },
          "overage": {
            "type": "object",
            "properties": {
              "reads": {
                "type": "integer"
              },
              "writes": {
                "type": "integer"
              },
              "storage_gb": {
                "type": "number"
              },
              "amount_usd": {
                "type": "number"
              }
            },
            "required": [
              "reads",
              "writes",
              "storage_gb",
              "amount_usd"
            ]
          },
          "total_usd": {
            "type": "number",
            "description": "Base + overage for the period, in USD."
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "description": "UTC day, `YYYY-MM-DD`.",
                  "example": "2026-07-30"
                },
                "reads": {
                  "type": "integer"
                },
                "writes": {
                  "type": "integer"
                }
              },
              "required": [
                "day",
                "reads",
                "writes"
              ]
            },
            "description": "Daily series, oldest first."
          }
        },
        "required": [
          "object",
          "period",
          "tier",
          "usage",
          "included",
          "overage",
          "total_usd",
          "series"
        ]
      },
      "ServerlessKey": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_key"
            ]
          },
          "service": {
            "type": "string",
            "enum": [
              "kv",
              "cron",
              "db",
              "functions"
            ]
          },
          "token": {
            "type": "string",
            "description": "The full tenant token (`kvt_…`/`crt_…`/`dbt_…`/`fnt_…`), **exactly once**: only its hash is stored, so there is no way to show it again. It authenticates the data plane of that service's `api_endpoint`, never this API."
          },
          "api_endpoint": {
            "type": "string",
            "example": "https://kv.truo.cloud"
          }
        },
        "required": [
          "object",
          "service",
          "token",
          "api_endpoint"
        ]
      },
      "ServerlessRotateRequest": {
        "type": "object",
        "properties": {
          "grace_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 604800,
            "description": "How long the previous token stays valid after the rotation, in seconds (up to 7 days). With `0` it dies immediately.",
            "example": 3600
          }
        }
      },
      "ServerlessCron": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_cron"
            ]
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "deleted",
              "unknown"
            ]
          },
          "tier": {
            "type": "string",
            "description": "The plan. `free` has a hard cap: the service stops at the quota.",
            "example": "free"
          },
          "api_endpoint": {
            "type": "string",
            "description": "The data plane. Schedules are managed against `{api_endpoint}/v1/schedules` with a token from `POST /v1/serverless/cron/keys/rotate`. Scheduling does NOT go through this API.",
            "example": "https://cron.truo.cloud"
          },
          "schedule_count": {
            "type": "integer"
          },
          "limits": {
            "type": "object",
            "properties": {
              "max_schedules": {
                "type": "integer"
              },
              "executions_month": {
                "type": "integer"
              },
              "hard_cap": {
                "type": "boolean",
                "description": "true = the plan stops serving at the quota instead of billing overage (the free plan)."
              }
            },
            "required": [
              "max_schedules",
              "executions_month",
              "hard_cap"
            ]
          },
          "usage_month": {
            "type": "object",
            "properties": {
              "period": {
                "type": "string",
                "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
                "example": "2026-07"
              },
              "executions": {
                "type": "integer",
                "description": "Webhook deliveries fired this month (successful or failed)."
              },
              "failures": {
                "type": "integer"
              }
            },
            "required": [
              "period",
              "executions",
              "failures"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "tier",
          "api_endpoint",
          "schedule_count",
          "limits",
          "usage_month"
        ]
      },
      "ServerlessCronUsage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_cron_usage"
            ]
          },
          "period": {
            "type": "string",
            "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
            "example": "2026-07"
          },
          "tier": {
            "type": "string",
            "description": "The plan. `free` has a hard cap: the service stops at the quota.",
            "example": "free"
          },
          "usage": {
            "type": "object",
            "properties": {
              "executions": {
                "type": "integer"
              },
              "failures": {
                "type": "integer"
              }
            },
            "required": [
              "executions",
              "failures"
            ]
          },
          "included": {
            "type": "object",
            "properties": {
              "base_usd": {
                "type": "number"
              },
              "executions": {
                "type": "integer"
              },
              "max_schedules": {
                "type": "integer"
              },
              "hard_cap": {
                "type": "boolean",
                "description": "true = the plan stops serving at the quota instead of billing overage (the free plan)."
              }
            },
            "required": [
              "base_usd",
              "executions",
              "max_schedules",
              "hard_cap"
            ]
          },
          "overage": {
            "type": "object",
            "properties": {
              "executions": {
                "type": "integer"
              },
              "amount_usd": {
                "type": "number"
              }
            },
            "required": [
              "executions",
              "amount_usd"
            ]
          },
          "total_usd": {
            "type": "number"
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "description": "UTC day, `YYYY-MM-DD`.",
                  "example": "2026-07-30"
                },
                "executions": {
                  "type": "integer"
                },
                "failures": {
                  "type": "integer"
                }
              },
              "required": [
                "day",
                "executions",
                "failures"
              ]
            },
            "description": "Daily series, oldest first."
          }
        },
        "required": [
          "object",
          "period",
          "tier",
          "usage",
          "included",
          "overage",
          "total_usd",
          "series"
        ]
      },
      "ServerlessDb": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_db"
            ]
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "deleted",
              "unknown"
            ]
          },
          "tier": {
            "type": "string",
            "description": "The plan. `free` has a hard cap: the service stops at the quota.",
            "example": "free"
          },
          "api_endpoint": {
            "type": "string",
            "description": "The data plane. SQL runs against `{api_endpoint}/v1/db/{namespace}/query` (D1-compatible) with a token from `POST /v1/serverless/db/keys/rotate`. Queries do NOT go through this API.",
            "example": "https://db.truo.cloud"
          },
          "namespaces": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The live databases. A namespace is created lazily by its first query."
          },
          "limits": {
            "type": "object",
            "properties": {
              "max_namespaces": {
                "type": "integer"
              },
              "rows_read_month": {
                "type": "integer"
              },
              "rows_written_month": {
                "type": "integer"
              },
              "storage_gb": {
                "type": "number"
              },
              "hard_cap": {
                "type": "boolean",
                "description": "true = the plan stops serving at the quota instead of billing overage (the free plan)."
              }
            },
            "required": [
              "max_namespaces",
              "rows_read_month",
              "rows_written_month",
              "storage_gb",
              "hard_cap"
            ]
          },
          "usage_month": {
            "type": "object",
            "properties": {
              "period": {
                "type": "string",
                "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
                "example": "2026-07"
              },
              "rows_read": {
                "type": "integer"
              },
              "rows_written": {
                "type": "integer"
              },
              "storage_bytes": {
                "type": "integer",
                "description": "The month's storage peak, sampled daily."
              }
            },
            "required": [
              "period",
              "rows_read",
              "rows_written",
              "storage_bytes"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "tier",
          "api_endpoint",
          "namespaces",
          "limits",
          "usage_month"
        ]
      },
      "ServerlessDbUsage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_db_usage"
            ]
          },
          "period": {
            "type": "string",
            "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
            "example": "2026-07"
          },
          "tier": {
            "type": "string",
            "description": "The plan. `free` has a hard cap: the service stops at the quota.",
            "example": "free"
          },
          "usage": {
            "type": "object",
            "properties": {
              "rows_read": {
                "type": "integer"
              },
              "rows_written": {
                "type": "integer"
              },
              "storage_bytes": {
                "type": "integer"
              }
            },
            "required": [
              "rows_read",
              "rows_written",
              "storage_bytes"
            ]
          },
          "included": {
            "type": "object",
            "properties": {
              "base_usd": {
                "type": "number"
              },
              "rows_read": {
                "type": "integer"
              },
              "rows_written": {
                "type": "integer"
              },
              "storage_gb": {
                "type": "number"
              },
              "max_namespaces": {
                "type": "integer"
              },
              "hard_cap": {
                "type": "boolean",
                "description": "true = the plan stops serving at the quota instead of billing overage (the free plan)."
              }
            },
            "required": [
              "base_usd",
              "rows_read",
              "rows_written",
              "storage_gb",
              "max_namespaces",
              "hard_cap"
            ]
          },
          "overage": {
            "type": "object",
            "properties": {
              "rows_read": {
                "type": "integer"
              },
              "rows_written": {
                "type": "integer"
              },
              "storage_gb": {
                "type": "number"
              },
              "amount_usd": {
                "type": "number"
              }
            },
            "required": [
              "rows_read",
              "rows_written",
              "storage_gb",
              "amount_usd"
            ]
          },
          "total_usd": {
            "type": "number"
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "description": "UTC day, `YYYY-MM-DD`.",
                  "example": "2026-07-30"
                },
                "rows_read": {
                  "type": "integer"
                },
                "rows_written": {
                  "type": "integer"
                }
              },
              "required": [
                "day",
                "rows_read",
                "rows_written"
              ]
            },
            "description": "Daily series, oldest first."
          }
        },
        "required": [
          "object",
          "period",
          "tier",
          "usage",
          "included",
          "overage",
          "total_usd",
          "series"
        ]
      },
      "ServerlessFunctions": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_functions"
            ]
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended",
              "deleted",
              "unknown"
            ]
          },
          "tier": {
            "type": "string",
            "description": "The plan. `free` has a hard cap: the service stops at the quota.",
            "example": "free"
          },
          "api_endpoint": {
            "type": "string",
            "description": "The data plane. Functions are deployed against `{api_endpoint}/v1/functions` (the Workers fetch contract) with a token from `POST /v1/serverless/functions/keys/rotate`, and invoked at their public `{api_endpoint}/f/{slug}` URL. Neither goes through this API.",
            "example": "https://fn.truo.cloud"
          },
          "function_count": {
            "type": "integer"
          },
          "limits": {
            "type": "object",
            "properties": {
              "max_functions": {
                "type": "integer"
              },
              "invocations_month": {
                "type": "integer"
              },
              "hard_cap": {
                "type": "boolean",
                "description": "true = the plan stops serving at the quota instead of billing overage (the free plan)."
              }
            },
            "required": [
              "max_functions",
              "invocations_month",
              "hard_cap"
            ]
          },
          "usage_month": {
            "type": "object",
            "properties": {
              "period": {
                "type": "string",
                "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
                "example": "2026-07"
              },
              "invocations": {
                "type": "integer"
              },
              "errors": {
                "type": "integer"
              },
              "duration_ms": {
                "type": "integer",
                "description": "Total execution time this month, in milliseconds."
              }
            },
            "required": [
              "period",
              "invocations",
              "errors",
              "duration_ms"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "tier",
          "api_endpoint",
          "function_count",
          "limits",
          "usage_month"
        ]
      },
      "ServerlessFunctionsUsage": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_functions_usage"
            ]
          },
          "period": {
            "type": "string",
            "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
            "example": "2026-07"
          },
          "tier": {
            "type": "string",
            "description": "The plan. `free` has a hard cap: the service stops at the quota.",
            "example": "free"
          },
          "usage": {
            "type": "object",
            "properties": {
              "invocations": {
                "type": "integer"
              },
              "errors": {
                "type": "integer"
              },
              "duration_ms": {
                "type": "integer"
              }
            },
            "required": [
              "invocations",
              "errors",
              "duration_ms"
            ]
          },
          "included": {
            "type": "object",
            "properties": {
              "base_usd": {
                "type": "number"
              },
              "invocations": {
                "type": "integer"
              },
              "max_functions": {
                "type": "integer"
              },
              "hard_cap": {
                "type": "boolean",
                "description": "true = the plan stops serving at the quota instead of billing overage (the free plan)."
              }
            },
            "required": [
              "base_usd",
              "invocations",
              "max_functions",
              "hard_cap"
            ]
          },
          "overage": {
            "type": "object",
            "properties": {
              "invocations": {
                "type": "integer"
              },
              "amount_usd": {
                "type": "number"
              }
            },
            "required": [
              "invocations",
              "amount_usd"
            ]
          },
          "total_usd": {
            "type": "number"
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "description": "UTC day, `YYYY-MM-DD`.",
                  "example": "2026-07-30"
                },
                "invocations": {
                  "type": "integer"
                },
                "errors": {
                  "type": "integer"
                },
                "duration_ms": {
                  "type": "integer"
                }
              },
              "required": [
                "day",
                "invocations",
                "errors",
                "duration_ms"
              ]
            },
            "description": "Daily series, oldest first."
          }
        },
        "required": [
          "object",
          "period",
          "tier",
          "usage",
          "included",
          "overage",
          "total_usd",
          "series"
        ]
      },
      "ServerlessAvailability": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "serverless_availability"
            ]
          },
          "service": {
            "type": "string",
            "enum": [
              "kv",
              "cron",
              "db",
              "functions"
            ]
          },
          "month": {
            "type": "string",
            "description": "The UTC calendar month, `YYYY-MM`. It is the period that gets billed.",
            "example": "2026-07"
          },
          "uptime_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "The month's availability, 0–100, measured by a synthetic probe every 30 s that exercises the service (write and read, invoke, the scheduler firing on time). Announced maintenance windows are excluded. `null` with no measurement yet.",
            "example": 99.995
          },
          "downtime_seconds": {
            "type": "integer"
          },
          "measured_seconds": {
            "type": "integer"
          },
          "excluded_seconds": {
            "type": "integer",
            "description": "Seconds inside announced maintenance windows: neither up nor down."
          },
          "missing_seconds": {
            "type": "integer",
            "description": "Seconds without a probe sample. They do not count as downtime."
          },
          "incidents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "string"
                },
                "end": {
                  "type": "string"
                },
                "seconds": {
                  "type": "integer"
                }
              },
              "required": [
                "start",
                "end",
                "seconds"
              ]
            }
          },
          "maintenance_windows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "string"
                },
                "end": {
                  "type": "string"
                }
              },
              "required": [
                "start",
                "end"
              ]
            }
          },
          "days": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "description": "UTC day, `YYYY-MM-DD`.",
                  "example": "2026-07-30"
                },
                "uptime_pct": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "day",
                "uptime_pct"
              ]
            }
          }
        },
        "required": [
          "object",
          "service",
          "month",
          "uptime_pct",
          "downtime_seconds",
          "measured_seconds",
          "excluded_seconds",
          "missing_seconds",
          "incidents",
          "maintenance_windows",
          "days"
        ]
      },
      "RecipeSummary": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "recipe"
            ]
          },
          "name": {
            "type": "string",
            "example": "haztap-golden"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "latest_version": {
            "type": "string",
            "example": "1.2.0"
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "All published versions, oldest first."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "name",
          "description",
          "latest_version",
          "versions",
          "created_at",
          "updated_at"
        ]
      },
      "RecipeList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecipeSummary"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "RecipeManifest": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string",
            "enum": [
              "recipe/v1"
            ]
          },
          "name": {
            "type": "string",
            "description": "Slug, unique per account. Lowercase letters, digits and hyphens.",
            "example": "haztap-golden"
          },
          "version": {
            "type": "string",
            "description": "Semver. Published versions are immutable.",
            "example": "1.2.0"
          },
          "description": {
            "type": "string"
          },
          "requires": {
            "type": "object",
            "properties": {
              "php": {
                "type": "string",
                "example": ">=8.3"
              },
              "wp": {
                "type": "string",
                "example": ">=6.8"
              },
              "memory_mb": {
                "type": "integer",
                "description": "Rejected with `recipe_requirements_unmet` if the plan has less.",
                "example": 512
              }
            }
          },
          "plugins": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string",
                  "description": "Directory slug on wordpress.org, or the directory the zip in `url` creates.",
                  "example": "wp-graphql"
                },
                "version": {
                  "type": "string",
                  "description": "Pinned version. Without `url`, this exact version is installed; with `url`, it is what the site is expected to report.",
                  "example": "2.15.1"
                },
                "url": {
                  "type": "string",
                  "description": "`https://` zip. Requires `sha256`; verified before anything is installed. Max 20 MB.",
                  "example": "https://releases.example.com/plugins/my-plugin-1.2.0.zip"
                },
                "sha256": {
                  "type": "string",
                  "description": "Hex sha256 of the zip. Required with `url`."
                },
                "activate": {
                  "type": "boolean",
                  "description": "Default `true`."
                }
              },
              "required": [
                "slug"
              ]
            },
            "description": "Installed in order. Max 40."
          },
          "constants": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "description": "`wp config set … --type=constant`. Platform constants (`DB_*`, `WP_HOME`, `WP_SITEURL`, paths) are refused.",
            "example": {
              "WP_MEMORY_LIMIT": "512M"
            }
          },
          "options": {
            "type": "object",
            "additionalProperties": {},
            "description": "`wp option update … --format=json`. Any JSON value; no single quotes, semicolons or backslashes. Max 200.",
            "example": {
              "haztap_golden_version": "1.2.0",
              "graphql_general_settings": {
                "public_introspection_enabled": "off"
              }
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "store_owner"
                },
                "display": {
                  "type": "string",
                  "example": "Store Owner"
                },
                "caps": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "read",
                    "upload_files"
                  ]
                }
              },
              "required": [
                "name"
              ]
            }
          },
          "secrets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Constant names whose values **we** generate when applying (never in the manifest). Retrieve them once with `wordpress.recipes.secrets.claim` after the operation succeeds.",
            "example": [
              "GRAPHQL_JWT_AUTH_SECRET_KEY"
            ]
          },
          "verify": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "wp": {
                  "type": "string",
                  "description": "A WP-CLI line (same allowlist as `wordpress.wpcli.run`). Exit code 0 = green.",
                  "example": "plugin is-active wp-graphql"
                },
                "http": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string",
                      "example": "/graphql"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "GET",
                        "POST",
                        "HEAD"
                      ]
                    },
                    "body": {
                      "type": "string"
                    },
                    "expect": {
                      "type": "integer",
                      "description": "Expected HTTP status. Default 200."
                    }
                  },
                  "required": [
                    "path"
                  ]
                }
              }
            },
            "description": "Gate. Any red check fails the operation with `recipe_verify_failed`. Max 10."
          }
        },
        "required": [
          "apiVersion",
          "name",
          "version"
        ]
      },
      "Recipe": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RecipeSummary"
          },
          {
            "type": "object",
            "properties": {
              "version": {
                "type": "string",
                "description": "The version whose manifest is returned."
              },
              "manifest": {
                "$ref": "#/components/schemas/RecipeManifest"
              }
            },
            "required": [
              "version",
              "manifest"
            ]
          }
        ]
      },
      "RecipeSecrets": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "recipe_secrets"
            ]
          },
          "operation": {
            "type": "string"
          },
          "recipe": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "secrets": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Constant name → generated value. **Shown once**: this response deletes them server-side."
          }
        },
        "required": [
          "object",
          "operation",
          "recipe",
          "version",
          "secrets"
        ]
      },
      "Wordpress": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress"
            ]
          },
          "id": {
            "type": "string",
            "example": "svc_1241"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "suspended",
              "terminated",
              "cancelled",
              "fraud",
              "unknown"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "creating",
              "running",
              "stopped",
              "suspended",
              "terminated",
              "unknown"
            ],
            "description": "The site's actual state. Distinct from `status`, which is the **contract** state in billing: an `active` service can be `creating` for a few minutes after purchase."
          },
          "hostname": {
            "type": [
              "string",
              "null"
            ],
            "description": "The platform hostname the site was born with. Custom domains live under `/domains`.",
            "example": "wp-tcloud-1241.wp.truo.cloud"
          },
          "site_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "What WordPress reports as `siteurl`."
          },
          "admin_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "wordpress_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "php_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "plan": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "memory_mb": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "storage_gb": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "cpu_cores": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "php_workers": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "php_memory_limit_mb": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "monthly_visit_limit": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "memory_mb",
              "storage_gb",
              "cpu_cores",
              "php_workers",
              "php_memory_limit_mb",
              "monthly_visit_limit"
            ],
            "description": "Resources of the purchased plan. `null` until the site is provisioned."
          },
          "ssl_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "auto_update": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "core": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`minor`, `major`, `none`, as configured."
              },
              "plugins": {
                "type": "boolean"
              },
              "themes": {
                "type": "boolean"
              }
            },
            "required": [
              "core",
              "plugins",
              "themes"
            ]
          },
          "cdn_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "backups": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "frequency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "retention_days": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "last_backup_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "enabled",
              "frequency",
              "retention_days",
              "last_backup_at"
            ]
          },
          "live": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "active_theme": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "database_version": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "debug_mode": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "uptime_seconds": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "cpu": {
                "type": "object",
                "properties": {
                  "cores": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "usage_percent": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "cores",
                  "usage_percent"
                ]
              },
              "memory": {
                "type": "object",
                "properties": {
                  "used_bytes": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "total_bytes": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "used_bytes",
                  "total_bytes"
                ]
              },
              "disk": {
                "type": "object",
                "properties": {
                  "used_bytes": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "total_bytes": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "used_bytes",
                  "total_bytes"
                ]
              }
            },
            "required": [
              "active_theme",
              "database_version",
              "debug_mode",
              "uptime_seconds",
              "cpu",
              "memory",
              "disk"
            ],
            "description": "Read from the node. Only on `GET /v1/wordpress/{id}`; `null` in the list and when the node did not answer."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "capabilities": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "Which `/v1` endpoints respond for THIS site. A capability set to `false` returns `400 unsupported_for_product`; it is not a transient error and retrying does not help. `cloudflare` and `cdn` depend on the node the site lives on."
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "state",
          "hostname",
          "site_url",
          "admin_url",
          "wordpress_version",
          "php_version",
          "plan",
          "ssl_enabled",
          "auto_update",
          "cdn_enabled",
          "backups",
          "live",
          "created_at",
          "capabilities"
        ]
      },
      "WordpressList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Wordpress"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WordpressStatus": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_status"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "running",
              "stopped",
              "unknown"
            ],
            "description": "The site's runtime state."
          },
          "installed": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "WordPress finished its installation."
          },
          "database_ok": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "core_update_available": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "plugin_updates": {
            "type": [
              "integer",
              "null"
            ]
          },
          "theme_updates": {
            "type": [
              "integer",
              "null"
            ]
          },
          "checked_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the health fields were measured. `null` = measured for this request."
          },
          "uptime_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "cpu": {
            "type": "object",
            "properties": {
              "cores": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "usage_percent": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "cores",
              "usage_percent"
            ]
          },
          "memory": {
            "type": "object",
            "properties": {
              "used_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "total_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "used_bytes",
              "total_bytes"
            ]
          },
          "disk": {
            "type": "object",
            "properties": {
              "used_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "total_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "used_bytes",
              "total_bytes"
            ]
          }
        },
        "required": [
          "object",
          "state",
          "installed",
          "database_ok",
          "core_update_available",
          "plugin_updates",
          "theme_updates",
          "checked_at",
          "uptime_seconds",
          "cpu",
          "memory",
          "disk"
        ]
      },
      "WordpressLogs": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_logs"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "runtime",
              "error",
              "access",
              "server",
              "php"
            ],
            "description": "`runtime` = the runtime log of the site (with timestamps). `error`/`access` = the web server logs, `server` = the web server's own log, `php` = the PHP error log."
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Oldest to newest."
          }
        },
        "required": [
          "object",
          "type",
          "lines"
        ]
      },
      "WordpressExtension": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_extension"
            ]
          },
          "name": {
            "type": "string",
            "description": "The slug, as WP-CLI names it.",
            "example": "woocommerce"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "`active`, `inactive`, `must-use`, `dropin`, `parent`…"
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "update_available": {
            "type": "boolean"
          },
          "update_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "auto_update": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "name",
          "status",
          "version",
          "update_available",
          "update_version",
          "auto_update"
        ]
      },
      "WordpressExtensionList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WordpressExtension"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WordpressExtensionSearchResult": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_extension_search_result"
            ]
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rating": {
            "type": [
              "number",
              "null"
            ],
            "description": "0–100, as wordpress.org publishes it."
          },
          "ratings": {
            "type": [
              "number",
              "null"
            ]
          },
          "active_installs": {
            "type": [
              "number",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "screenshot_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "slug",
          "name",
          "rating",
          "ratings",
          "active_installs",
          "description",
          "screenshot_url"
        ]
      },
      "WordpressExtensionSearchList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WordpressExtensionSearchResult"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WordpressCoreUpdates": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_core_updates"
            ]
          },
          "available": {
            "type": "boolean"
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "string"
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "version",
                "type"
              ]
            }
          }
        },
        "required": [
          "object",
          "available",
          "versions"
        ]
      },
      "WordpressPhp": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_php"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "example": "8.3.12"
          },
          "memory_limit": {
            "type": [
              "string",
              "null"
            ],
            "example": "512M"
          },
          "upload_max_filesize": {
            "type": [
              "string",
              "null"
            ]
          },
          "post_max_size": {
            "type": [
              "string",
              "null"
            ]
          },
          "max_execution_time": {
            "type": [
              "string",
              "null"
            ]
          },
          "max_input_vars": {
            "type": [
              "string",
              "null"
            ]
          },
          "opcache_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "version",
          "memory_limit",
          "upload_max_filesize",
          "post_max_size",
          "max_execution_time",
          "max_input_vars",
          "opcache_enabled"
        ]
      },
      "WordpressBackup": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_backup"
            ]
          },
          "id": {
            "type": "string",
            "example": "wp_20260915_030000_daily"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "`manual`, `daily`, `weekly`, `monthly`, `pre_upgrade`…"
          },
          "size_bytes": {
            "type": [
              "number",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "encrypted": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "type",
          "size_bytes",
          "created_at",
          "encrypted"
        ]
      },
      "WordpressBackupList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WordpressBackup"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WordpressBackupSettings": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_backup_settings"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "frequency": {
            "type": [
              "string",
              "null"
            ]
          },
          "retention_days": {
            "type": [
              "number",
              "null"
            ]
          },
          "last_backup_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "policy": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "allowed_frequencies": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "min_retention_days": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_retention_days": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_manual_per_day": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "allowed_frequencies",
              "min_retention_days",
              "max_retention_days",
              "max_manual_per_day"
            ],
            "description": "What this site may be configured to. `null` if the node did not answer."
          }
        },
        "required": [
          "object",
          "enabled",
          "frequency",
          "retention_days",
          "last_backup_at",
          "policy"
        ]
      },
      "WordpressBackupDownload": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_backup_download"
            ]
          },
          "url": {
            "type": "string",
            "description": "A signed, temporary URL. Treat it as a secret."
          },
          "expires_in_seconds": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "url",
          "expires_in_seconds"
        ]
      },
      "WordpressStaging": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_staging"
            ]
          },
          "name": {
            "type": "string",
            "description": "Identifies the clone in `push` and `delete`.",
            "example": "staging"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "running",
              "stopped",
              "unknown"
            ]
          }
        },
        "required": [
          "object",
          "name",
          "url",
          "state"
        ]
      },
      "WordpressStagingList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WordpressStaging"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WordpressDomain": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_domain"
            ]
          },
          "id": {
            "type": "string"
          },
          "domain": {
            "type": "string",
            "example": "shop.example.com"
          },
          "primary": {
            "type": "boolean"
          },
          "ssl_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "`letsencrypt` or `cf_origin_ca`."
          },
          "verified": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "cloudflare": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`pending`, `active`… as Cloudflare reports it."
              },
              "ssl_status": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "status",
              "ssl_status"
            ]
          },
          "apex_direct": {
            "type": "boolean",
            "description": "The apex points an A record at the node and redirects to www."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "domain",
          "primary",
          "ssl_type",
          "verified",
          "cloudflare",
          "apex_direct",
          "created_at"
        ]
      },
      "WordpressDomainList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WordpressDomain"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WordpressDomainAdded": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_domain_added"
            ]
          },
          "domain": {
            "$ref": "#/components/schemas/WordpressDomain"
          },
          "dns_records": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "example": "CNAME"
                },
                "name": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "purpose": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "`routing` or `verification`, when known."
                }
              },
              "required": [
                "type",
                "name",
                "value",
                "purpose"
              ]
            },
            "description": "What to publish at your DNS provider. Empty when nothing is needed."
          },
          "cloudflare_fronted": {
            "type": "boolean",
            "description": "The domain already resolves to your own Cloudflare zone. Cloudflare for SaaS cannot verify a hostname proxied by another Cloudflare zone: disable the proxy (grey cloud) for it."
          },
          "node_ip": {
            "type": [
              "string",
              "null"
            ],
            "description": "For providers that cannot CNAME the apex: point a single A record here and the apex redirects to www."
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "domain",
          "dns_records",
          "cloudflare_fronted",
          "node_ip",
          "message"
        ]
      },
      "WordpressDomainVerification": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_domain_verification"
            ]
          },
          "domain": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it does not verify, in prose."
          },
          "cloudflare": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`pending`, `active`… as Cloudflare reports it."
              },
              "ssl_status": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "status",
              "ssl_status"
            ]
          }
        },
        "required": [
          "object",
          "domain",
          "verified",
          "reason",
          "cloudflare"
        ]
      },
      "WordpressCloudflare": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_cloudflare"
            ]
          },
          "active": {
            "type": "boolean",
            "description": "At least one of your own domains goes through Cloudflare for SaaS."
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "domain": {
                  "type": "string"
                },
                "primary": {
                  "type": "boolean"
                },
                "ssl_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ssl_status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "platform_hostname": {
                  "type": "boolean",
                  "description": "The hostname we manage for you; its DNS is ours."
                }
              },
              "required": [
                "id",
                "domain",
                "primary",
                "ssl_type",
                "status",
                "ssl_status",
                "platform_hostname"
              ]
            }
          }
        },
        "required": [
          "object",
          "active",
          "domains"
        ]
      },
      "WordpressCloudflareRecords": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_cloudflare_records"
            ]
          },
          "domain": {
            "type": "string"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "ssl_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "dns_records": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "example": "CNAME"
                },
                "name": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "purpose": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "`routing` or `verification`, when known."
                }
              },
              "required": [
                "type",
                "name",
                "value",
                "purpose"
              ]
            }
          },
          "www": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ssl_status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dns_records": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "example": "CNAME"
                    },
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "purpose": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "`routing` or `verification`, when known."
                    }
                  },
                  "required": [
                    "type",
                    "name",
                    "value",
                    "purpose"
                  ]
                }
              }
            },
            "required": [
              "status",
              "ssl_status",
              "dns_records"
            ],
            "description": "The `www.` companion of an apex domain."
          },
          "node_ip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "domain",
          "status",
          "ssl_status",
          "dns_records",
          "www",
          "node_ip"
        ]
      },
      "WordpressSecurity": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_security"
            ]
          },
          "score": {
            "type": "string",
            "enum": [
              "green",
              "yellow",
              "red",
              "unknown"
            ]
          },
          "xmlrpc_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "`off`, `jetpack` or `on`."
          },
          "login_protection": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "max_attempts": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "lockout_seconds": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "blocked_last_24h": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "active_lockouts": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "enabled",
              "max_attempts",
              "lockout_seconds",
              "blocked_last_24h",
              "active_lockouts"
            ]
          },
          "malware_scan": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "last_scan_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "clean": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "`null` = the last scan could not run."
              },
              "findings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "type": "string",
                      "description": "`core` or `plugin:<slug>`."
                    },
                    "type": {
                      "type": "string",
                      "description": "`modified`, `missing`…"
                    },
                    "file": {
                      "type": "string"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "target",
                    "type",
                    "file",
                    "message"
                  ]
                }
              }
            },
            "required": [
              "last_scan_at",
              "clean",
              "findings"
            ],
            "description": "`null` = never scanned."
          }
        },
        "required": [
          "object",
          "score",
          "xmlrpc_mode",
          "login_protection",
          "malware_scan"
        ]
      },
      "WordpressBlockedIp": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_blocked_ip"
            ]
          },
          "id": {
            "type": "string",
            "description": "A hash of the IP: what `DELETE` takes."
          },
          "ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempts": {
            "type": [
              "number",
              "null"
            ]
          },
          "last_attempt_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "ip",
          "attempts",
          "last_attempt_at"
        ]
      },
      "WordpressBlockedIpList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WordpressBlockedIp"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WordpressPagespeed": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_pagespeed"
            ]
          },
          "mobile": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "score": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "0–100 performance score."
              },
              "lcp_ms": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "inp_ms": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "cls": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "score",
              "lcp_ms",
              "inp_ms",
              "cls",
              "error"
            ]
          },
          "desktop": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "score": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "0–100 performance score."
              },
              "lcp_ms": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "inp_ms": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "cls": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "score",
              "lcp_ms",
              "inp_ms",
              "cls",
              "error"
            ]
          }
        },
        "required": [
          "object",
          "mobile",
          "desktop"
        ]
      },
      "WordpressRecovery": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_recovery"
            ]
          },
          "level": {
            "type": "integer",
            "description": "Current escalation level of auto-recovery. 0 = healthy."
          },
          "consecutive_failures": {
            "type": "integer"
          },
          "halted": {
            "type": "boolean",
            "description": "Auto-recovery gave up and needs a human."
          },
          "halted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_action_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "interventions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "level": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "action": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "success": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "level",
                "action",
                "reason",
                "success",
                "at"
              ]
            }
          }
        },
        "required": [
          "object",
          "level",
          "consecutive_failures",
          "halted",
          "halted_at",
          "last_action_at",
          "interventions"
        ]
      },
      "WordpressCdn": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_cdn"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base URL your media is served from when enabled."
          }
        },
        "required": [
          "object",
          "enabled",
          "url"
        ]
      },
      "WordpressCronEvent": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_cron_event"
            ]
          },
          "hook": {
            "type": "string",
            "example": "wp_version_check"
          },
          "next_run_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "schedule": {
            "type": [
              "string",
              "null"
            ],
            "description": "`hourly`, `twicedaily`, `daily`… or `null` for one-off."
          },
          "recurrence": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "hook",
          "next_run_at",
          "schedule",
          "recurrence"
        ]
      },
      "WordpressCronEventList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WordpressCronEvent"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WordpressEmail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_email"
            ]
          },
          "method": {
            "type": [
              "string",
              "null"
            ],
            "description": "How the site sends mail: `smtp`, `php_mail`, a plugin…"
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "from_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_test": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "to": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "success": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "to",
              "success",
              "at"
            ]
          }
        },
        "required": [
          "object",
          "method",
          "from",
          "from_name",
          "last_test"
        ]
      },
      "WordpressEmailLogEntry": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_email_log_entry"
            ]
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          },
          "subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "to",
          "subject",
          "status",
          "method",
          "at"
        ]
      },
      "WordpressEmailLogList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WordpressEmailLogEntry"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WordpressAutologin": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "wordpress_autologin"
            ]
          },
          "url": {
            "type": "string",
            "description": "Open it once. It logs you into wp-admin as the first administrator."
          },
          "expires_in_seconds": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "url",
          "expires_in_seconds"
        ]
      },
      "OrderableProduct": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "product"
            ]
          },
          "product": {
            "type": "string",
            "description": "Stable slug. This is what `POST /v1/orders` takes; it never changes for a given product.",
            "example": "wp-25k"
          },
          "name": {
            "type": "string",
            "example": "WP 25k"
          },
          "group": {
            "type": "string",
            "example": "WordPress Hosting"
          },
          "family": {
            "type": [
              "string",
              "null"
            ],
            "description": "Which `/v1` resource manages the service once active (`wordpress`, `vps`, `dbaas`, `dns`). `null` when it is only known once the service exists (see `family` in `GET /v1/services`).",
            "example": "wordpress"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "prices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cycle": {
                  "type": "string",
                  "enum": [
                    "monthly",
                    "quarterly",
                    "semiannually",
                    "annually",
                    "biennially",
                    "triennially",
                    "onetime",
                    "free"
                  ],
                  "description": "`free` and `onetime` are not recurring. Check `prices` in the product for what is sold."
                },
                "price": {
                  "type": "number",
                  "description": "Recurring price for the cycle, in `currency`."
                },
                "setup_fee": {
                  "type": "number"
                }
              },
              "required": [
                "cycle",
                "price",
                "setup_fee"
              ]
            }
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Use it as the key in `options` when ordering."
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "dropdown",
                    "radio",
                    "yesno",
                    "quantity"
                  ]
                },
                "min": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Only for `quantity`."
                },
                "max": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Only for `quantity`. `null` = no cap."
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      },
                      "prices": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "number"
                        },
                        "description": "Additional price per cycle, in `currency`. Cycles not listed are not sold with this choice."
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "prices"
                    ]
                  },
                  "description": "For `dropdown`/`radio`: pass the chosen `id`. For `yesno`: pass 1 or 0. For `quantity`: pass the amount."
                }
              },
              "required": [
                "id",
                "name",
                "type",
                "min",
                "max",
                "choices"
              ]
            }
          },
          "hostname": {
            "type": "object",
            "properties": {
              "accepted": {
                "type": "boolean"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "accepted",
              "description"
            ],
            "description": "Whether `hostname` means something for this product, and what."
          }
        },
        "required": [
          "object",
          "product",
          "name",
          "group",
          "family",
          "description",
          "currency",
          "prices",
          "options",
          "hostname"
        ]
      },
      "OrderableProductList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderableProduct"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "PaymentMethod": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "payment_method"
            ]
          },
          "id": {
            "type": "string",
            "description": "Pass it as `payment_method` when ordering.",
            "example": "truo"
          },
          "name": {
            "type": "string"
          },
          "default": {
            "type": "boolean",
            "description": "Used when `payment_method` is omitted."
          }
        },
        "required": [
          "object",
          "id",
          "name",
          "default"
        ]
      },
      "PaymentMethodList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethod"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "Order": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "order"
            ]
          },
          "id": {
            "type": "string",
            "example": "ord_245"
          },
          "number": {
            "type": "string",
            "description": "WHMCS's human order number."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "cancelled",
              "fraud"
            ],
            "description": "`pending` = waiting for payment; `active` = accepted (services are provisioning or live); `cancelled`/`fraud` = it will never provision."
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "promocode": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoice": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "example": "inv_147"
              },
              "status": {
                "type": "string",
                "enum": [
                  "unpaid",
                  "paid",
                  "cancelled",
                  "refunded",
                  "collections",
                  "draft",
                  "other"
                ]
              },
              "total": {
                "type": "number"
              },
              "currency": {
                "type": "string"
              },
              "payment_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Where a human can pay it. Only while `status` is `unpaid`."
              }
            },
            "required": [
              "id",
              "status",
              "total",
              "currency",
              "payment_url"
            ],
            "description": "`null` when the order generated no invoice (free)."
          },
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "svc_1241"
                },
                "product": {
                  "type": "string",
                  "example": "wp-10k"
                },
                "product_name": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "example": "active"
                },
                "hostname": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cycle": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "amount": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "product",
                "product_name",
                "status",
                "hostname",
                "cycle",
                "amount"
              ]
            }
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "number",
          "status",
          "amount",
          "currency",
          "promocode",
          "payment_method",
          "invoice",
          "services",
          "created_at"
        ]
      },
      "OrderList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CreateOrderRequest": {
        "type": "object",
        "properties": {
          "product": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "Slug from `GET /v1/orders/products`.",
            "example": "wp-25k"
          },
          "cycle": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "semiannually",
              "annually",
              "biennially",
              "triennially",
              "onetime",
              "free"
            ],
            "description": "`free` and `onetime` are not recurring. Check `prices` in the product for what is sold."
          },
          "hostname": {
            "type": "string",
            "minLength": 1,
            "maxLength": 253,
            "description": "For WordPress: the site name (becomes the subdomain). See `hostname` in the product.",
            "example": "mystore"
          },
          "promocode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Validated **before** the order is created: an invalid code is `invalid_promocode`, never an unexpected price.",
            "example": "HAZTAP2026"
          },
          "payment_method": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "From `GET /v1/orders/payment-methods`. Defaults to the account default."
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Configurable options: `{ \"<option id>\": <choice id | quantity | 1/0> }`. See `options` in the product.",
            "example": {
              "12": 45
            }
          }
        },
        "required": [
          "product",
          "cycle"
        ]
      },
      "OrderCancellation": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "order_cancellation"
            ]
          },
          "order": {
            "type": "string",
            "example": "ord_245"
          },
          "mode": {
            "type": "string",
            "enum": [
              "order_cancelled",
              "cancellation_requested"
            ],
            "description": "`order_cancelled`: it was still pending and is now void. `cancellation_requested`: WHMCS will terminate the services when `when` says so."
          },
          "when": {
            "type": "string",
            "enum": [
              "immediate",
              "end_of_cycle"
            ]
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "svc_1241"
            ]
          }
        },
        "required": [
          "object",
          "order",
          "mode",
          "when",
          "services"
        ]
      },
      "CancelOrderRequest": {
        "type": "object",
        "properties": {
          "when": {
            "type": "string",
            "enum": [
              "immediate",
              "end_of_cycle"
            ],
            "default": "end_of_cycle",
            "description": "`end_of_cycle` (default) keeps the service until the paid period ends. `immediate` asks for termination now. Nothing is destroyed by this call itself: WHMCS runs it on its schedule."
          },
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "webhook"
            ]
          },
          "id": {
            "type": "string",
            "example": "whk_12"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "operation.completed",
              "service.active"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "last_delivery_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_status": {
            "type": [
              "integer",
              "null"
            ],
            "description": "HTTP status of the last attempt, if any."
          },
          "consecutive_failures": {
            "type": "integer"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "url",
          "events",
          "description",
          "enabled",
          "last_delivery_at",
          "last_status",
          "consecutive_failures",
          "created_at",
          "updated_at"
        ]
      },
      "WebhookList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Webhook"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WebhookWithSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Webhook"
          },
          {
            "type": "object",
            "properties": {
              "secret": {
                "type": "string",
                "description": "Shown **only here**. Store it: it is what verifies `Truo-Signature`.",
                "example": "whsec_…"
              }
            },
            "required": [
              "secret"
            ]
          }
        ]
      },
      "CreateWebhookRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri",
            "description": "Must be `https` and reachable from the public internet (no private or loopback addresses).",
            "example": "https://example.com/hooks/truo"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "operation.completed",
                "service.active",
                "service.suspended",
                "service.terminated",
                "deploy.build.failed",
                "deploy.preview.ready",
                "deploy.preview.failed",
                "webhook.ping",
                "*"
              ],
              "description": "`operation.completed`: any operation ended (`succeeded` or `failed`), with the operation as `data`. `service.active` / `service.suspended` / `service.terminated`: lifecycle from billing, with a service summary. `deploy.build.failed`: a Truo Deploy build failed, whatever started it (API, a push to a connected repository or the panel), with a `deploy_build` summary; fetch its log with `GET /v1/caas/{id}/builds/{number}/log`. `deploy.preview.ready` / `deploy.preview.failed`: a preview of a branch answers at its `url` (or did not), once per build of the branch, with a `deploy_preview` summary (`GET /v1/caas/{id}/previews/{name}` for the rest). `webhook.ping`: sent by `POST /v1/webhooks/{id}/ping`. `*` subscribes to everything, including future types."
            },
            "minItems": 1,
            "example": [
              "operation.completed"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "url",
          "events"
        ]
      },
      "UpdateWebhookRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "operation.completed",
                "service.active",
                "service.suspended",
                "service.terminated",
                "deploy.build.failed",
                "deploy.preview.ready",
                "deploy.preview.failed",
                "webhook.ping",
                "*"
              ],
              "description": "`operation.completed`: any operation ended (`succeeded` or `failed`), with the operation as `data`. `service.active` / `service.suspended` / `service.terminated`: lifecycle from billing, with a service summary. `deploy.build.failed`: a Truo Deploy build failed, whatever started it (API, a push to a connected repository or the panel), with a `deploy_build` summary; fetch its log with `GET /v1/caas/{id}/builds/{number}/log`. `deploy.preview.ready` / `deploy.preview.failed`: a preview of a branch answers at its `url` (or did not), once per build of the branch, with a `deploy_preview` summary (`GET /v1/caas/{id}/previews/{name}` for the rest). `webhook.ping`: sent by `POST /v1/webhooks/{id}/ping`. `*` subscribes to everything, including future types."
            },
            "minItems": 1
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "enabled": {
            "type": "boolean",
            "description": "Re-enabling resets `consecutive_failures`."
          }
        }
      },
      "WebhookSecret": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "webhook_secret"
            ]
          },
          "webhook": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "webhook",
          "secret"
        ]
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "webhook_delivery"
            ]
          },
          "id": {
            "type": "string",
            "example": "dlv_01JQ8X…"
          },
          "webhook": {
            "type": "string",
            "example": "whk_12"
          },
          "event_id": {
            "type": "string",
            "example": "evt_01JQ8X…"
          },
          "event_type": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "delivered",
              "failed"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "next_attempt_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_attempt_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "payload": {
            "description": "The exact body that was signed and sent: `{ id, object: \"event\", type, created_at, data }`."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "webhook",
          "event_id",
          "event_type",
          "status",
          "attempts",
          "next_attempt_at",
          "last_status",
          "last_error",
          "last_attempt_at",
          "created_at",
          "delivered_at"
        ]
      },
      "WebhookDeliveryList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it as `cursor` for the next page. It is **opaque**: do not build it, do not parse it, and do not store it across versions."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/v1/meta/capabilities": {
      "get": {
        "operationId": "meta.capabilities",
        "summary": "What this API instance supports",
        "description": "Requires no authentication. Returns the available resources, the scope taxonomy, and the current limits, so a client never has to discover them by trial and error.",
        "tags": [
          "Meta"
        ],
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-mcp": {
          "toolset": "meta",
          "action": "capabilities",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The instance manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "operationId": "account.get",
        "summary": "Get the current account and credential",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "auth status"
        },
        "x-truo-mcp": {
          "toolset": "meta",
          "action": "whoami",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/api-keys": {
      "get": {
        "operationId": "apiKeys.list",
        "summary": "List the API keys in the account",
        "description": "Session only. Never returns tokens: only the prefix and last 4 characters.",
        "tags": [
          "API Keys"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "apikeys:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "auth token list"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The list of active keys.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "apiKeys.create",
        "summary": "Create an API key",
        "description": "Returns the plaintext token **exactly once**. Store it immediately: only its SHA-256 hash is kept and there is no way to recover it later.",
        "tags": [
          "API Keys"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "apikeys:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "auth token create"
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created key, with its token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreated"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/api-keys/{id}": {
      "get": {
        "operationId": "apiKeys.get",
        "summary": "Get an API key",
        "tags": [
          "API Keys"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "apikeys:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "key_42"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "apiKeys.update",
        "summary": "Update an API key",
        "description": "Scopes and the allowlist can only be **narrowed**. Widening returns 403: without that rule, a key with `vps:read` could promote itself to `vps:write` with a PATCH and scopes would stop meaning anything.",
        "tags": [
          "API Keys"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "apikeys:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "key_42"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/api-keys/{id}/revoke": {
      "post": {
        "operationId": "apiKeys.revoke",
        "summary": "Revoke an API key",
        "description": "Irreversible. Revocation propagates to all replicas over pub/sub in under a second; the worst case, with Redis down, is 60 seconds (the in-process cache TTL).",
        "tags": [
          "API Keys"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "apikeys:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "auth token revoke",
          "positional": [
            "key_id"
          ]
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "key_42"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The revoked key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/services": {
      "get": {
        "operationId": "services.list",
        "summary": "List the services in the account",
        "description": "Returns only the services this credential can see: the key's allowlist and the owning user's per-service permissions both apply. It is the entry point for obtaining the `service_id` values used by every other resource.",
        "tags": [
          "Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "services:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "services list"
        },
        "x-truo-mcp": {
          "toolset": "services",
          "action": "list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "vps",
                "dns",
                "dbaas",
                "caas",
                "lb",
                "objectstorage",
                "mailgateway",
                "images",
                "serverless",
                "wordpress",
                "other"
              ],
              "description": "The service's family. It determines which resource manages it. `other` is a real product in the account that has no dedicated resource in v1 yet."
            },
            "required": false,
            "name": "family",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The list of services.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/services/{id}": {
      "get": {
        "operationId": "services.get",
        "summary": "Get a service",
        "description": "A 404 here means both \"does not exist\" and \"exists but this credential cannot see it\". That is deliberate: a 403 would confirm the service's existence and turn the API into an enumeration oracle.",
        "tags": [
          "Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "services:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "services get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "services",
          "action": "get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The service.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations/{id}": {
      "get": {
        "operationId": "operations.get",
        "summary": "Get the status of an operation",
        "description": "Reads consult the real backend, with a 2 s cache. If the backend does not respond, the last known state is returned with `stale: true` and **never a 500**: a polling client must not lose its operation to a backend hiccup, nor be pushed into retrying the mutation.",
        "tags": [
          "Operations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "operations:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "operation get",
          "positional": [
            "operation_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "meta",
          "action": "operation_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "op_01JQ8XKM4N7P2R9TAB12CD34EF"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations": {
      "get": {
        "operationId": "operations.list",
        "summary": "List the account's recent operations",
        "tags": [
          "Operations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "operations:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "operation list"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Operations, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/audit-logs": {
      "get": {
        "operationId": "auditLogs.list",
        "summary": "List the account's API activity",
        "description": "Includes **denied** attempts (4xx), not just what succeeded: a credential probing endpoints it should not touch is exactly the signal you need to be able to see.",
        "tags": [
          "Audit"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "audit:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "audit list"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Filter by exact HTTP status."
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "`true` keeps only 4xx entries — the denied attempts."
            },
            "required": false,
            "name": "denied_only",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Audit entries, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps": {
      "get": {
        "operationId": "vps.list",
        "summary": "List VPS instances",
        "description": "Served from the database, without querying the hypervisor: `state`, `cpu`, `memory`, and `disk` come back `null`. Fetching them would cost one backend call per page item. For the live state of one instance, use `GET /v1/vps/{id}`.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "vps list"
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The account's VPS instances.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}": {
      "get": {
        "operationId": "vps.get",
        "summary": "Get a VPS with its live state",
        "description": "Queries the hypervisor. If it does not respond, the state fields come back `null` instead of failing: a hypervisor hiccup should not stop you from reading the rest of the resource or its `capabilities`.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "vps get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The VPS.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vps"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "vps.update",
        "summary": "Rename a VPS",
        "description": "Changes the operating system hostname. On LXC it takes effect immediately; on KVM it renames the VM and the operating system picks it up on the next reboot.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "vps rename",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "rename",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hostname": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "description": "A plain label or an FQDN. The backend validates the format."
                  }
                },
                "required": [
                  "hostname"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated VPS.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vps"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/power": {
      "post": {
        "operationId": "vps.power",
        "summary": "Start, stop, or reboot",
        "description": "Returns `202` as soon as the order is issued, not when the machine reaches the requested state. The operation resolves against the **VM's actual state**, so it survives the backend taking longer than the HTTP timeout — a `reboot` is stop, wait, and start, which does not fit in one request. Wait on it with `GET /v1/operations/{id}`.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:power",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "vps power",
          "positional": [
            "service_id",
            "action"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "power",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "start",
                      "stop",
                      "shutdown",
                      "reboot"
                    ],
                    "description": "`shutdown` asks the operating system for an orderly shutdown and falls back to a hard cut if it does not respond. `stop` cuts power immediately: it can corrupt the filesystem."
                  }
                },
                "required": [
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The operation in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/config": {
      "get": {
        "operationId": "vps.config.get",
        "summary": "Get the machine configuration",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "vps config",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "config",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsConfig"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/metrics": {
      "get": {
        "operationId": "vps.metrics.list",
        "summary": "Get CPU, memory, disk, and network usage series",
        "description": "The hypervisor's RRD series. Resolution is set by `timeframe` and is not configurable: `hour` yields minutes, `year` yields weeks. `cpu_percent` is a percentage of the allocated total.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "vps stats",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "metrics",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "hour",
                "day",
                "week",
                "month",
                "year"
              ],
              "description": "Window of the series. Defaults to `day`."
            },
            "required": false,
            "name": "timeframe",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The time series.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsMetrics"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/ips": {
      "get": {
        "operationId": "vps.ips.list",
        "summary": "List the IPs assigned to the VPS",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "vps ip list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "ips",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The IPs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsIpList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/templates": {
      "get": {
        "operationId": "vps.templates.list",
        "summary": "List the operating systems available for reinstall",
        "description": "Depends on the machine type and the node it lives on, so it is requested per VPS rather than globally.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "vps template list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "templates",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The templates.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsTemplateList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/console": {
      "post": {
        "operationId": "vps.console.create",
        "summary": "Open a console",
        "description": "Issues a single-use ticket. **It grants full access to the operating system**, bypassing the network and SSH, which is why it lives in its own scope (`vps:console`) instead of falling under `vps:write`. Do not log it: the SPICE `file` carries the password inside.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:console",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-cli": {
          "command": "vps console",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "console",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "vnc",
                      "spice"
                    ],
                    "default": "vnc"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The console ticket.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsoleTicket"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/backups": {
      "get": {
        "operationId": "vps.backups.list",
        "summary": "List the VPS backups",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "vps backup list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "backup_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Backups, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VpsBackupList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "vps.backups.create",
        "summary": "Create a backup",
        "description": "Queues a `vzdump`. With `mode: snapshot` (the default) the machine keeps running. The operation reflects that the task was queued, not that the archive is ready: the final size appears in `GET /v1/vps/{id}/backups` once the hypervisor finishes.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "vps backup create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "backup_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "compress": {
                    "type": "string",
                    "enum": [
                      "zstd",
                      "gzip",
                      "lzo",
                      "none"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "snapshot",
                      "suspend",
                      "stop"
                    ],
                    "description": "`snapshot` does not interrupt the service. `stop` powers off the VM during the backup."
                  },
                  "storage": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Backup queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/backups/{backup_id}/restore": {
      "post": {
        "operationId": "vps.backups.restore",
        "summary": "Restore a backup",
        "description": "**Destructive.** Powers off the machine and overwrites the entire disk: everything written after that backup is lost. The backend verifies the backup belongs to this VPS before touching anything.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "vps backup restore",
          "positional": [
            "service_id",
            "backup_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "backup_restore",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "local:backup/vzdump-qemu-101-2026_07_27-03_00_01.vma.zst"
            },
            "required": true,
            "name": "backup_id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Restore queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/backups/{backup_id}": {
      "delete": {
        "operationId": "vps.backups.delete",
        "summary": "Delete a backup",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "vps backup delete",
          "positional": [
            "service_id",
            "backup_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "backup_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "local:backup/vzdump-qemu-101-2026_07_27-03_00_01.vma.zst"
            },
            "required": true,
            "name": "backup_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Backup deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vps/{id}/reinstall": {
      "post": {
        "operationId": "vps.reinstall",
        "summary": "Reinstall the operating system",
        "description": "**Destructive and irreversible: it wipes the entire disk.** Queues a job that runs the same state machine as a fresh provision (provision → wait for boot → health check), so the operation reports real progress and can take several minutes. The IP is preserved.",
        "tags": [
          "VPS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "vps:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "vps reinstall",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "vps",
          "action": "reinstall",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template": {
                    "type": "string",
                    "minLength": 1,
                    "description": "An `id` from `GET /v1/vps/{id}/templates`."
                  },
                  "root_password": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128,
                    "description": "The new system's root password. Never stored or returned: if it is lost, the only way out is another reinstall."
                  }
                },
                "required": [
                  "template",
                  "root_password"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Reinstall queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dns/zones": {
      "get": {
        "operationId": "dns.zones.list",
        "summary": "List DNS zones",
        "description": "Served from the database, without querying the DNS backend: `record_count` and `serial` come back `null`. Fetching them would cost one call per zone, and some accounts have dozens.",
        "tags": [
          "DNS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dns:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dns zone list"
        },
        "x-truo-mcp": {
          "toolset": "dns",
          "action": "zone_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The account's zones.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DnsZoneList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dns/zones/{zone}": {
      "get": {
        "operationId": "dns.zones.get",
        "summary": "Get a zone",
        "tags": [
          "DNS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dns:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dns zone get",
          "positional": [
            "zone"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dns",
          "action": "zone_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "example.com"
            },
            "required": true,
            "name": "zone",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The zone.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DnsZone"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dns/zones/{zone}/export": {
      "get": {
        "operationId": "dns.zones.export",
        "summary": "Export the zone in BIND format",
        "description": "The zone file exactly as the backend emits it. Useful for backup or migration.",
        "tags": [
          "DNS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dns:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dns zone export",
          "positional": [
            "zone"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dns",
          "action": "zone_export",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "example.com"
            },
            "required": true,
            "name": "zone",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The zone in BIND format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DnsZoneExport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dns/zones/{zone}/records": {
      "get": {
        "operationId": "dns.records.list",
        "summary": "List a zone's records",
        "description": "Grouped into RRsets: an `A` record with two IPs is **one** record with two values. The response carries an `ETag`; pass it as `If-Match` when writing and no concurrent change gets lost.",
        "tags": [
          "DNS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dns:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dns record list",
          "positional": [
            "zone"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dns",
          "action": "record_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "example.com"
            },
            "required": true,
            "name": "zone",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The zone's records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DnsRecordList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "dns.records.patch",
        "summary": "Apply several changes at once",
        "description": "Each element replaces its RRset; `values: []` deletes it. It is how you apply a coherent change —moving a site and its mail together— without it landing halfway between two calls. **It is not atomic in the backend**: if one change fails, the earlier ones were already applied and the response says which one stopped.",
        "tags": [
          "DNS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dns:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dns record apply",
          "positional": [
            "zone"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dns",
          "action": "record_apply",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "example.com"
            },
            "required": true,
            "name": "zone",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ETag from `GET /v1/dns/zones/{zone}/records`. If the zone changed since then, it returns `412` and applies nothing. It is the only thing keeping two concurrent `apply` calls from clobbering each other: without it, the last writer wins, silently."
            },
            "required": false,
            "name": "if-match",
            "in": "header"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "records": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "A",
                            "AAAA",
                            "CNAME",
                            "MX",
                            "TXT",
                            "NS",
                            "SRV",
                            "CAA",
                            "PTR"
                          ],
                          "description": "The `SOA` and the delegation `NS` are managed by the platform and cannot be edited."
                        },
                        "ttl": {
                          "type": "integer",
                          "minimum": 60,
                          "maximum": 604800,
                          "description": "Seconds, 60–604800. Defaults to 3600."
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "An empty list = delete the RRset."
                        }
                      },
                      "required": [
                        "name",
                        "type",
                        "values"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "records"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The zone after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DnsRecordList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "The `If-Match` precondition failed. Someone else modified the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dns/zones/{zone}/records/{name}/{type}": {
      "get": {
        "operationId": "dns.records.get",
        "summary": "Get an RRset",
        "tags": [
          "DNS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dns:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dns record get",
          "positional": [
            "zone",
            "name",
            "type"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dns",
          "action": "record_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "example.com"
            },
            "required": true,
            "name": "zone",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Relative (`www`), `@` for the root, or the full FQDN.",
              "example": "www"
            },
            "required": true,
            "name": "name",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "A"
            },
            "required": true,
            "name": "type",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The RRset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DnsRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "dns.records.put",
        "summary": "Create or replace an RRset",
        "description": "Replaces the **entire** RRset: values missing from `values` are deleted. That is DNS semantics and the backend's — there is no \"add an IP\" without rewriting the set. Read the RRset, add the value to the list, and send the full list with the `ETag` in `If-Match`.",
        "tags": [
          "DNS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dns:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dns record set",
          "positional": [
            "zone",
            "name",
            "type"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dns",
          "action": "record_set",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "example.com"
            },
            "required": true,
            "name": "zone",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Relative (`www`), `@` for the root, or the full FQDN.",
              "example": "www"
            },
            "required": true,
            "name": "name",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "A"
            },
            "required": true,
            "name": "type",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ETag from `GET /v1/dns/zones/{zone}/records`. If the zone changed since then, it returns `412` and applies nothing. It is the only thing keeping two concurrent `apply` calls from clobbering each other: without it, the last writer wins, silently."
            },
            "required": false,
            "name": "if-match",
            "in": "header"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ttl": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 604800,
                    "description": "Seconds, 60–604800. Defaults to 3600."
                  },
                  "values": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1,
                    "description": "Replaces the **entire** RRset. Values not listed here are deleted: to add one, read the RRset, append it to the list, and send the full list."
                  }
                },
                "required": [
                  "values"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resulting RRset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DnsRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "The `If-Match` precondition failed. Someone else modified the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "dns.records.delete",
        "summary": "Delete an RRset",
        "description": "Deletes every value for that name and type.",
        "tags": [
          "DNS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dns:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dns record delete",
          "positional": [
            "zone",
            "name",
            "type"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dns",
          "action": "record_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "example.com"
            },
            "required": true,
            "name": "zone",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Relative (`www`), `@` for the root, or the full FQDN.",
              "example": "www"
            },
            "required": true,
            "name": "name",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "A"
            },
            "required": true,
            "name": "type",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ETag from `GET /v1/dns/zones/{zone}/records`. If the zone changed since then, it returns `412` and applies nothing. It is the only thing keeping two concurrent `apply` calls from clobbering each other: without it, the last writer wins, silently."
            },
            "required": false,
            "name": "if-match",
            "in": "header"
          }
        ],
        "responses": {
          "204": {
            "description": "RRset deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "The `If-Match` precondition failed. Someone else modified the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas": {
      "get": {
        "operationId": "dbaas.instances.list",
        "summary": "List managed databases",
        "description": "Served from the database, without querying the backend: `engine`, `state`, `host`, and `plan` come back `null`, and `capabilities` **omits** `databases` and `users` because knowing whether the engine has them would cost one call per page item. An absent key means \"not queried\", which is not the same as `false`. For the live state of one, use `GET /v1/dbaas/{id}`.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dbaas list"
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The account's databases.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}": {
      "get": {
        "operationId": "dbaas.instances.get",
        "summary": "Get a database with its live state",
        "description": "Queries the backend. If it does not respond, the state fields come back `null` and `capabilities` omits `databases`/`users` instead of failing: a backend hiccup should not stop you from reading the rest of the resource.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dbaas get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The database.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dbaas"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/connection": {
      "get": {
        "operationId": "dbaas.connection.get",
        "summary": "Get connection details, without the credential",
        "description": "Host, port, database, admin username, TLS mode, and the service's CA — which is **public** and used to verify the server. **It does not include the password or any URI containing it**: the credential comes from `POST /v1/dbaas/{id}/credentials`, which requires the `dbaas:credentials` scope.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dbaas connection",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "connection",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The connection details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasConnection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/credentials": {
      "post": {
        "operationId": "dbaas.credentials.create",
        "summary": "Reveal the admin credential",
        "description": "Returns the admin password **in plaintext**. It rotates nothing: this is the credential already in use.\n\nIt is a POST rather than a GET on purpose. A GET lands in browser history, in any proxy's logs, and in intermediate caches, and can be triggered accidentally from a link; a POST forces a deliberate action and enters the audit log as a mutation, so revealing a database's credential leaves a trace. For the same reason it lives in its own scope (`dbaas:credentials`): `dbaas:write` creates scoped databases and users, while this grants full access to the data and survives revoking the key.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:credentials",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dbaas credentials",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "credentials",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasCredential"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/stats": {
      "get": {
        "operationId": "dbaas.stats.get",
        "summary": "Get instance metrics",
        "description": "A snapshot, not a time series. Which fields are populated depends on the service's backend: some measure the container and others the engine.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dbaas stats",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "stats",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The metrics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasStats"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/logs": {
      "get": {
        "operationId": "dbaas.logs.get",
        "summary": "Get the engine log's last lines",
        "description": "The tail of the engine process's log, oldest to newest. It is not a query log or an audit log: these are the engine's startup messages, errors, and warnings.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dbaas logs",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "logs",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–2000. Defaults to 200.",
              "example": "200"
            },
            "required": false,
            "name": "lines",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The log lines.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasLogs"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/restart": {
      "post": {
        "operationId": "dbaas.instances.restart",
        "summary": "Restart the engine",
        "description": "Drops open connections: in-flight transactions are lost. Returns `202` with an already-completed operation —the restart is synchronous in both backends— so clients treat every long mutation the same way, and so the day it stops being synchronous, only the operation's `backend` column changes, not the contract.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dbaas restart",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "restart",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Restart completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/databases": {
      "get": {
        "operationId": "dbaas.databases.list",
        "summary": "List the service's databases",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dbaas database list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "database_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The service's databases.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasDatabaseList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "dbaas.databases.create",
        "summary": "Create a database",
        "description": "`charset` and `collation` are MySQL-only; `owner` is PostgreSQL-only. Other engines ignore them. The response carries no size or table count: the database is born empty and re-reading it would cost another call just to report a zero.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dbaas database create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "database_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9_][A-Za-z0-9_$-]*$",
                    "example": "appdb"
                  },
                  "charset": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "MySQL only. Defaults to `utf8mb4`.",
                    "example": "utf8mb4"
                  },
                  "collation": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "MySQL only. Defaults to `utf8mb4_unicode_ci`."
                  },
                  "owner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9_][A-Za-z0-9_$-]*$",
                    "description": "PostgreSQL only. The user that owns the database; defaults to the admin."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created database.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasDatabase"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/databases/{name}": {
      "delete": {
        "operationId": "dbaas.databases.delete",
        "summary": "Delete a database",
        "description": "**Destructive and irreversible**: the data is gone and there is no trash bin. All that remains is whatever is in `GET /v1/dbaas/{id}/backups`.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dbaas database delete",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "database_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "appdb"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Database deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/users": {
      "get": {
        "operationId": "dbaas.users.list",
        "summary": "List the engine's users",
        "description": "Includes the admin. On MySQL the same name can appear with several `host` values: the `user@host` pair is what identifies the user, and that is why it is the resource's `id`.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dbaas user list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "user_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The engine's users.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasUserList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "dbaas.users.create",
        "summary": "Create a user",
        "description": "The password is neither stored on our side nor returned later: if it is lost, change it with `POST /v1/dbaas/{id}/users/{username}/password`.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dbaas user create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "user_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9_][A-Za-z0-9_$-]*$",
                    "example": "app"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 12,
                    "maxLength": 128,
                    "description": "Never stored or returned: if it is lost, change it with `POST /v1/dbaas/{id}/users/{username}/password`."
                  },
                  "host": {
                    "type": "string",
                    "maxLength": 60,
                    "pattern": "^[A-Za-z0-9_.:%/-]+$",
                    "description": "MySQL only. Defaults to `%` (any origin).",
                    "example": "%"
                  },
                  "databases": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[A-Za-z0-9_][A-Za-z0-9_$-]*$"
                    },
                    "maxItems": 50,
                    "description": "Databases the user is granted permissions on."
                  },
                  "privileges": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_]{1,64}$"
                    },
                    "maxItems": 20,
                    "description": "MySQL: SQL privileges (`SELECT`, `INSERT`, …); defaults to `ALL` over `databases`. PostgreSQL: the first one is used as the role (`readwrite`, `readonly`). One word per element: compound privileges (`ALL PRIVILEGES`) are rejected because the value ends up inside a `GRANT` the engine builds by concatenation."
                  }
                },
                "required": [
                  "username",
                  "password"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasUser"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/users/{username}": {
      "delete": {
        "operationId": "dbaas.users.delete",
        "summary": "Delete a user",
        "description": "**Cuts off everything currently connected as that user.** It deletes no data: the databases the user created remain.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dbaas user delete",
          "positional": [
            "service_id",
            "username"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "user_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "app"
            },
            "required": true,
            "name": "username",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 60,
              "pattern": "^[A-Za-z0-9_.:%/-]+$",
              "description": "MySQL only, where the user is the `user@host` pair. Defaults to `%`. Other engines ignore it: the name is enough.",
              "example": "%"
            },
            "required": false,
            "name": "host",
            "in": "query"
          }
        ],
        "responses": {
          "204": {
            "description": "User deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/users/{username}/password": {
      "post": {
        "operationId": "dbaas.users.set_password",
        "summary": "Change a user's password",
        "description": "Takes effect immediately: applications still using the old one will fail on reconnect. It also works for the admin user.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dbaas user password",
          "positional": [
            "service_id",
            "username"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "user_set_password",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "app"
            },
            "required": true,
            "name": "username",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string",
                    "minLength": 12,
                    "maxLength": 128
                  }
                },
                "required": [
                  "password"
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Password changed."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/dbaas/{id}/backups": {
      "get": {
        "operationId": "dbaas.backups.list",
        "summary": "List the service's backups",
        "description": "Newest first. A service whose engine has no managed backups returns an empty list, not an error.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "dbaas backup list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "backup_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The backups.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbaasBackupList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "dbaas.backups.create",
        "summary": "Create a backup",
        "description": "Returns `202` as soon as the task starts, not when the archive is ready: a dump can take minutes, far beyond any HTTP timeout. The operation **resolves against the backup list** —a new one appears or it does not— rather than against the POST result, so it survives the call timing out while the backup is still running. Wait on it with `GET /v1/operations/{id}`.",
        "tags": [
          "DBaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "dbaas:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "dbaas backup create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "dbaas",
          "action": "backup_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Backup in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas": {
      "get": {
        "operationId": "caas.instances.list",
        "summary": "List CaaS services",
        "description": "Served from the database, without querying the control plane: `provisioning_state` and `machine` come back `null`. Fetching them would cost two calls per page item.\n\nA page can come back with fewer items than `limit` even when more exist: every control plane product shares the same provisioning module, so the family filter can only be applied after reading the page. `has_more` remains the correct signal for whether anything is left to fetch.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas list"
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The account's CaaS services.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}": {
      "get": {
        "operationId": "caas.instances.get",
        "summary": "Get a CaaS service with its live state",
        "description": "Queries the control plane. If it does not respond, `provisioning_state` and `machine` come back `null` instead of failing: a control plane hiccup should not stop you from reading the rest of the resource or its `capabilities`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The CaaS service.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Caas"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/apps": {
      "get": {
        "operationId": "caas.apps.list",
        "summary": "List the service's apps",
        "description": "`source` comes back `null`: the backend does not include it in the listing.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas app list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "app_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The service's apps.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasAppList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "caas.apps.create",
        "summary": "Create an app",
        "description": "Creates the app and configures its source, but **does not deploy it**: it stays `idle` until you call `POST /v1/caas/{id}/apps/{app_id}/deploy`. Separating the two is what lets you create the app, load its variables, and only then deploy — the reverse order would start the application without its configuration.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas app create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "app_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 63,
                    "description": "The app's display name. The backend derives an internal identifier from it.",
                    "example": "api"
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "git",
                          "docker_image"
                        ]
                      },
                      "ref": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512,
                        "description": "The repository URL for `git`, the image reference for `docker_image`.",
                        "example": "https://github.com/acme/api.git"
                      },
                      "branch": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "`git` only. Defaults to `main`."
                      }
                    },
                    "required": [
                      "type",
                      "ref"
                    ],
                    "description": "Can be omitted and configured later, but an app without a source cannot be deployed."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created app.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasApp"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/apps/{app_id}": {
      "get": {
        "operationId": "caas.apps.get",
        "summary": "Get an app",
        "description": "Returns **only** the declared fields. The backend responds with the deployment engine's full internal object —including plaintext environment variables—; none of that leaves through here. For variable names, use `GET /v1/caas/{id}/apps/{app_id}/env`.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas app get",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "app_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The app.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasApp"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "caas.apps.delete",
        "summary": "Delete an app",
        "description": "**Destructive.** Deletes the app, its variables, and its domains. The service's database data is untouched: it lives separately.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas app delete",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "app_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "App deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/apps/{app_id}/deploy": {
      "post": {
        "operationId": "caas.apps.deploy",
        "summary": "Deploy an app",
        "description": "Returns `202` as soon as the deployment starts. The operation resolves by looking up that deployment in the app's history, the only place the backend reports its outcome. Wait on it with `GET /v1/operations/{id}`; failure details are in `GET /v1/caas/{id}/apps/{app_id}/logs`.\n\nIt lives in its own scope (`caas:deploy`) because deploying executes whatever code is in the configured source — which is different from editing the app's configuration.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas deploy",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "deploy",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Deployment in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/apps/{app_id}/restart": {
      "post": {
        "operationId": "caas.apps.restart",
        "summary": "Restart an app",
        "description": "Restarts the process without rebuilding the image: it picks up the current environment variables but does **not** pull new code. That is what `deploy` is for.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas app restart",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "app_restart",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Restart ordered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/apps/{app_id}/deployments": {
      "get": {
        "operationId": "caas.deployments.list",
        "summary": "List an app's deployment history",
        "description": "Newest first, as the backend returns it.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas deployment list",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "deployment_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The deployments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasDeploymentList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/apps/{app_id}/logs": {
      "get": {
        "operationId": "caas.apps.logs",
        "summary": "Get an app's logs",
        "description": "**A snapshot, not a stream.** Returns whatever the backend has at call time, and there is no way to ask for \"what came after\": the backend accepts a cursor but never emits the next one, so this endpoint publishes none. To follow an application live, call again.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas logs",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "logs",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The app's logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasLogs"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/apps/{app_id}/env": {
      "get": {
        "operationId": "caas.env.list",
        "summary": "List environment variable names",
        "description": "**Returns names, never values.** There is no version of this endpoint that returns them: once written, a value is read only by the application. The backend masks by applying a regex to the key name, which lets anything not named like a secret (`DATABASE_URL`, `SENTRY_DSN`) through in plaintext; that is not a classification policy and it is not published.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas env list",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "env_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The variable names.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasEnvVarList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "caas.env.replace",
        "summary": "Replace the environment variables",
        "description": "**Replaces the entire set**: anything missing from `vars` is deleted. Not a limitation — it is the semantics of the backend, which writes the whole block at once.\n\nSince `GET /env` returns no values, the set has to come from your side — your secrets manager or your configuration repository. That is the natural shape for declarative infrastructure, and it also removes the panel's failure mode, where saving without rewriting the secrets erased them.\n\nChanges take effect on the next `deploy` or `restart`.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas env set",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "env_replace",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vars": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255,
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                          "example": "DATABASE_URL"
                        },
                        "value": {
                          "type": "string",
                          "maxLength": 8192,
                          "pattern": "^[^\\r\\n]*$",
                          "description": "Stored as-is. Never returned."
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    },
                    "maxItems": 500,
                    "description": "The **complete** set. Anything not listed here is deleted: sending `[]` leaves the app with no variables. Since `GET /env` returns no values, the whole set has to come from your side —your secrets manager or your configuration repository— which is how any declarative infrastructure works."
                  }
                },
                "required": [
                  "vars"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The names that remain.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasEnvVarList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/apps/{app_id}/domains": {
      "get": {
        "operationId": "caas.domains.list",
        "summary": "List an app's domains",
        "description": "**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas domain list",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "domain_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The domains.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasDomainList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "caas.domains.create",
        "summary": "Add a domain to an app",
        "description": "The host's DNS must point at the service's IP **before** you call: certificate issuance is validated over HTTP.\n\nTwo more things to know:\n\n- **It is not atomic.** Creation registers the domain and then rebuilds the ingress routing; if the second step fails, the call returns an error with the domain already created. Retrying is safe and is the right move — creation is idempotent per host.\n- **The certificate is issued afterwards**, asynchronously, with no state or id to query. That is why `certificate_type` comes back `null` here. The only real check is an HTTPS request to the host.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas domain add",
          "positional": [
            "service_id",
            "app_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "domain_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "host": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$",
                    "description": "It must resolve to the service's IP **before** you create it: the certificate is validated over HTTP, and without DNS pointed, issuance fails silently.",
                    "example": "app.example.com"
                  }
                },
                "required": [
                  "host"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Domain added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasDomain"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/apps/{app_id}/domains/{host}": {
      "delete": {
        "operationId": "caas.domains.delete",
        "summary": "Remove a domain from an app",
        "description": "Deleting a host that is not on the app is not an error: the ingress routing is rebuilt either way, which is what makes retrying safe.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas domain remove",
          "positional": [
            "service_id",
            "app_id",
            "host"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "domain_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The `id` of an element from `GET /v1/caas/{id}/apps`. Opaque.",
              "example": "app_9f2c1b7e"
            },
            "required": true,
            "name": "app_id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "app.example.com"
            },
            "required": true,
            "name": "host",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Domain removed."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/databases": {
      "get": {
        "operationId": "caas.databases.list",
        "summary": "List the service's databases",
        "description": "They belong to the service, not to an app: several apps in the same service can use the same database. **Credentials are not returned** by any endpoint of this API.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas database list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "database_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The databases.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasDatabaseList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "caas.databases.create",
        "summary": "Create a database",
        "description": "The platform generates the password and **it is not returned here or by any other `/v1` endpoint**: there is no way to recover it through this API. Connect from an app in the same service, where the connection string is already available.\n\nDeleting a database is not in this version: the backend does not implement it yet, and publishing an endpoint that always fails would be publishing roadmap.\n\n**Deprecated** on 2026-10-19; it stops working on 2027-10-19. See https://docs.truo.cloud/changelog/caas-discovery-apps.",
        "deprecated": true,
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas database create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "database_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "engine": {
                    "type": "string",
                    "enum": [
                      "postgres",
                      "mysql",
                      "mariadb",
                      "mongo",
                      "redis"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 63,
                    "example": "main"
                  }
                },
                "required": [
                  "engine",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created database.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasDatabase"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/stacks": {
      "get": {
        "operationId": "caas.stacks.list",
        "summary": "List an Enterprise service's stacks",
        "description": "What is declared, with what is running now. If the cluster does not answer, `services` comes back `null` and the rest is still accurate.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas stack list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "stack_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The stacks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasStackList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/stacks/{stack}": {
      "put": {
        "operationId": "caas.stacks.deploy",
        "summary": "Deploy a stack",
        "description": "Creates the stack or deploys a new version of it from a docker-compose file. Every deploy is a numbered version you can roll back to.\n\nThe compose is validated before anything runs; a rule it breaks comes back as `400 validation_failed` with the reason, and nothing is changed. If the cluster rejects the deploy, the operation fails with `deploy_failed` and the previous version keeps running. A service whose healthcheck fails during the update is rolled back by the cluster on its own (`update.state` = `rollback_completed`).\n\nRequires `caas:deploy`: deploying runs whatever the images contain.\n\nReturns `202` with an operation. Fast outcomes come back already finished; otherwise wait on `GET /v1/operations/{id}`. Only one change runs at a time per cluster: requests queue, and a request during a rolling restart fails with `409 operation_in_progress`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas stack deploy",
          "positional": [
            "service_id",
            "stack"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "stack_deploy",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,29}$",
              "example": "web"
            },
            "required": true,
            "name": "stack",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "compose": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32768,
                    "description": "The docker-compose file, as text. The rules, checked before anything runs:\n\n- Every service needs a `healthcheck`: it is what lets an update roll back on its own.\n- No bind mounts or local volumes. State goes to a database or to S3; a node can be replaced at any time.\n- Up to three replicas per service, at most one per node.\n- Secrets and configs are referenced by name and must exist first (`PUT /v1/caas/{id}/secrets/{name}`).\n- To publish a service, give it Traefik labels with a `Host()` rule on a domain of the cluster (`GET /v1/caas/{id}/domains`).\n\nThe platform adjusts some fields (placement, `start-first` updates) and lists what it changed in the operation `result.notes`."
                  }
                },
                "required": [
                  "compose"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Deploy accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "caas.stacks.get",
        "summary": "Get a stack",
        "description": "The version running now with its compose file, the version history, each service with its replicas, and the tasks that are not running with their error — the first place to look when a deploy does not come up.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas stack get",
          "positional": [
            "service_id",
            "stack"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "stack_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,29}$",
              "example": "web"
            },
            "required": true,
            "name": "stack",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The stack.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasStackDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "caas.stacks.delete",
        "summary": "Remove a stack",
        "description": "**Destructive.** Stops and removes every service of the stack. Its version history stays: deploying the same name again continues the numbering. Secrets, configs, and domains are not touched.\n\nReturns `202` with an operation. Fast outcomes come back already finished; otherwise wait on `GET /v1/operations/{id}`. Only one change runs at a time per cluster: requests queue, and a request during a rolling restart fails with `409 operation_in_progress`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas stack delete",
          "positional": [
            "service_id",
            "stack"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "stack_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,29}$",
              "example": "web"
            },
            "required": true,
            "name": "stack",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Removal accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/stacks/{stack}/versions/{version}": {
      "get": {
        "operationId": "caas.stack_versions.get",
        "summary": "Get a version of a stack",
        "description": "With the compose file exactly as it was sent. The last 20 versions of each stack are kept.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas stack version",
          "positional": [
            "service_id",
            "stack",
            "version"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "stack_version_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,29}$",
              "example": "web"
            },
            "required": true,
            "name": "stack",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 3
            },
            "required": true,
            "name": "version",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The version.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasStackVersionSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/stacks/{stack}/rollback": {
      "post": {
        "operationId": "caas.stacks.rollback",
        "summary": "Roll a stack back",
        "description": "Deploys the compose file of an earlier version as a **new** version (`origin: rollback`), so the history only grows and rolling back a rollback works the same way. Secrets and configs are the current ones, not the ones the old version had.\n\nReturns `202` with an operation. Fast outcomes come back already finished; otherwise wait on `GET /v1/operations/{id}`. Only one change runs at a time per cluster: requests queue, and a request during a rolling restart fails with `409 operation_in_progress`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas stack rollback",
          "positional": [
            "service_id",
            "stack"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "stack_rollback",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,29}$",
              "example": "web"
            },
            "required": true,
            "name": "stack",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "The version to go back to. Without it, the most recent deployed version whose content differs from the current one."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Rollback accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/stacks/{stack}/services/{service}/logs": {
      "get": {
        "operationId": "caas.stack_services.logs",
        "summary": "Get a stack service's logs",
        "description": "The latest lines from every replica, interleaved and timestamped. **A snapshot, not a stream**: to follow a service, call again with `since`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas stack logs",
          "positional": [
            "service_id",
            "stack",
            "service"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "stack_logs",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,29}$",
              "example": "web"
            },
            "required": true,
            "name": "stack",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_-]{0,39}$",
              "description": "The service name as written in the compose file (`web`), without the stack prefix.",
              "example": "web"
            },
            "required": true,
            "name": "service",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "description": "Lines per call, counting every replica. Defaults to 200."
            },
            "required": false,
            "name": "tail",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^(\\d{1,5}[smh]|\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d{1,9})?Z)$",
              "description": "Only lines after this point: `10m`, `2h`, or `2026-10-07T12:00:00Z`."
            },
            "required": false,
            "name": "since",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The log lines.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasStackLogs"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/stacks/{stack}/services/{service}/scale": {
      "post": {
        "operationId": "caas.stack_services.scale",
        "summary": "Change a stack service's replicas",
        "description": "Deploys the current version with the new replica count, as a new version (`origin: scale`): a later deploy of your compose file sets it back to what the file says.\n\nReturns `202` with an operation. Fast outcomes come back already finished; otherwise wait on `GET /v1/operations/{id}`. Only one change runs at a time per cluster: requests queue, and a request during a rolling restart fails with `409 operation_in_progress`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas stack scale",
          "positional": [
            "service_id",
            "stack",
            "service"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "stack_scale",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,29}$",
              "example": "web"
            },
            "required": true,
            "name": "stack",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_-]{0,39}$",
              "description": "The service name as written in the compose file (`web`), without the stack prefix.",
              "example": "web"
            },
            "required": true,
            "name": "service",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "replicas": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "description": "0 stops the service without removing it. At most 3: one per node."
                  }
                },
                "required": [
                  "replicas"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Change accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/stacks/{stack}/services/{service}/restart": {
      "post": {
        "operationId": "caas.stack_services.restart",
        "summary": "Restart a stack service",
        "description": "Replaces its replicas one at a time, the same way an update does: with two or more replicas the service keeps answering. Same image and configuration — to change either, deploy.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas stack restart",
          "positional": [
            "service_id",
            "stack",
            "service"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "stack_restart",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,29}$",
              "example": "web"
            },
            "required": true,
            "name": "stack",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_-]{0,39}$",
              "description": "The service name as written in the compose file (`web`), without the stack prefix.",
              "example": "web"
            },
            "required": true,
            "name": "service",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Restart done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/secrets": {
      "get": {
        "operationId": "caas.secrets.list",
        "summary": "List an Enterprise service's secrets",
        "description": "Names and when they were last written. **Never the value**, by any endpoint.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas secret list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "secret_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The secrets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasSecretList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/secrets/{name}": {
      "put": {
        "operationId": "caas.secrets.put",
        "summary": "Create or replace a secret",
        "description": "A secret is mounted as a file at `/run/secrets/<name>` in the services that list it under `secrets:`. Stored encrypted; the value is never returned.\n\nServices that already run keep the value they started with: `redeploy_needed` lists the stacks to deploy again for them to pick up the new one.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas secret set",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "secret_put",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9.-]{0,47}$",
              "example": "db-url"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "maxLength": 32768,
                    "description": "Text, up to 32 KB. Stored encrypted; never returned by any endpoint."
                  }
                },
                "required": [
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasObjectWrite"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "caas.secrets.delete",
        "summary": "Delete a secret",
        "description": "Refused with `400 validation_failed` while a deployed stack uses it: remove it from the compose and deploy first.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas secret delete",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "secret_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9.-]{0,47}$",
              "example": "db-url"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/configs": {
      "get": {
        "operationId": "caas.configs.list",
        "summary": "List an Enterprise service's configs",
        "description": "Names and when they were last written. **Never the value**, by any endpoint.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas config list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "config_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The configs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasConfigList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/configs/{name}": {
      "put": {
        "operationId": "caas.configs.put",
        "summary": "Create or replace a config",
        "description": "A config is mounted as a file wherever the services that list it under `configs:` say (`target:`). Stored encrypted; the value is never returned.\n\nServices that already run keep the value they started with: `redeploy_needed` lists the stacks to deploy again for them to pick up the new one.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas config set",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "config_put",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9.-]{0,47}$",
              "example": "db-url"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "maxLength": 32768,
                    "description": "Text, up to 32 KB. Stored encrypted; never returned by any endpoint."
                  }
                },
                "required": [
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasObjectWrite"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "caas.configs.delete",
        "summary": "Delete a config",
        "description": "Refused with `400 validation_failed` while a deployed stack uses it: remove it from the compose and deploy first.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas config delete",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "config_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9.-]{0,47}$",
              "example": "db-url"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/registries": {
      "get": {
        "operationId": "caas.registries.list",
        "summary": "List private registry credentials",
        "description": "Server and username. **Never the password or token**, by any endpoint.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas registry list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "registry_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The registries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasRegistryList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/registries/{server}": {
      "put": {
        "operationId": "caas.registries.put",
        "summary": "Store credentials for a private registry",
        "description": "Every deploy pulls with them, for any image on that server (`ghcr.io`, `registry.gitlab.com`, `docker.io`…). Use a read-only token.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas registry set",
          "positional": [
            "service_id",
            "server"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "registry_put",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9.-]{0,252})(:\\d{1,5})?$",
              "example": "ghcr.io"
            },
            "required": true,
            "name": "server",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9._@+-]{1,128}$"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096,
                    "description": "A password or, better, a read-only token. Stored encrypted; never returned."
                  }
                },
                "required": [
                  "username",
                  "password"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasObjectWrite"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "caas.registries.delete",
        "summary": "Delete private registry credentials",
        "description": "Services already running are not affected; the next deploy that pulls from that server fails.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas registry delete",
          "positional": [
            "service_id",
            "server"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "registry_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9.-]{0,252})(:\\d{1,5})?$",
              "example": "ghcr.io"
            },
            "required": true,
            "name": "server",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/domains": {
      "get": {
        "operationId": "caas.cluster_domains.list",
        "summary": "List an Enterprise cluster's domains",
        "description": "The cluster hostname first, then yours, each with whether its DNS points at the cluster right now and when its certificate expires. A stack serves a domain from this list by naming it in a `Host()` rule of its Traefik labels.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas cluster-domain list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "cluster_domain_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The domains.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasClusterDomainList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "caas.cluster_domains.create",
        "summary": "Add a domain to an Enterprise cluster",
        "description": "First create a CNAME from your domain to the cluster hostname (`cluster.name`). The request checks it and fails with `400 validation_failed` if the domain does not resolve to the cluster yet — nothing is changed. Then the three nodes start routing it and the certificate is issued; the operation finishes when TLS answers on all three.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas cluster-domain add",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "cluster_domain_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "host": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$",
                    "description": "It must already have a CNAME to the cluster hostname (`cluster.name` in `GET /v1/caas/{id}`); otherwise the request fails with `validation_failed` and nothing changes.",
                    "example": "app.example.com"
                  }
                },
                "required": [
                  "host"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Domain being set up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/domains/{host}": {
      "delete": {
        "operationId": "caas.cluster_domains.delete",
        "summary": "Remove a domain from an Enterprise cluster",
        "description": "Refused with `400 validation_failed` while a deployed stack routes it (remove it from the stack's labels and deploy first), and for the cluster hostname.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas cluster-domain remove",
          "positional": [
            "service_id",
            "host"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "cluster_domain_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "app.example.com"
            },
            "required": true,
            "name": "host",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Domain being removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/restart": {
      "post": {
        "operationId": "caas.cluster.restart",
        "summary": "Rolling restart of an Enterprise cluster",
        "description": "Restarts the three nodes one at a time. Each one leaves the cluster hostname first, its replicas move to the other two, and it rejoins once it serves TLS again. Services with two or more replicas keep answering; one with a single replica is cut while its node restarts. Takes several minutes.\n\nRefused with `412 precondition_failed` if a node is already unhealthy, and with `409 operation_in_progress` while another cluster operation runs. Deploys are refused until it finishes.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas cluster restart",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "cluster_restart",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Restart started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "The `If-Match` precondition failed. Someone else modified the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/recover": {
      "post": {
        "operationId": "caas.cluster.recover",
        "summary": "Recover a single-node service from its VM backup",
        "description": "Brings the node back from the latest daily backup of its VM: the machine, its private address, and the data in your stack volumes. Use it when the node is lost or its disk is damaged. Your apps are down while it runs (a few minutes), and anything written after that backup is lost. The operation `result` carries `backup_at` and `backup_age_seconds`. Stacks that changed after the backup are redeployed as currently declared.\n\nOnly for single-node services (`capabilities.recover`); on three nodes it responds `400 unsupported_for_product`. Refused with `412 precondition_failed` when there is no backup to restore, and with `409 operation_in_progress` while another cluster operation runs.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas cluster recover",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "cluster_recover",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Recovery started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "The `If-Match` precondition failed. Someone else modified the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/deploy-key": {
      "post": {
        "operationId": "caas.deploy_key.rotate",
        "summary": "Rotate the CI deploy key",
        "description": "Generates the key your CI uses to redeploy a stack after building an image, and returns it **once**. The previous key stops working immediately.\n\nThe key only redeploys stacks that already exist, with their current compose file (optionally swapping images): it cannot create stacks, read anything, or touch secrets. That is why it is separate from your API keys.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-cli": {
          "command": "caas deploy-key rotate",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "deploy_key_rotate",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The new key, shown once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasDeployKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/builds": {
      "get": {
        "operationId": "caas.builds.list",
        "summary": "List a Truo Deploy service's builds",
        "description": "Newest first. Builds from every origin: the API, reruns, and pushes to connected repositories.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas build list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "build_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "How many builds, newest first. Defaults to 20, at most 100."
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The builds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasBuildList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "caas.builds.start",
        "summary": "Build an image from a Git repository",
        "description": "From a public repository (`repo`), or from a connected one (`source`) — private repositories go through a source. Starting from a source while a build of it is already waiting returns that build (`coalesced: true`) instead of queuing another.\n\nThe build runs inside your own cluster: with the Dockerfile if the repository has one, otherwise with automatic detection (Railpack). It is capped at 30 minutes. One build runs at a time per cluster and up to 5 wait in the queue; a sixth is refused with `400 validation_failed`. The image is stored by digest in the cluster registry (`image`), so rolling a stack back brings back the same bytes.\n\nWith `deploy`, a successful build is deployed as a new version of that stack service; the stack must already be deployed with that service, or the request fails with `400 validation_failed` before anything is queued. A build that ends `succeeded` with an `error` built the image but could not deploy it.\n\nReturns `202` with the build; poll `GET /v1/caas/{id}/builds/{number}` (or its `/log`) until it finishes. It is not an operation.\n\nRequires `caas:deploy`: with `deploy`, the build ends up running.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas build start",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "build_start",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaasStartBuildRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Build queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasBuildStarted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/builds/{number}": {
      "get": {
        "operationId": "caas.builds.get",
        "summary": "Get a build",
        "description": "Its status, the commit it built, the resulting image by digest and, with `deploy`, the stack version it created.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas build get",
          "positional": [
            "service_id",
            "number"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "build_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "The build `number`.",
              "example": 12
            },
            "required": true,
            "name": "number",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The build.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasBuild"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/builds/{number}/log": {
      "get": {
        "operationId": "caas.builds.log",
        "summary": "Get a build's log",
        "description": "Read it incrementally: pass the `offset` of each response to the next call to get only what is new, and stop when `done` is `true`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas build log",
          "positional": [
            "service_id",
            "number"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "build_log",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "The build `number`.",
              "example": 12
            },
            "required": true,
            "name": "number",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "description": "Where to start reading. Pass the `offset` of the previous response to get only what is new."
            },
            "required": false,
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The log.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasBuildLog"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/builds/{number}/cancel": {
      "post": {
        "operationId": "caas.builds.cancel",
        "summary": "Cancel a build",
        "description": "A queued build never starts; a running one is stopped. Refused with `400 validation_failed` once the build has finished or is already deploying.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas build cancel",
          "positional": [
            "service_id",
            "number"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "build_cancel",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "The build `number`.",
              "example": 12
            },
            "required": true,
            "name": "number",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The build.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasBuild"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/builds/{number}/rerun": {
      "post": {
        "operationId": "caas.builds.rerun",
        "summary": "Run a build again",
        "description": "Queues a new build (a new `number`) with the same settings. A build of a source runs with what the source says now, and is `coalesced` like any build of a source.\n\nThe build runs inside your own cluster: with the Dockerfile if the repository has one, otherwise with automatic detection (Railpack). It is capped at 30 minutes. One build runs at a time per cluster and up to 5 wait in the queue; a sixth is refused with `400 validation_failed`. The image is stored by digest in the cluster registry (`image`), so rolling a stack back brings back the same bytes.\n\nWith `deploy`, a successful build is deployed as a new version of that stack service; the stack must already be deployed with that service, or the request fails with `400 validation_failed` before anything is queued. A build that ends `succeeded` with an `error` built the image but could not deploy it.\n\nReturns `202` with the build; poll `GET /v1/caas/{id}/builds/{number}` (or its `/log`) until it finishes. It is not an operation.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas build rerun",
          "positional": [
            "service_id",
            "number"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "build_rerun",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "The build `number`.",
              "example": 12
            },
            "required": true,
            "name": "number",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Build queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasBuildStarted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/sources": {
      "get": {
        "operationId": "caas.sources.list",
        "summary": "List connected repositories",
        "description": "The repositories this service builds from, with what each builds and where it deploys.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas source list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "source_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The sources.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasSourceList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "caas.sources.create",
        "summary": "Connect a repository",
        "description": "A source is a private repository this service builds from, by API or on every push.\n\n- **`github`**: the TruoCloud GitHub App must be installed on the repository and connected to this service (`POST /v1/caas/{id}/github/install`). Each build clones with a short-lived, read-only token.\n- **`git`**: any Git server over SSH. Add the returned `deploy_key` to the repository as a **read-only** deploy key, and point the server's push webhook at `webhook_url` with the `webhook_secret` (HMAC signature on GitHub, Gitea, Forgejo, and Bitbucket; secret token on GitLab). The `webhook_secret` is shown **only in this response**. The server's SSH host key is pinned on the first clone.\n\nWith `auto_deploy` on, a push to `branch` builds and, with `deploy`, deploys. A push while a build of the source is already queued does not queue another.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-cli": {
          "command": "caas source create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "source_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaasCreateSourceRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Connected. For `git`, the secret, shown once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasSourceWithSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/sources/{name}": {
      "get": {
        "operationId": "caas.sources.get",
        "summary": "Get a connected repository",
        "description": "Never the webhook secret: if it was lost, rotate it.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas source get",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "source_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
              "example": "web"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The source.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "caas.sources.update",
        "summary": "Change a connected repository",
        "description": "What it builds (`branch`, `path`, `dockerfile`, `image`), where it deploys, and `auto_deploy`. The repository and the provider cannot change: delete the source and connect it again. Applies from the next build.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas source update",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "source_update",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
              "example": "web"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaasUpdateSourceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The source.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasSource"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "caas.sources.delete",
        "summary": "Disconnect a repository",
        "description": "Its queued builds are canceled; finished builds and their images stay. A `git` source loses its deploy key for good: remove it from the repository too.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas source delete",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "source_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
              "example": "web"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Disconnected."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/sources/{name}/webhook-secret": {
      "post": {
        "operationId": "caas.sources.rotate_secret",
        "summary": "Rotate a repository's webhook secret",
        "description": "`git` sources only (GitHub sources receive pushes through the app). Returns the new secret **once**; the previous one stops working immediately, so update the webhook on the Git server.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-cli": {
          "command": "caas source rotate-secret",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "source_rotate_secret",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
              "example": "web"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The new secret, shown once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasSourceWithSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/sources/{name}/build": {
      "post": {
        "operationId": "caas.sources.build",
        "summary": "Build a connected repository now",
        "description": "The latest commit of its branch, with its settings. `ref` builds another branch or tag and `deploy` sends the image elsewhere (`null` = build only); a different `ref` without `deploy` builds only, so a branch never lands on the source stack unless you name it. If a build of this source for the same branch and target is already waiting, that one is returned (`coalesced: true`).\n\nThe build runs inside your own cluster: with the Dockerfile if the repository has one, otherwise with automatic detection (Railpack). It is capped at 30 minutes. One build runs at a time per cluster and up to 5 wait in the queue; a sixth is refused with `400 validation_failed`. The image is stored by digest in the cluster registry (`image`), so rolling a stack back brings back the same bytes.\n\nWith `deploy`, a successful build is deployed as a new version of that stack service; the stack must already be deployed with that service, or the request fails with `400 validation_failed` before anything is queued. A build that ends `succeeded` with an `error` built the image but could not deploy it.\n\nReturns `202` with the build; poll `GET /v1/caas/{id}/builds/{number}` (or its `/log`) until it finishes. It is not an operation.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas source build",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "source_build",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$",
              "example": "web"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaasSourceBuildRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Build queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasBuildStarted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/github": {
      "get": {
        "operationId": "caas.github.get",
        "summary": "GitHub connection of a service",
        "description": "Whether the TruoCloud GitHub App is available and which of its installations (GitHub users or organizations) are connected to this service. A `github` source needs an installation that covers its repository.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas github status",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "github_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The connection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasGithub"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/github/install": {
      "post": {
        "operationId": "caas.github.install_link",
        "summary": "Get a link to connect GitHub",
        "description": "A link, valid for one hour, to install (or reconfigure) the TruoCloud GitHub App and connect it to this service. Open it signed in to GitHub, choose the repositories, and authorize: only installations your GitHub user can see are connected.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas github install-link",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "github_install_link",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasGithubInstallLink"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/github/installations/{installation_id}": {
      "delete": {
        "operationId": "caas.github_installations.delete",
        "summary": "Disconnect a GitHub installation",
        "description": "Unbinds it from this service; the app stays installed on GitHub. Builds of `github` sources on that account fail until it is connected again.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas github disconnect",
          "positional": [
            "service_id",
            "installation_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "github_disconnect",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "An `installation_id` from `GET /v1/caas/{id}/github`.",
              "example": 51234567
            },
            "required": true,
            "name": "installation_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Disconnected."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/previews/enable": {
      "post": {
        "operationId": "caas.previews.enable",
        "summary": "Enable previews on a service",
        "description": "Once per service: publishes the wildcard `*.<cluster name>`, issues its certificate and routes it on every node, then checks TLS through each one. After that, opening a preview touches neither DNS nor certificates. Running it again only checks again.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas preview enable",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "preview_enable",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Being enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/previews": {
      "get": {
        "operationId": "caas.previews.list",
        "summary": "List the previews of a service",
        "description": "The open ones, whether previews are enabled, and how many may be open at once.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas preview list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "preview_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "`true` also returns the latest closed previews."
            },
            "required": false,
            "name": "closed",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The previews.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasPreviewList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "caas.previews.create",
        "summary": "Open a preview of a branch",
        "description": "Builds `ref` from the production `source` and, when it succeeds, runs it in its own stack `pv-<name>` with the compose file of the running `base_stack`: one replica per service, every route to `https://<name>.<cluster name>`, `TRUO_PREVIEW=<name>` in every service (so the app can turn off real emails or jobs with side effects) and new, empty volumes. With `database`, it also gets its own empty PostgreSQL database, mounted under the production secret name; the app runs its migrations on start.\n\nA push to `ref` rebuilds it and pushes its expiry back; after `ttl_hours` (24 by default) without one, it closes by itself. Up to 3 may be open per service. Requires previews enabled (`POST /v1/caas/{id}/previews/enable`).\n\nReturns `202` with the preview in `building`; poll `GET /v1/caas/{id}/previews/{name}`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas preview create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "preview_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaasOpenPreviewRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Preview opened.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/previews/{name}": {
      "get": {
        "operationId": "caas.previews.get",
        "summary": "Get a preview",
        "description": "An open preview, with its status, address, latest build and error.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas preview get",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "preview_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{0,24}[a-z0-9])?$",
              "example": "pr-12"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The preview.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "caas.previews.delete",
        "summary": "Close a preview",
        "description": "Removes what the preview created —its stack, its secret, its database— and nothing else. Answers `202` with the preview in `closing`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas preview close",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "preview_close",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{0,24}[a-z0-9])?$",
              "example": "pr-12"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Closing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/previews/{name}/build": {
      "post": {
        "operationId": "caas.previews.build",
        "summary": "Rebuild a preview",
        "description": "The same as a push to its branch: builds the latest commit, deploys it and pushes its expiry back.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas preview build",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "preview_build",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{0,24}[a-z0-9])?$",
              "example": "pr-12"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Build queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasPreviewBuild"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/addons/catalog": {
      "get": {
        "operationId": "caas.addons.catalog",
        "summary": "What databases and caches a service can create",
        "description": "The engines, where each can run on this service (`local`: inside its machine; `managed`: in a managed PostgreSQL service of the account) and the memory the plan leaves for `local` ones.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas addon catalog",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "addon_catalog",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasAddonCatalog"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/addons": {
      "get": {
        "operationId": "caas.addons.list",
        "summary": "List a service's databases and caches",
        "description": "Where each one answers and the `reference` to use it from a compose file. **Never the password.**",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas addon list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "addon_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The databases and caches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasAddonList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "caas.addons.create",
        "summary": "Create a database or cache",
        "description": "PostgreSQL, MySQL or a Valkey cache, ready to use from the stacks of the service.\n\n`local` runs the engine inside the service’s machine with its data on that disk, and counts against the plan’s memory. **Its only backup is the machine’s daily one**: no point-in-time restore. It exists on one-node services only. `managed` creates a database in a managed PostgreSQL service of the same account (`dbaas_service_id`), with that service’s backups.\n\nThe platform generates the password and no endpoint returns it. To use it, write the `reference` as the value of an environment variable in a compose file, or call `POST /v1/caas/{id}/addons/{name}/connect`.\n\nReturns `202` with an operation. Fast outcomes come back already finished; otherwise wait on `GET /v1/operations/{id}`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas addon create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "addon_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,19}$",
                    "example": "main-db"
                  },
                  "engine": {
                    "type": "string",
                    "enum": [
                      "postgresql",
                      "mysql",
                      "valkey"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "local",
                      "managed"
                    ],
                    "description": "Default `local`."
                  },
                  "memory_mb": {
                    "type": "integer",
                    "minimum": 64,
                    "maximum": 1048576,
                    "description": "`local` only. Default and minimum per engine: see the catalog."
                  },
                  "dbaas_service_id": {
                    "type": "string",
                    "pattern": "^(svc_)?\\d{1,10}$",
                    "description": "Required for `managed`.",
                    "example": "svc_1371"
                  }
                },
                "required": [
                  "name",
                  "engine"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Creation accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/addons/{name}": {
      "get": {
        "operationId": "caas.addons.get",
        "summary": "Get a database or cache",
        "description": "Adds the stacks that use it and, for a `local` one, when the machine was last backed up.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "caas addon get",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "addon_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,19}$",
              "example": "main-db"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The database or cache.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaasAddonDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "caas.addons.update",
        "summary": "Change the memory of a database or cache",
        "description": "`local` only: the memory of a `managed` one is set by the plan of its service. The engine restarts with the new cap. Refused with `400 validation_failed` if the plan does not have that much memory left.\n\nReturns `202` with an operation. Fast outcomes come back already finished; otherwise wait on `GET /v1/operations/{id}`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas addon resize",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "addon_resize",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,19}$",
              "example": "main-db"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "memory_mb": {
                    "type": "integer",
                    "minimum": 64,
                    "maximum": 1048576
                  }
                },
                "required": [
                  "memory_mb"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Change accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "caas.addons.delete",
        "summary": "Delete a database or cache",
        "description": "**Destructive: the data is deleted.** `confirm` must repeat the name. Refused with `400 validation_failed` while a stack references it: remove the variable from that compose and deploy first.\n\nFor a `local` one, the only copy left is the machine’s last daily backup (`result.last_machine_backup_at`), for as long as it is retained.\n\nReturns `202` with an operation. Fast outcomes come back already finished; otherwise wait on `GET /v1/operations/{id}`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas addon delete",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "addon_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,19}$",
              "example": "main-db"
            },
            "required": true,
            "name": "name",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The name of the database or cache, written again.",
              "example": "main-db"
            },
            "required": true,
            "name": "confirm",
            "in": "query"
          }
        ],
        "responses": {
          "202": {
            "description": "Deletion accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/addons/{name}/connect": {
      "post": {
        "operationId": "caas.addons.connect",
        "summary": "Connect a database or cache to a stack service",
        "description": "Sets an environment variable of that service to the `reference` and deploys the stack: a new version of it, nothing else of its compose changes. The stored compose keeps the reference, not the value.\n\nRequires `caas:deploy`.\n\nReturns `202` with an operation. Fast outcomes come back already finished; otherwise wait on `GET /v1/operations/{id}`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:deploy",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas addon connect",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "addon_connect",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,19}$",
              "example": "main-db"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stack": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,29}$",
                    "example": "web"
                  },
                  "service": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_-]{0,39}$",
                    "example": "app"
                  },
                  "variable": {
                    "type": "string",
                    "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                    "description": "Default: the engine’s `default_variable`."
                  },
                  "key": {
                    "type": "string",
                    "enum": [
                      "URL",
                      "HOST",
                      "PORT",
                      "USER",
                      "PASSWORD",
                      "DATABASE"
                    ],
                    "description": "Default `URL`."
                  }
                },
                "required": [
                  "stack",
                  "service"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Deploy accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/caas/{id}/addons/{name}/rotate": {
      "post": {
        "operationId": "caas.addons.rotate",
        "summary": "Change the password of a database or cache",
        "description": "Generates a new password and deploys again the stacks that use it, so they receive it. `result.failed` lists the stacks that could not be redeployed: they keep the old password and stop connecting until they are deployed again.\n\nReturns `202` with an operation. Fast outcomes come back already finished; otherwise wait on `GET /v1/operations/{id}`.",
        "tags": [
          "CaaS"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "caas:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "caas addon rotate",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "caas",
          "action": "addon_rotate",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,19}$",
              "example": "main-db"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Rotation accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/load-balancers": {
      "get": {
        "operationId": "lb.instances.list",
        "summary": "List load balancers",
        "description": "Served from the database, without querying the control plane: `provisioning_state`, `healthy`, and `listener_count` come back `null`. Fetching them would cost one call per page item.\n\nA page can come back with fewer items than `limit` even when more exist: every control plane product shares the same provisioning module, so the family filter can only be applied after reading the page. `has_more` remains the correct signal for whether anything is left to fetch.",
        "tags": [
          "Load Balancer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "lb:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "lb list"
        },
        "x-truo-mcp": {
          "toolset": "lb",
          "action": "list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The account's load balancers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoadBalancerList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/load-balancers/{id}": {
      "get": {
        "operationId": "lb.instances.get",
        "summary": "Get a load balancer with its live state",
        "description": "Queries the control plane, which in turn probes the balancer. If it does not respond, the state fields come back `null` instead of failing.",
        "tags": [
          "Load Balancer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "lb:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "lb get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "lb",
          "action": "get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The load balancer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoadBalancer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/load-balancers/{id}/listeners": {
      "get": {
        "operationId": "lb.listeners.list",
        "summary": "List the listeners",
        "description": "The balancer's full configuration, including each listener's backends. It is what you read, modify, and send back in `PUT`.",
        "tags": [
          "Load Balancer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "lb:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "lb listener list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "lb",
          "action": "listener_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The service's listeners.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LbListenerList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "lb.listeners.replace",
        "summary": "Replace the listener configuration",
        "description": "**Replaces the entire set**: listeners missing from `listeners` are deleted, along with their backends. Sending `[]` leaves the balancer with nothing listening and cuts traffic. Read `GET /listeners`, modify, and send everything back.\n\n**The change is applied within the call**: by the time this returns, the new configuration is already serving traffic. If the resulting configuration is invalid, nothing is applied and the response is `400 validation_failed` — the service is never left half-configured.",
        "tags": [
          "Load Balancer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "lb:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "lb listener apply",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "lb",
          "action": "listener_replace",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listeners": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "pattern": "^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$",
                          "description": "Identifies the listener within the service. Unique.",
                          "example": "web"
                        },
                        "protocol": {
                          "type": "string",
                          "enum": [
                            "http",
                            "tcp"
                          ],
                          "description": "`tcp` balances at the connection level and works for any protocol. `http` understands the request and is what enables routing by domain."
                        },
                        "port": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 65535,
                          "description": "The entry port. Unique within the service."
                        },
                        "tls": {
                          "type": "string",
                          "enum": [
                            "none",
                            "passthrough",
                            "terminate"
                          ],
                          "description": "Defaults to `none`."
                        },
                        "domain": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 253
                        },
                        "algorithm": {
                          "type": "string",
                          "enum": [
                            "roundrobin",
                            "leastconn",
                            "source"
                          ],
                          "description": "Defaults to `roundrobin`."
                        },
                        "health_check": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "tcp",
                                "http",
                                "https"
                              ],
                              "description": "Defaults to `tcp`."
                            },
                            "path": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255,
                              "description": "Required when `http` or `https`."
                            },
                            "interval_ms": {
                              "type": "integer",
                              "minimum": 200,
                              "maximum": 60000,
                              "description": "How often each backend is probed. Defaults to 2000."
                            },
                            "expect_status": {
                              "type": "integer",
                              "minimum": 100,
                              "maximum": 599,
                              "description": "HTTP status the probe must get (`http`/`https`). Default: any 2xx/3xx."
                            },
                            "expect_body": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128,
                              "description": "Text that must appear in the body (`http`/`https`). ASCII, one line."
                            },
                            "healthy_threshold": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 10,
                              "description": "Consecutive passing probes before a backend is back in rotation. Defaults to 2."
                            },
                            "unhealthy_threshold": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 10,
                              "description": "Consecutive failing probes before a backend leaves rotation. Defaults to 3."
                            }
                          }
                        },
                        "proxy_protocol": {
                          "type": "boolean",
                          "description": "Send the PROXY protocol v2 header to the backends (they see the real client IP). Defaults to `false`. The backends must expect it, or every connection fails."
                        },
                        "allowed_sources": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          },
                          "maxItems": 64,
                          "description": "CIDR ranges allowed to connect (e.g. the ranges of your CDN). Omitted = any source."
                        },
                        "forwarded_headers": {
                          "type": "boolean",
                          "description": "HTTP mode only: add `X-Forwarded-For`, `X-Forwarded-Proto` and `X-Forwarded-Port` to each request. Defaults to `true`."
                        },
                        "redirect_http": {
                          "type": "boolean",
                          "description": "Answer plain HTTP on port 80 with a 301 to this listener. Requires `tls` `terminate` or `passthrough` and a port other than 80; only one listener per balancer, and no listener may use port 80. It does not count against the listener limit of your plan. Defaults to `false`."
                        },
                        "sticky_sessions": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "cookie"
                              ]
                            },
                            "cookie_name": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,32}$",
                              "description": "Defaults to `TRUOLB`."
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "description": "Pin each visitor to one backend with a cookie the balancer sets. HTTP mode only (`protocol: http`, `tls` other than `passthrough`). For affinity by origin IP use `algorithm: source`."
                        },
                        "backends": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ip": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 253,
                                "description": "IP or hostname."
                              },
                              "port": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 65535
                              },
                              "weight": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 256
                              }
                            },
                            "required": [
                              "ip",
                              "port"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 64,
                          "description": "A listener without backends is not representable: at least one."
                        }
                      },
                      "required": [
                        "name",
                        "protocol",
                        "port",
                        "backends"
                      ]
                    },
                    "maxItems": 32,
                    "description": "The **complete** set. Anything not listed here is deleted, including its backends; sending `[]` leaves the balancer with nothing listening. Names and ports are unique within the set."
                  }
                },
                "required": [
                  "listeners"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The configuration that was applied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LbListenerList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/load-balancers/{id}/backends": {
      "get": {
        "operationId": "lb.backends.list",
        "summary": "List the backends",
        "description": "The backends of every listener, flattened, each with the listener it belongs to. It is a view over the same configuration that `GET /listeners` returns.",
        "tags": [
          "Load Balancer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "lb:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "lb backend list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "lb",
          "action": "backend_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The service's backends.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LbBackendList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "lb.backends.create",
        "summary": "Add a backend to a listener",
        "description": "A shortcut over `PUT /listeners` for the common case of adding a machine. It revalidates and applies the full configuration, so it inherits the same guarantee: either the backend ends up receiving traffic, or nothing changed.",
        "tags": [
          "Load Balancer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "lb:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "lb backend add",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "lb",
          "action": "backend_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listener": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The name of an existing listener."
                  },
                  "ip": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "weight": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 256
                  }
                },
                "required": [
                  "listener",
                  "ip",
                  "port"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The added backend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LbBackend"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/load-balancers/{id}/backends/{listener}/{ip}/{port}": {
      "delete": {
        "operationId": "lb.backends.delete",
        "summary": "Remove a backend from a listener",
        "description": "The three values identifying the backend go in the path. The upstream expects them in the body of a `DELETE`, which proxies and CDNs discard and several HTTP clients refuse to send; the body is built on this side.\n\n**A listener cannot be left without backends.** Removing the last one returns `400 validation_failed`: to remove the whole listener, use `PUT /listeners` without it.",
        "tags": [
          "Load Balancer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "lb:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "lb backend remove",
          "positional": [
            "service_id",
            "listener",
            "ip",
            "port"
          ]
        },
        "x-truo-mcp": {
          "toolset": "lb",
          "action": "backend_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "web"
            },
            "required": true,
            "name": "listener",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "10.0.0.5"
            },
            "required": true,
            "name": "ip",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "8080"
            },
            "required": true,
            "name": "port",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Backend removed."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/load-balancers/{id}/stats": {
      "get": {
        "operationId": "lb.stats.get",
        "summary": "Get per-listener state and traffic",
        "description": "A point-in-time snapshot: current connections and bytes accumulated since the balancer's last start, plus each backend's health from the latest probe. For the series over time, use `GET /v1/load-balancers/{id}/stats/history`.\n\nIf the balancer does not answer the probe, the listeners still appear —they come from the stored configuration— with `state: unknown` and zeroed counters. A listener that exists but does not respond and one that exists with no traffic cannot be told apart by the counters: check `state`.",
        "tags": [
          "Load Balancer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "lb:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "lb stats",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "lb",
          "action": "stats",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Per-listener statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LbStats"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/load-balancers/{id}/stats/history": {
      "get": {
        "operationId": "lb.stats.history",
        "summary": "Get the traffic history",
        "description": "Fixed-size buckets for the requested window: new connections per second, bytes in and out per second, average and peak concurrent connections, and the lowest number of healthy backends. `total` adds every listener; `listeners` has the same series per listener.\n\nThe balancer is sampled once a minute and samples are kept 14 days. Every bucket of the window is returned; a bucket with no samples (before the service existed, or while it was unreachable) has `null` fields, which is a gap and not a zero. Rates come from cumulative counters, so a configuration change does not produce a spike or a negative value.",
        "tags": [
          "Load Balancer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "lb:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "lb history",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "lb",
          "action": "stats_history",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "1h",
                "6h",
                "24h",
                "7d",
                "14d"
              ],
              "description": "Defaults to `24h`."
            },
            "required": false,
            "name": "range",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Traffic history.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LbStatsHistory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage": {
      "get": {
        "operationId": "objectstorage.tenant.get",
        "summary": "Get the account's Object Storage",
        "description": "Usage, endpoint, and status. It is a per-account singleton: there is no listing and no id to pass. Storage and object counts come from the latest daily snapshot, not a live scan, so a freshly uploaded object can take a while to show up in the totals.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "object-storage get"
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "get",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The Object Storage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectStorage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/buckets": {
      "get": {
        "operationId": "objectstorage.buckets.list",
        "summary": "List buckets",
        "description": "Includes buckets created directly through the S3 protocol, which have no registry row: they are listed anyway —hiding them would hide data that exists— with `created_at` set to `null` and private access.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "object-storage bucket list"
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "bucket_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The tenant's buckets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucketList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "objectstorage.buckets.create",
        "summary": "Create a bucket",
        "description": "Returns the same resource as `GET /v1/object-storage/buckets/{bucket}`. The backend's create call responds with the raw registry row —a different shape, with a different date format— so it is re-read before responding: it costs one call and buys create and read returning the same object.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "object-storage bucket create",
          "positional": [
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "bucket_create",
          "readonly": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$",
                    "example": "backups"
                  },
                  "access": {
                    "type": "string",
                    "enum": [
                      "private",
                      "public"
                    ],
                    "description": "Defaults to `private`."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created bucket.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucket"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/buckets/{bucket}": {
      "get": {
        "operationId": "objectstorage.buckets.get",
        "summary": "Get a bucket",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "object-storage bucket get",
          "positional": [
            "bucket"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "bucket_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "backups"
            },
            "required": true,
            "name": "bucket",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The bucket.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucket"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "objectstorage.buckets.update",
        "summary": "Change a bucket's visibility or edge cache",
        "description": "Making the bucket public mints an anonymous read URL (`public_url`) and keeps it if the bucket later goes private: republishing returns the same URL, not a new one. `cdn` and `cache_policy` control how `public_url` is cached at the edge: an object's own `Cache-Control` wins, then `cache_policy`, then the service default.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "object-storage bucket update",
          "positional": [
            "bucket"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "bucket_update",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "backups"
            },
            "required": true,
            "name": "bucket",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "access": {
                    "type": "string",
                    "enum": [
                      "private",
                      "public"
                    ],
                    "description": "`public` publishes the bucket at a read-only URL (`public_url`). `private` withdraws it: objects remain accessible with a key or a presigned URL."
                  },
                  "cdn": {
                    "type": "boolean",
                    "description": "Cache what `public_url` serves at the edge."
                  },
                  "cache_policy": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/StorageBucketCachePolicy"
                      },
                      {
                        "type": [
                          "object",
                          "null"
                        ],
                        "description": "Replaces the whole cache policy: omitted fields go back to their default. `null` resets it. On a public bucket, saving it purges what the edge had cached under the old policy."
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated bucket.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucket"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "objectstorage.buckets.delete",
        "summary": "Delete a bucket",
        "description": "A bucket with objects is not deleted: the request fails and touches nothing. `?purge=true` deletes it along with all its contents, and that **cannot be undone** — there is no trash bin and no versioning. To know how many objects will be lost, empty it first with `POST .../empty`, which returns the count.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "object-storage bucket delete",
          "positional": [
            "bucket"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "bucket_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "backups"
            },
            "required": true,
            "name": "bucket",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "Deletes the bucket **with everything inside it**. Without it, a bucket with objects is not deleted and the request fails."
            },
            "required": false,
            "name": "purge",
            "in": "query"
          }
        ],
        "responses": {
          "204": {
            "description": "Bucket deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/buckets/{bucket}/purge": {
      "post": {
        "operationId": "objectstorage.buckets.purge",
        "summary": "Purge a bucket's edge cache",
        "description": "Removes cached copies from every edge location, so the next request to `public_url` reads the current object. Overwrites and deletes already do this on their own when `cache_policy.purge_on_write` is on; use this after changing objects outside the API or to force it. Send `keys` for specific objects or `prefix` for a folder; send neither to purge the whole bucket. Only public buckets are cached at the edge.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "object-storage bucket purge",
          "positional": [
            "bucket"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "bucket_purge",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "backups"
            },
            "required": true,
            "name": "bucket",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "keys": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    },
                    "minItems": 1,
                    "maxItems": 500,
                    "description": "Object keys, relative to the bucket. Up to 500.",
                    "example": [
                      "releases/latest.json"
                    ]
                  },
                  "prefix": {
                    "type": "string",
                    "maxLength": 1024,
                    "description": "Everything under this prefix. Empty or omitted (without `keys`) = the whole bucket.",
                    "example": "releases/"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "How many keys or prefixes the purge accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageCachePurge"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/buckets/{bucket}/empty": {
      "post": {
        "operationId": "objectstorage.buckets.empty",
        "summary": "Empty a bucket",
        "description": "Deletes every object and keeps the bucket with its configuration. **It cannot be undone.** On a large bucket it can take a while: deletion runs object by object against the storage.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "object-storage bucket empty",
          "positional": [
            "bucket"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "bucket_empty",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "backups"
            },
            "required": true,
            "name": "bucket",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "How many objects were deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageDeletion"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/buckets/{bucket}/metrics": {
      "get": {
        "operationId": "objectstorage.buckets.metrics",
        "summary": "Get a bucket's metrics",
        "description": "Storage, egress, and requests for the requested range. The series carry one point per UTC day and come back empty until there is data, rather than being padded with zeros that would be indistinguishable from a day without traffic.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "object-storage bucket metrics",
          "positional": [
            "bucket"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "bucket_metrics",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "backups"
            },
            "required": true,
            "name": "bucket",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "90d"
              ],
              "description": "Window of the series. Defaults to `30d`."
            },
            "required": false,
            "name": "range",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The bucket's metrics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageBucketMetrics"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/buckets/{bucket}/objects": {
      "get": {
        "operationId": "objectstorage.objects.list",
        "summary": "List a bucket's objects",
        "description": "One level at a time, like a file explorer: entries with `is_folder: true` are prefixes, navigated by passing their `key` as `prefix`. It does not accept `limit`: the backend sets the page size (up to 1000 entries) and trimming here would silently drop objects as the cursor advances.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "object-storage object list",
          "positional": [
            "bucket"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "object_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "backups"
            },
            "required": true,
            "name": "bucket",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "A prefix within the bucket. End it with `/` to list a folder.",
              "example": "photos/"
            },
            "required": false,
            "name": "prefix",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the bucket.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageObjectList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/buckets/{bucket}/objects/delete": {
      "post": {
        "operationId": "objectstorage.objects.delete",
        "summary": "Delete objects",
        "description": "Batch delete by key. It is a `POST` rather than a `DELETE` because the key list goes in the body: not every HTTP client sends a `DELETE` with a body. **It cannot be undone.** `deleted` can be lower than the number of keys requested: keys that did not exist do not count.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "object-storage object delete",
          "positional": [
            "bucket"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "object_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "backups"
            },
            "required": true,
            "name": "bucket",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "keys": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1,
                    "maxItems": 1000,
                    "description": "Keys relative to the bucket. A key that does not exist is not an error: it is not counted.",
                    "example": [
                      "photos/logo.png"
                    ]
                  }
                },
                "required": [
                  "keys"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "How many objects were deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageDeletion"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/buckets/{bucket}/presign": {
      "post": {
        "operationId": "objectstorage.objects.presign",
        "summary": "Presign a temporary URL",
        "description": "Returns a link that works without credentials until it expires. `method: \"GET\"` to download (requires `objectstorage:read`), `method: \"PUT\"` to upload (requires `objectstorage:write`). The URL is a bearer credential: it works for anyone who holds it, and the only way to cut it off before it expires is to revoke the S3 key that signed it. Request the shortest TTL that works for you. It also inherits the scope of that key: if the key is limited to one bucket or is read-only, the URL can do no more than the key can.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-cli": {
          "command": "object-storage object presign",
          "positional": [
            "bucket",
            "key"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "object_presign",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "backups"
            },
            "required": true,
            "name": "bucket",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The key, relative to the bucket.",
                    "example": "photos/logo.png"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "PUT"
                    ],
                    "description": "What the URL enables: `GET` downloads, `PUT` uploads. Defaults to `GET`. Signing a `PUT` requires `objectstorage:write`."
                  },
                  "expires_in": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 604800,
                    "description": "Validity in seconds, 1–604800 (7 days). Defaults to 900."
                  }
                },
                "required": [
                  "key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The presigned URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoragePresignedUrl"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/keys": {
      "get": {
        "operationId": "objectstorage.keys.list",
        "summary": "List access keys",
        "description": "Active keys only, and never the secret.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "object-storage key list"
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "key_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The tenant's active keys.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageAccessKeyList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "objectstorage.keys.create",
        "summary": "Issue an access key",
        "description": "The **only** endpoint that returns `secret_access_key`, and it returns it exactly once: it is not stored in plaintext on our side and there is no way to recover it later. If it is lost, the way out is to delete the key and issue another. Keys coexist: issuing one does not revoke the previous ones. Limit each one to a bucket with `scope` so that losing one does not compromise the rest.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "object-storage key create",
          "positional": [
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "key_create",
          "readonly": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "To recognize it later. It has no effect on permissions.",
                    "example": "production-backups"
                  },
                  "scope": {
                    "type": "string",
                    "description": "A bucket name to limit the key to, or `*` (the default) for all. One key per bucket is what keeps losing one from compromising the rest.",
                    "example": "backups"
                  },
                  "permission": {
                    "type": "string",
                    "enum": [
                      "read",
                      "readwrite",
                      "full"
                    ],
                    "description": "Defaults to `readwrite`."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The key, with its secret. This is the only time it appears.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageAccessKeyWithSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/object-storage/keys/{key_id}": {
      "delete": {
        "operationId": "objectstorage.keys.delete",
        "summary": "Revoke an access key",
        "description": "Revocation is immediate. Revoking a key **also invalidates the presigned URLs signed with it**, even if they have not expired: the signature is validated against the key, and a revoked key no longer exists. It is the only way to cut off a presigned URL early.",
        "tags": [
          "Object Storage"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "objectstorage:keys",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "object-storage key delete",
          "positional": [
            "key_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "objectstorage",
          "action": "key_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "AKIA7QF2K3M9XZ4NPRTV"
            },
            "required": true,
            "name": "key_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Key revoked."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway": {
      "get": {
        "operationId": "mailgateway.tenant.get",
        "summary": "Get the account's Mail Gateway",
        "description": "It takes no id: there is one Mail Gateway per account. Returns the status, the month's usage, and how many domains and keys exist; each has its own detail endpoint. If the account does not have the service, it returns 404.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "mail-gateway get"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "get",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The Mail Gateway.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGateway"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/usage": {
      "get": {
        "operationId": "mailgateway.usage.get",
        "summary": "Get the current month's usage",
        "description": "Accepted and rejected sends for the current UTC calendar month. This is the number that gets billed. Rejected sends are not charged: they are the ones the gateway stopped before SES.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "mail-gateway usage"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "usage",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The month's usage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewayUsage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/metrics": {
      "get": {
        "operationId": "mailgateway.metrics.get",
        "summary": "Get delivery and reputation metrics",
        "description": "Delivery, open, bounce, and complaint rates for the range, with the daily series, send-to-delivery latency, and the per-domain breakdown. Rates are fractions (0–1), not percentages. `bounce_rate_limit` and `complaint_rate_limit` are the SES thresholds: crossing them suspends sending to protect the shared reputation.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "mail-gateway metrics"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "metrics",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "90d"
              ],
              "description": "Window of the metrics. Defaults to `30d`.",
              "example": "30d"
            },
            "required": false,
            "name": "range",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The metrics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewayMetrics"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/domains": {
      "get": {
        "operationId": "mailgateway.domains.list",
        "summary": "List sending domains",
        "description": "Each domain comes with its DNS records and the status of each one. You can only send from a `verified` domain.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "mail-gateway domain list"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "domain_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The Mail Gateway's domains.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewayDomainList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "mailgateway.domains.create",
        "summary": "Add a sending domain",
        "description": "Returns **the DNS records you must publish** in the domain's zone. That is the point of this call: until they are published and SES sees them, the domain does not verify and you cannot send from it. Each record carries `purpose`, `type`, `host`, `value`, and `status`; `purpose` is the stable key for automating publication.\n\nVerification is **asynchronous and on the SES side**: this call does not wait. Check the status with `POST /v1/mail-gateway/domains/{domain}/verify`.\n\nIt is idempotent: repeating it for an already-added domain reuses the same DKIM key pair and returns the same records, so a retry does not invalidate what is already published.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "mail-gateway domain add",
          "positional": [
            "domain"
          ]
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "domain_add",
          "readonly": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 253,
                    "description": "The sending domain. Normalized to lowercase. You must be able to edit its DNS: the creation call returns the records to publish.",
                    "example": "example.com"
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The domain, with its DNS records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewayDomain"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/domains/{domain}/verify": {
      "post": {
        "operationId": "mailgateway.domains.verify",
        "summary": "Check a domain's verification",
        "description": "**A check, not a trigger.** SES inspects public DNS on its own and at its own pace; this reads that result and updates the domain's status and each record's. Getting `pending` back is not an error: it means SES has not seen the records yet, either because they have not propagated or because they are not published.\n\nThe `dkim` and `mail_from_mx` records are the ones SES verifies. `spf`, `mail_from_spf`, and `dmarc` always stay `info`: they improve deliverability, but nothing checks them.\n\n`verified_at` comes back `null` in this response even when the status is `verified`; the value is in `GET /v1/mail-gateway/domains`.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "mail-gateway domain verify",
          "positional": [
            "domain"
          ]
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "domain_verify",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "The sending domain exactly as it was added.",
              "example": "example.com"
            },
            "required": true,
            "name": "domain",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The domain with its updated status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewayDomain"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/domains/{domain}": {
      "delete": {
        "operationId": "mailgateway.domains.delete",
        "summary": "Remove a sending domain",
        "description": "Cuts off sending from that domain: it leaves the SMTP policy and the keys. The DNS records remain published in your zone; removing them is up to you. Adding it back generates new DKIM keys, so the old TXT record stops working.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "mail-gateway domain remove",
          "positional": [
            "domain"
          ]
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "domain_remove",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "The sending domain exactly as it was added.",
              "example": "example.com"
            },
            "required": true,
            "name": "domain",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Domain removed."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/messages": {
      "get": {
        "operationId": "mailgateway.messages.list",
        "summary": "List sent messages",
        "description": "One element per message, newest first, with the aggregate status of the highest-severity event seen (`bounced` beats `delivered`). Retained for 90 days.\n\nNo `total`: the backend cannot know how many messages match without walking the entire history, and no `/v1` collection publishes totals. Paginate with `next_cursor`.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "mail-gateway message list"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "message_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Filter by recipient. It is exact equality, not search: `ana@example.com` does not find `Ana+news@example.com`.",
              "example": "ana@example.com"
            },
            "required": false,
            "name": "recipient",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "The look-back window, 1–90 days. Defaults to 30. The log is retained for 90 days: without this parameter, messages older than 30 days do not appear, which is easy to mistake for them not existing. The window is counted from *now* on every request, so repeat it on every page when paginating.",
              "example": "90"
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The messages for the period.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewayMessageList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/keys": {
      "get": {
        "operationId": "mailgateway.keys.list",
        "summary": "List sending API keys",
        "description": "Includes revoked keys, so history can be audited. `secret` is always `null`: we store the key's hash and there is no way to recover it.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "mail-gateway key list"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "key_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The tenant's keys.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewayKeyList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "mailgateway.keys.create",
        "summary": "Create a sending API key",
        "description": "Returns the full key in `secret`, **exactly once**: we store its hash, so there is no way to show it again. If it is lost, create another and revoke this one.\n\nThis key **does not work against this API**: it is used on the sending plane, `POST {api_endpoint}/emails` (currently `https://mg.truo.cloud/v1/emails`), with `Authorization: Bearer mg_live_…`. Sending deliberately does not go through `api.truo.cloud`: one extra hop on the mail path is one extra failure mode.\n\nIt requires `mailgateway:send` rather than `mailgateway:write` because issuing this credential **is** the ability to send on the account's behalf, and it survives this API's key being revoked.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:send",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "mail-gateway key create"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "key_create",
          "readonly": false
        },
        "responses": {
          "201": {
            "description": "The new key, with its `secret`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewayKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/keys/{key_id}": {
      "delete": {
        "operationId": "mailgateway.keys.delete",
        "summary": "Revoke a sending API key",
        "description": "Takes effect almost immediately: the key leaves the gateway's index. Whatever was already accepted is delivered. Revoking requires `write` rather than `send` on purpose: removing the account's ability to send should not require the scope that **grants** the ability to send.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "mail-gateway key revoke",
          "positional": [
            "key_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "key_revoke",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "The `id` returned by `GET /v1/mail-gateway/keys`.",
              "example": "mgk3f9a2b1c4d5"
            },
            "required": true,
            "name": "key_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Key revoked."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/smtp": {
      "get": {
        "operationId": "mailgateway.smtp.get",
        "summary": "View the SMTP configuration",
        "description": "Host, port, username, and status, **without the password**. It is what you need to configure or review a mail client without handling the secret. For the password, use `POST /v1/mail-gateway/smtp`.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "mail-gateway smtp get"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "smtp_get",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The SMTP configuration, without credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewaySmtp"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "mailgateway.smtp.reveal",
        "summary": "Reveal the SMTP password",
        "description": "Returns the SMTP password in plaintext. **It is a POST on purpose, even though it changes nothing.** The backend exposes it in a GET, and a GET that returns a secret lands in browser history, in any proxy's cache, and in yesterday's `curl`. A POST forces a deliberate action, is not cacheable, and enters the audit log as a mutation — which is exactly how \"who pulled the sending password, and when\" has to be auditable.\n\nThe password is recoverable (stored encrypted, not hashed) because a mail server needs it whole on every connection. If it was compromised, no longer looking at it is not enough: rotate it with `POST /v1/mail-gateway/smtp/rotate`.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:send",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "mail-gateway smtp reveal"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "smtp_reveal",
          "readonly": false
        },
        "responses": {
          "200": {
            "description": "The complete SMTP credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewaySmtpCredentials"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mail-gateway/smtp/rotate": {
      "post": {
        "operationId": "mailgateway.smtp.rotate",
        "summary": "Rotate the SMTP credential",
        "description": "Issues a new username and password and returns both. The previous credential is deactivated, not deleted, so an application that still holds it in memory does not crash at the instant of rotation — but it will stop working, so update your systems. There is no going back: the old one cannot be reactivated from here.",
        "tags": [
          "Mail Gateway"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "mailgateway:send",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "mail-gateway smtp rotate"
        },
        "x-truo-mcp": {
          "toolset": "mailgateway",
          "action": "smtp_rotate",
          "readonly": false
        },
        "responses": {
          "200": {
            "description": "The new credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MailGatewaySmtpCredentials"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images": {
      "get": {
        "operationId": "images.tenant.get",
        "summary": "Get the account's Image Services",
        "description": "It takes no id: there is one Image Services tenant per account. Returns the plan, the month's usage, and how many origins are allowed. `origin_count: 0` means nothing is served yet — the allowlist is fail-closed. If the account does not have the service, it returns 404.",
        "tags": [
          "Image Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "images:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "images get"
        },
        "x-truo-mcp": {
          "toolset": "images",
          "action": "get",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The Image Services.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageServices"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/usage": {
      "get": {
        "operationId": "images.usage.get",
        "summary": "Get the period's usage and billable line",
        "description": "Consumption against the plan for the period: transformations (cache misses — real CPU work), deliveries, egress bytes, what the quota includes, the overage, and the total in USD. Includes the daily series. On a hard-capped plan (`included.hard_cap`) the overage is never billed: the service stops at the quota instead.",
        "tags": [
          "Image Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "images:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "images usage"
        },
        "x-truo-mcp": {
          "toolset": "images",
          "action": "usage",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}$",
              "description": "UTC calendar month, `YYYY-MM`. Defaults to the current month.",
              "example": "2026-07"
            },
            "required": false,
            "name": "period",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "How many days of the daily series to return, 1–90. Defaults to 30.",
              "example": "30"
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The period's usage report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageUsageReport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/origins": {
      "get": {
        "operationId": "images.origins.list",
        "summary": "List the origin allowlist",
        "description": "The hostnames the service is allowed to fetch from. **Fail-closed**: an empty allowlist serves nothing, on purpose — an open image proxy is an attack tool.",
        "tags": [
          "Image Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "images:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "images origin list"
        },
        "x-truo-mcp": {
          "toolset": "images",
          "action": "origin_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The allowed origins.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageOriginList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "images.origins.add",
        "summary": "Allow an origin",
        "description": "Adds a hostname (`images.example.com`) or a wildcard (`*.example.com`) to the allowlist. Idempotent: re-adding an existing pattern changes nothing. Each plan caps how many origins it can hold; past the cap this returns `quota_exceeded`.",
        "tags": [
          "Image Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "images:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "images origin add",
          "positional": [
            "pattern"
          ]
        },
        "x-truo-mcp": {
          "toolset": "images",
          "action": "origin_add",
          "readonly": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageOriginCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The allowed origin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageOrigin"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/origins/{pattern}": {
      "delete": {
        "operationId": "images.origins.remove",
        "summary": "Remove an origin",
        "description": "Stops serving from that origin immediately. Reversible: adding the pattern back restores it. If it was the last origin, the tenant serves nothing until one is added — the allowlist is fail-closed.",
        "tags": [
          "Image Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "images:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "images origin remove",
          "positional": [
            "pattern"
          ]
        },
        "x-truo-mcp": {
          "toolset": "images",
          "action": "origin_remove",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "The origin pattern exactly as it was added. URL-encode it: `*.example.com` becomes `%2A.example.com`.",
              "example": "cdn.example.com"
            },
            "required": true,
            "name": "pattern",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Origin removed."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/keys": {
      "post": {
        "operationId": "images.keys.create",
        "summary": "Create a delivery token",
        "description": "Returns the full `imgt_…` token, **exactly once**: only its hash is stored, so there is no way to show it again. If it is lost, rotate or mint another.\n\nThis token **does not work against this API**: it authenticates the delivery plane — `GET {api_endpoint}/v1/img?url=…` for transformations and `POST {api_endpoint}/v1/sign` to sign URLs. Delivery deliberately does not go through `api.truo.cloud`: one extra hop on every `<img>` of every page is one extra failure mode.\n\nIt requires `images:keys` rather than `images:write` because holding this token **is** the ability to serve — and bill — traffic through the account's tenant.",
        "tags": [
          "Image Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "images:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "images key create"
        },
        "x-truo-mcp": {
          "toolset": "images",
          "action": "key_create",
          "readonly": false
        },
        "responses": {
          "201": {
            "description": "The new token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/keys/rotate": {
      "post": {
        "operationId": "images.keys.rotate",
        "summary": "Rotate the delivery token",
        "description": "Issues a new token and returns it. With `grace_seconds`, the previous token keeps working that long, so servers holding it do not fail at the instant of rotation; with `0` (the default) it dies immediately. There is no going back: the old token cannot be reactivated.",
        "tags": [
          "Image Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "images:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "images key rotate"
        },
        "x-truo-mcp": {
          "toolset": "images",
          "action": "key_rotate",
          "readonly": false
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageRotateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/signing-secret": {
      "post": {
        "operationId": "images.signing.reveal",
        "summary": "Reveal the URL-signing secret",
        "description": "Returns the per-tenant HMAC-SHA256 secret that signs delivery URLs. **It is a POST on purpose, even though it changes nothing**: a GET that returns a secret lands in browser history, in any proxy's cache, and in yesterday's `curl`. A POST forces a deliberate action, is not cacheable, and enters the audit log as a mutation.\n\nThe secret is recoverable (stored, not hashed) because your server needs it whole to sign every URL it emits. It belongs on the server, **never in the browser**: anyone holding it can mint URLs that serve — and bill — through your tenant. If it was compromised, rotate it with `POST /v1/images/signing-secret/rotate`.",
        "tags": [
          "Image Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "images:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "images signing reveal"
        },
        "x-truo-mcp": {
          "toolset": "images",
          "action": "signing_reveal",
          "readonly": false
        },
        "responses": {
          "200": {
            "description": "The secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageSigningSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/signing-secret/rotate": {
      "post": {
        "operationId": "images.signing.rotate",
        "summary": "Rotate the URL-signing secret",
        "description": "Issues a new secret and returns it. URLs signed with the previous secret keep working until `previous_valid_until` (per `grace_seconds`) — without a grace window, every `<img>` already rendered in your pages would break at the instant of rotation. Re-sign and redeploy before the window closes.",
        "tags": [
          "Image Services"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "images:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "images signing rotate"
        },
        "x-truo-mcp": {
          "toolset": "images",
          "action": "signing_rotate",
          "readonly": false
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageRotateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageSigningSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/kv": {
      "get": {
        "operationId": "serverless.kv.get",
        "summary": "Get the account's Serverless KV",
        "description": "It takes no id: there is one KV tenant per account. Returns the plan, its limits, and the month's usage. If the account does not have the service, it returns 404.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless kv get"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "kv_get",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The KV tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessKv"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/kv/usage": {
      "get": {
        "operationId": "serverless.kv.usage.get",
        "summary": "Get the KV period's usage and billable line",
        "description": "Reads, writes and the storage peak against the plan for the period, the overage, the total in USD, and the daily series. On a hard-capped plan (`included.hard_cap`) the overage is never billed: the service stops at the quota instead.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless kv usage"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "kv_usage",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}$",
              "description": "UTC calendar month, `YYYY-MM`. Defaults to the current month.",
              "example": "2026-07"
            },
            "required": false,
            "name": "period",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "How many days of the daily series to return, 1–90. Defaults to 30.",
              "example": "30"
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The usage report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessKvUsage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/kv/keys": {
      "post": {
        "operationId": "serverless.kv.keys.create",
        "summary": "Create an additional KV token",
        "description": "Mints a new `kvt_…` token **without invalidating the existing ones** — KV is the only primitive that supports several live tokens per tenant (one per app or environment). The token is returned exactly once: only its hash is stored.\n\nIt does not work against this API: it authenticates the data plane at `{api_endpoint}/v1/ns/…`. It requires `serverless:keys` because holding it **is** the ability to read, write and bill against the account's tenant.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "serverless kv key create"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "kv_key_create",
          "readonly": false
        },
        "responses": {
          "201": {
            "description": "The new token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/kv/keys/rotate": {
      "post": {
        "operationId": "serverless.kv.keys.rotate",
        "summary": "Rotate the KV tokens",
        "description": "Issues a new token and returns it. **All** previous tokens of the tenant are affected: with `grace_seconds` they keep working that long; with `0` (the default) they die immediately. There is no going back.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "serverless kv key rotate"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "kv_key_rotate",
          "readonly": false
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerlessRotateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/cron": {
      "get": {
        "operationId": "serverless.cron.get",
        "summary": "Get the account's Cron Jobs",
        "description": "It takes no id: there is one Cron tenant per account. Returns the plan, its limits, how many schedules exist, and the month's executions. Schedules themselves are managed against the service's data plane with the tenant token.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless cron get"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "cron_get",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The Cron tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessCron"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/cron/usage": {
      "get": {
        "operationId": "serverless.cron.usage.get",
        "summary": "Get the Cron period's usage and billable line",
        "description": "Webhook executions against the plan for the period, the overage, the total in USD, and the daily series. On the free plan, deliveries past the quota are skipped (visible in the execution log) instead of billed.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless cron usage"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "cron_usage",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}$",
              "description": "UTC calendar month, `YYYY-MM`. Defaults to the current month.",
              "example": "2026-07"
            },
            "required": false,
            "name": "period",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "How many days of the daily series to return, 1–90. Defaults to 30.",
              "example": "30"
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The usage report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessCronUsage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/cron/keys/rotate": {
      "post": {
        "operationId": "serverless.cron.keys.rotate",
        "summary": "Rotate the Cron token",
        "description": "Issues a new `crt_…` token and returns it, exactly once. With `grace_seconds` the previous token keeps working that long; with `0` (the default) it dies immediately. Schedules keep firing through a rotation — the token only authenticates management.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "serverless cron key rotate"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "cron_key_rotate",
          "readonly": false
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerlessRotateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/db": {
      "get": {
        "operationId": "serverless.db.get",
        "summary": "Get the account's Serverless DB",
        "description": "It takes no id: there is one Serverless DB tenant per account. Returns the plan, its limits, the live namespaces and the month's usage. **This is not DBaaS** (`/v1/databases`, managed database VMs): this is the serverless SQL primitive, D1-compatible, one SQLite database per namespace.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless db get"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "db_get",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The DB tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessDb"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/db/usage": {
      "get": {
        "operationId": "serverless.db.usage.get",
        "summary": "Get the DB period's usage and billable line",
        "description": "Rows read/written and the storage peak against the plan for the period, the overage, the total in USD, and the daily series. `exec` (multi-statement DDL) does not report rows and is not metered, same as D1.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless db usage"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "db_usage",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}$",
              "description": "UTC calendar month, `YYYY-MM`. Defaults to the current month.",
              "example": "2026-07"
            },
            "required": false,
            "name": "period",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "How many days of the daily series to return, 1–90. Defaults to 30.",
              "example": "30"
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The usage report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessDbUsage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/db/keys/rotate": {
      "post": {
        "operationId": "serverless.db.keys.rotate",
        "summary": "Rotate the DB token",
        "description": "Issues a new `dbt_…` token and returns it, exactly once. With `grace_seconds` the previous token keeps working that long — rotate with a grace window and redeploy your apps before it closes, or every query they run dies at the instant of rotation.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "serverless db key rotate"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "db_key_rotate",
          "readonly": false
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerlessRotateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/functions": {
      "get": {
        "operationId": "serverless.functions.get",
        "summary": "Get the account's Serverless Functions",
        "description": "It takes no id: there is one Functions tenant per account. Returns the plan, its limits, how many functions are deployed, and the month's invocations. Deploys and invocations go through the service's data plane, not this API.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless functions get"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "functions_get",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The Functions tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessFunctions"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/functions/usage": {
      "get": {
        "operationId": "serverless.functions.usage.get",
        "summary": "Get the Functions period's usage and billable line",
        "description": "Invocations, errors and total execution time against the plan for the period, the overage, the total in USD, and the daily series.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless functions usage"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "functions_usage",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}$",
              "description": "UTC calendar month, `YYYY-MM`. Defaults to the current month.",
              "example": "2026-07"
            },
            "required": false,
            "name": "period",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "How many days of the daily series to return, 1–90. Defaults to 30.",
              "example": "30"
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The usage report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessFunctionsUsage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/functions/keys/rotate": {
      "post": {
        "operationId": "serverless.functions.keys.rotate",
        "summary": "Rotate the Functions token",
        "description": "Issues a new `fnt_…` token and returns it, exactly once. With `grace_seconds` the previous token keeps working that long. Deployed functions keep serving through a rotation — the token only authenticates deploys and management, not the public invocation URLs.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:keys",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "serverless functions key rotate"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "functions_key_rotate",
          "readonly": false
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerlessRotateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/kv/availability": {
      "get": {
        "operationId": "serverless.kv.availability.get",
        "summary": "Get the Serverless KV availability for a month",
        "description": "The month's uptime of the service, the outages that count and the announced maintenance windows that are excluded. It is the evidence for an SLA credit claim. Measured every 30 s by a synthetic probe that exercises the service; there is no short-outage exclusion. The current month includes today up to now.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless kv availability"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "kv_availability",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "description": "UTC calendar month, `YYYY-MM`. Defaults to the current month.",
              "example": "2026-10"
            },
            "required": false,
            "name": "month",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The availability report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessAvailability"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/cron/availability": {
      "get": {
        "operationId": "serverless.cron.availability.get",
        "summary": "Get the Cron Jobs availability for a month",
        "description": "The month's uptime of the service, the outages that count and the announced maintenance windows that are excluded. It is the evidence for an SLA credit claim. Measured every 30 s by a synthetic probe that exercises the service; there is no short-outage exclusion. The current month includes today up to now.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless cron availability"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "cron_availability",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "description": "UTC calendar month, `YYYY-MM`. Defaults to the current month.",
              "example": "2026-10"
            },
            "required": false,
            "name": "month",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The availability report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessAvailability"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/db/availability": {
      "get": {
        "operationId": "serverless.db.availability.get",
        "summary": "Get the Serverless DB availability for a month",
        "description": "The month's uptime of the service, the outages that count and the announced maintenance windows that are excluded. It is the evidence for an SLA credit claim. Measured every 30 s by a synthetic probe that exercises the service; there is no short-outage exclusion. The current month includes today up to now.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless db availability"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "db_availability",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "description": "UTC calendar month, `YYYY-MM`. Defaults to the current month.",
              "example": "2026-10"
            },
            "required": false,
            "name": "month",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The availability report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessAvailability"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/serverless/functions/availability": {
      "get": {
        "operationId": "serverless.functions.availability.get",
        "summary": "Get the Serverless Functions availability for a month",
        "description": "The month's uptime of the service, the outages that count and the announced maintenance windows that are excluded. It is the evidence for an SLA credit claim. Measured every 30 s by a synthetic probe that exercises the service; there is no short-outage exclusion. The current month includes today up to now.",
        "tags": [
          "Serverless"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "serverless:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "serverless functions availability"
        },
        "x-truo-mcp": {
          "toolset": "serverless",
          "action": "functions_availability",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
              "description": "UTC calendar month, `YYYY-MM`. Defaults to the current month.",
              "example": "2026-10"
            },
            "required": false,
            "name": "month",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The availability report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerlessAvailability"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/recipes": {
      "get": {
        "operationId": "wordpress.recipes.list",
        "summary": "List the recipes of this account",
        "description": "Recipes belong to the account, not to a site. Manifests are not included; use `wordpress.recipes.get`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress recipes list"
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "recipes_list",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "The recipes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecipeList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "wordpress.recipes.create",
        "summary": "Register a recipe",
        "description": "The body is a `recipe/v1` manifest. It is validated in full before it is stored — limits, allowed constants, and every WP-CLI line it would run — and a problem comes back as `recipe_invalid` with `param` pointing at the field. Zips in `url` are **not** downloaded here; their checksum is verified when the recipe is applied. Max 20 recipes per account.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress recipes create"
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "recipes_create",
          "readonly": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecipeManifest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Registered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recipe"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/recipes/{name}": {
      "get": {
        "operationId": "wordpress.recipes.get",
        "summary": "Get a recipe and its manifest",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress recipes get",
          "positional": [
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "recipes_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "haztap-golden"
            },
            "required": true,
            "name": "name",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Default: the latest.",
              "example": "1.2.0"
            },
            "required": false,
            "name": "version",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The recipe with the requested (or latest) manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recipe"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "wordpress.recipes.update",
        "summary": "Publish a new version of a recipe",
        "description": "The body is a full manifest whose `name` matches the URL and whose `version` is greater than every version already published. Published versions are immutable: a site that reports `truo_recipe = name@1.2.0` always points at the manifest that was applied.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress recipes update",
          "positional": [
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "recipes_update",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "haztap-golden"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecipeManifest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The recipe with the new version.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recipe"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "wordpress.recipes.delete",
        "summary": "Delete a recipe and all its versions",
        "description": "Sites that already have it applied are not touched.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress recipes delete",
          "positional": [
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "recipes_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "haztap-golden"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/recipes/apply": {
      "post": {
        "operationId": "wordpress.recipes.apply",
        "summary": "Apply a recipe to a site",
        "description": "Runs the manifest against the site over WP-CLI, in order: requirements → zip checksums → backup → plugins → constants → options → roles → secrets → verify → register. `requires` is checked in this request (`recipe_requirements_unmet`, 412, nothing touched); everything else runs in the background and the operation `result` shows each step. A checksum mismatch fails before the backup with `recipe_checksum_mismatch`; a red `verify` fails with `recipe_verify_failed` and leaves the site as it is — the backup is the way back. On success the site stores `truo_recipe = {name, version, applied_at}` and, if the recipe declares `secrets`, `result.secrets.claim` says where to fetch them once.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress recipes apply",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "recipes_apply",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "haztap-golden"
                  },
                  "version": {
                    "type": "string",
                    "description": "Default: the latest published version."
                  },
                  "backup": {
                    "type": "boolean",
                    "description": "Take a backup before changing anything. Default `true`. It counts against the daily manual-backup allowance."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; follow the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "The `If-Match` precondition failed. Someone else modified the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/recipes/secrets": {
      "post": {
        "operationId": "wordpress.recipes.secrets.claim",
        "summary": "Claim the secrets a recipe generated (once)",
        "description": "Returns the values of the `secrets` a `wordpress.recipes.apply` operation generated for this site, **exactly once**: this response deletes them. They are kept encrypted for 24 hours after the operation succeeds; after that, or after a first claim, this is `not_found`. Store them on your side.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress recipes claim-secrets",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "recipes_claim_secrets",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation": {
                    "type": "string",
                    "description": "The `wordpress.recipes.apply` operation.",
                    "example": "op_01JQ8XKM4N7P2R9TAB12CD34EF"
                  }
                },
                "required": [
                  "operation"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The secrets. They are gone after this.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecipeSecrets"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress": {
      "get": {
        "operationId": "wordpress.list",
        "summary": "List WordPress sites",
        "description": "Served from the database, without querying the node: `live` comes back `null`. Fetching it would cost one backend call per page item. For the live state of one site, use `GET /v1/wordpress/{id}`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress list"
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The account's WordPress sites.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}": {
      "get": {
        "operationId": "wordpress.get",
        "summary": "Get a WordPress site with its live state",
        "description": "Queries the node. If it does not respond, `live` comes back `null` instead of failing: a node hiccup should not stop you from reading the rest of the resource or its `capabilities`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The site.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wordpress"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/status": {
      "get": {
        "operationId": "wordpress.status",
        "summary": "Get runtime state, health and resource usage",
        "description": "Health (installed, database reachable, pending updates) comes from a check the node runs every 15 minutes: `checked_at` says when. Resource usage is measured for this request.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress status",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "status",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressStatus"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/restart": {
      "post": {
        "operationId": "wordpress.restart",
        "summary": "Restart the site",
        "description": "Restarts the whole site (web server, PHP, database, cache): ~30 s of downtime. To reload PHP alone without downtime use `POST /v1/wordpress/{id}/php/restart`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress restart",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "restart",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Restart completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/logs": {
      "get": {
        "operationId": "wordpress.logs.get",
        "summary": "Get a log's last lines",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress logs",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "logs",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "runtime",
                "error",
                "access",
                "server",
                "php"
              ],
              "description": "Defaults to `error`."
            },
            "required": false,
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–5000. Defaults to 200.",
              "example": "200"
            },
            "required": false,
            "name": "lines",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The log lines.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressLogs"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/plugins": {
      "get": {
        "operationId": "wordpress.plugins.list",
        "summary": "List installed plugins",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress plugin list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "plugin_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The plugins.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressExtensionList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "wordpress.plugins.install",
        "summary": "Install a plugin",
        "description": "From wordpress.org by slug, or from an `https://` zip. Activates it unless `activate` is `false`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress plugin install",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "plugin_install",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "A wordpress.org slug, or an `https://` URL to a zip.",
                    "example": "woocommerce"
                  },
                  "activate": {
                    "type": "boolean",
                    "description": "Plugins default to `true`; themes to `false`."
                  }
                },
                "required": [
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Install completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/plugins/search": {
      "get": {
        "operationId": "wordpress.plugins.search",
        "summary": "Search wordpress.org for plugins",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress plugin search",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "plugin_search",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "example": "seo"
            },
            "required": true,
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching plugins.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressExtensionSearchList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/plugins/update-all": {
      "post": {
        "operationId": "wordpress.plugins.update_all",
        "summary": "Update every plugin with an update available",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress plugin update-all",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "plugin_update_all",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Updates applied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/plugins/{slug}/activate": {
      "post": {
        "operationId": "wordpress.plugins.activate",
        "summary": "Activate a plugin",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress plugin activate",
          "positional": [
            "service_id",
            "slug"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "plugin_activate",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "woocommerce"
            },
            "required": true,
            "name": "slug",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          }
        ],
        "responses": {
          "202": {
            "description": "Activated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/plugins/{slug}/deactivate": {
      "post": {
        "operationId": "wordpress.plugins.deactivate",
        "summary": "Deactivate a plugin",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress plugin deactivate",
          "positional": [
            "service_id",
            "slug"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "plugin_deactivate",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "woocommerce"
            },
            "required": true,
            "name": "slug",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          }
        ],
        "responses": {
          "202": {
            "description": "Deactivated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/plugins/{slug}/update": {
      "post": {
        "operationId": "wordpress.plugins.update",
        "summary": "Update a plugin",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress plugin update",
          "positional": [
            "service_id",
            "slug"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "plugin_update",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "woocommerce"
            },
            "required": true,
            "name": "slug",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          }
        ],
        "responses": {
          "202": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/plugins/{slug}": {
      "delete": {
        "operationId": "wordpress.plugins.delete",
        "summary": "Delete a plugin",
        "description": "Removes its files. Its settings stay in the database, as WordPress does.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress plugin delete",
          "positional": [
            "service_id",
            "slug"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "plugin_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "woocommerce"
            },
            "required": true,
            "name": "slug",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/themes": {
      "get": {
        "operationId": "wordpress.themes.list",
        "summary": "List installed themes",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress theme list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "theme_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The themes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressExtensionList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "wordpress.themes.install",
        "summary": "Install a theme",
        "description": "From wordpress.org by slug, or from an `https://` zip. Does not activate it unless `activate` is `true`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress theme install",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "theme_install",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "A wordpress.org slug, or an `https://` URL to a zip.",
                    "example": "woocommerce"
                  },
                  "activate": {
                    "type": "boolean",
                    "description": "Plugins default to `true`; themes to `false`."
                  }
                },
                "required": [
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Install completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/themes/search": {
      "get": {
        "operationId": "wordpress.themes.search",
        "summary": "Search wordpress.org for themes",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress theme search",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "theme_search",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "example": "seo"
            },
            "required": true,
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching themes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressExtensionSearchList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/themes/update-all": {
      "post": {
        "operationId": "wordpress.themes.update_all",
        "summary": "Update every theme with an update available",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress theme update-all",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "theme_update_all",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Updates applied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/themes/{slug}/activate": {
      "post": {
        "operationId": "wordpress.themes.activate",
        "summary": "Activate a theme",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress theme activate",
          "positional": [
            "service_id",
            "slug"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "theme_activate",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "woocommerce"
            },
            "required": true,
            "name": "slug",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          }
        ],
        "responses": {
          "202": {
            "description": "Activated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/themes/{slug}/update": {
      "post": {
        "operationId": "wordpress.themes.update",
        "summary": "Update a theme",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress theme update",
          "positional": [
            "service_id",
            "slug"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "theme_update",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "woocommerce"
            },
            "required": true,
            "name": "slug",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/themes/{slug}": {
      "delete": {
        "operationId": "wordpress.themes.delete",
        "summary": "Delete a theme",
        "description": "The active theme cannot be deleted: activate another one first.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress theme delete",
          "positional": [
            "service_id",
            "slug"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "theme_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "woocommerce"
            },
            "required": true,
            "name": "slug",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cache/flush": {
      "post": {
        "operationId": "wordpress.cache.flush",
        "summary": "Flush every cache",
        "description": "Object cache (Redis), page cache and the CDN edge if enabled. Harmless: the caches rebuild on the next visits.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "none",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress cache flush",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cache_flush",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          }
        ],
        "responses": {
          "202": {
            "description": "Flushed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/core/updates": {
      "get": {
        "operationId": "wordpress.core.updates.list",
        "summary": "Check for WordPress core updates",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress core updates",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "core_updates",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Available core updates.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressCoreUpdates"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "wordpress.core.updates.apply",
        "summary": "Update WordPress core",
        "description": "Updates to the latest version WordPress offers and runs the database upgrade. Take a backup first.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress core update",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "core_update",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Update applied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/php": {
      "get": {
        "operationId": "wordpress.php.get",
        "summary": "Get PHP version and settings",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress php get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "php_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "PHP settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressPhp"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "wordpress.php.update",
        "summary": "Change PHP settings",
        "description": "Only the provided keys change. PHP reloads gracefully: no downtime.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress php set",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "php_set",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "memory_limit": {
                    "type": "string",
                    "pattern": "^[0-9]{1,6}[KMG]?$",
                    "example": "256M"
                  },
                  "upload_max_filesize": {
                    "type": "string",
                    "pattern": "^[0-9]{1,6}[KMG]?$",
                    "example": "256M"
                  },
                  "post_max_size": {
                    "type": "string",
                    "pattern": "^[0-9]{1,6}[KMG]?$",
                    "example": "256M"
                  },
                  "max_execution_time": {
                    "type": "string",
                    "pattern": "^[0-9]{1,6}[KMG]?$",
                    "example": "256M"
                  },
                  "max_input_vars": {
                    "type": "string",
                    "pattern": "^[0-9]{1,6}[KMG]?$",
                    "example": "256M"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Settings applied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/php/version": {
      "post": {
        "operationId": "wordpress.php.version.set",
        "summary": "Change the PHP version",
        "description": "Switches the interpreter and restarts PHP: a few seconds of errors while it comes back. Custom settings carry over.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress php version",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "php_version",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string",
                    "enum": [
                      "8.1",
                      "8.2",
                      "8.3"
                    ],
                    "example": "8.3"
                  }
                },
                "required": [
                  "version"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Version changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/php/restart": {
      "post": {
        "operationId": "wordpress.php.restart",
        "summary": "Restart PHP",
        "description": "Recycles the PHP workers and reloads the web server. No downtime; in-flight requests finish.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "none",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress php restart",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "php_restart",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Restarted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/backups": {
      "get": {
        "operationId": "wordpress.backups.list",
        "summary": "List the site's backups",
        "description": "Newest first. Scheduled and manual ones, wherever they are stored.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress backup list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "backup_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The backups.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressBackupList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "wordpress.backups.create",
        "summary": "Create a backup now",
        "description": "Database and files. Counts against the daily manual-backup allowance of the plan (`429 rate_limited` when exceeded) and its storage quota (`429 quota_exceeded`). One at a time per site (`409`). The operation carries the `backup_id` in `result`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress backup create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "backup_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Backup created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/backups/settings": {
      "get": {
        "operationId": "wordpress.backups.settings.get",
        "summary": "Get the backup schedule",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress backup settings get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "backup_settings_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The schedule and what the plan allows.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressBackupSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "wordpress.backups.settings.update",
        "summary": "Change the backup schedule",
        "description": "`retention_days` is clamped to the range the plan allows; the response shows what was applied.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress backup settings set",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "backup_settings_set",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "daily",
                      "weekly",
                      "monthly"
                    ]
                  },
                  "retention_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365,
                    "description": "Clamped by the node to its allowed range (see `policy`)."
                  }
                },
                "required": [
                  "enabled",
                  "frequency",
                  "retention_days"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The schedule as applied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressBackupSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/backups/{backup_id}/restore": {
      "post": {
        "operationId": "wordpress.backups.restore",
        "summary": "Restore a backup",
        "description": "**Destructive**: overwrites the database and the files with the backup. Everything changed since it was taken is lost. Take a fresh backup first if in doubt.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress backup restore",
          "positional": [
            "service_id",
            "backup_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "backup_restore",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "wp_20260915_030000_daily"
            },
            "required": true,
            "name": "backup_id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Restore completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/backups/{backup_id}/download": {
      "post": {
        "operationId": "wordpress.backups.download",
        "summary": "Get a temporary download URL for a backup",
        "description": "The archive may have to be rebuilt from cold storage first, which can take a minute. It is a POST because the URL is a credential: it is not cached and it enters the audit log.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress backup download",
          "positional": [
            "service_id",
            "backup_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "backup_download",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "wp_20260915_030000_daily"
            },
            "required": true,
            "name": "backup_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The download URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressBackupDownload"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/backups/{backup_id}": {
      "delete": {
        "operationId": "wordpress.backups.delete",
        "summary": "Delete a backup",
        "description": "**Irreversible.** Scheduled backups are also pruned by the retention policy; you rarely need this.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress backup delete",
          "positional": [
            "service_id",
            "backup_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "backup_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "wp_20260915_030000_daily"
            },
            "required": true,
            "name": "backup_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/staging": {
      "get": {
        "operationId": "wordpress.staging.list",
        "summary": "List staging environments",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress staging list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "staging_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The clones.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressStagingList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "wordpress.staging.create",
        "summary": "Create a staging environment",
        "description": "A full copy of the site (database and files) on its own URL, with fixed resources. Takes a minute or two. The operation carries the clone in `result`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress staging create",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "staging_create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]{0,19}$",
                    "description": "Defaults to `staging`. A site can have several clones.",
                    "example": "staging"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Clone created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/staging/{name}/push": {
      "post": {
        "operationId": "wordpress.staging.push",
        "summary": "Push a staging environment to production",
        "description": "**Destructive**: copies the database and/or the files of the clone OVER the live site. Take a backup of production first.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress staging push",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "staging_push",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "staging"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "database": {
                    "type": "boolean",
                    "description": "Copy the database. Defaults to `true`."
                  },
                  "files": {
                    "type": "boolean",
                    "description": "Copy the files. Defaults to `true`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Push completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/staging/{name}": {
      "delete": {
        "operationId": "wordpress.staging.delete",
        "summary": "Delete a staging environment",
        "description": "**Irreversible**: the clone and its data are removed. Production is not touched.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress staging delete",
          "positional": [
            "service_id",
            "name"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "staging_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "staging"
            },
            "required": true,
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/domains": {
      "get": {
        "operationId": "wordpress.domains.list",
        "summary": "List the site's domains",
        "description": "Includes the platform hostname the site was born with and every custom domain you added.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress domain list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "domain_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The domains.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressDomainList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "wordpress.domains.add",
        "summary": "Add a custom domain",
        "description": "Registers the domain, requests its certificate and — if it is the first custom domain — makes it the primary and rewrites the site URLs. The response says which DNS records to publish. By default the request fails if the domain does not point here yet; pass `force` to add it first and configure DNS afterwards.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress domain add",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "domain_add",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 253,
                    "example": "shop.example.com"
                  },
                  "force": {
                    "type": "boolean",
                    "description": "Skip the DNS pre-flight. By default the request fails with `validation_failed` if the domain does not point here yet; with `force` it is added and you configure DNS afterwards."
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The domain and what to publish.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressDomainAdded"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/domains/ssl/retry": {
      "post": {
        "operationId": "wordpress.domains.ssl.retry",
        "summary": "Retry certificate issuance for every domain",
        "description": "Clears failed certificate attempts and asks for them again. Use it after fixing DNS. Let's Encrypt allows 5 failures per hour per domain: do not loop on this.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress domain retry-ssl",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "domain_retry_ssl",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Re-issuance requested.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/domains/{domain_id}/verify": {
      "get": {
        "operationId": "wordpress.domains.verify",
        "summary": "Check a domain's DNS",
        "description": "Resolves the domain (and `www.` for an apex) and says whether it points here, or why not.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress domain verify",
          "positional": [
            "service_id",
            "domain_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "domain_verify",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "domain_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The verification.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressDomainVerification"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/domains/{domain_id}/primary": {
      "post": {
        "operationId": "wordpress.domains.set_primary",
        "summary": "Make a domain the primary",
        "description": "Rewrites `siteurl`/`home` and every URL in the database. An apex becomes `www.`: that is the canonical form.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress domain set-primary",
          "positional": [
            "service_id",
            "domain_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "domain_set_primary",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "domain_id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Primary changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/domains/{domain_id}": {
      "delete": {
        "operationId": "wordpress.domains.delete",
        "summary": "Remove a custom domain",
        "description": "The site stops answering on it. Its certificate is dropped. The platform hostname cannot be removed.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress domain delete",
          "positional": [
            "service_id",
            "domain_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "domain_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "domain_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cloudflare": {
      "get": {
        "operationId": "wordpress.cloudflare.get",
        "summary": "Get the Cloudflare state of every domain",
        "description": "Whether your custom domains go through Cloudflare (edge cache, DDoS protection, managed certificates) and the per-domain status. Only on sites whose `capabilities.cloudflare` is true.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress cloudflare get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cloudflare_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The Cloudflare state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressCloudflare"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cloudflare/enable": {
      "post": {
        "operationId": "wordpress.cloudflare.enable",
        "summary": "Put your custom domains behind Cloudflare",
        "description": "Registers each custom domain with Cloudflare and switches its certificate. The operation `result` lists, per domain, the DNS records to publish. Until they resolve, the domain keeps working as before.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress cloudflare enable",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cloudflare_enable",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cloudflare/disable": {
      "post": {
        "operationId": "wordpress.cloudflare.disable",
        "summary": "Take your custom domains off Cloudflare",
        "description": "Removes the Cloudflare hostnames and goes back to per-domain certificates. Point your DNS at the site again.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress cloudflare disable",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cloudflare_disable",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cloudflare/records": {
      "get": {
        "operationId": "wordpress.cloudflare.records.get",
        "summary": "Get the DNS records a Cloudflare-enabled domain needs",
        "description": "Re-fetches the records and the current verification status from Cloudflare. Use it to check progress after publishing them.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress cloudflare records",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cloudflare_records",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 4,
              "maxLength": 253,
              "example": "shop.example.com"
            },
            "required": true,
            "name": "domain",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The records and status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressCloudflareRecords"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/security": {
      "get": {
        "operationId": "wordpress.security.get",
        "summary": "Get the security status",
        "description": "Login protection counters and the result of the last integrity scan (core and wordpress.org plugins against official checksums).",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress security get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "security_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The security status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressSecurity"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/security/scan": {
      "post": {
        "operationId": "wordpress.security.scan",
        "summary": "Run an integrity scan now",
        "description": "Verifies core and wordpress.org plugins against their official checksums. The findings come in the operation `result`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress security scan",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "security_scan",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Scan completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/security/blocked-ips": {
      "get": {
        "operationId": "wordpress.security.blocked_ips.list",
        "summary": "List IPs locked out for failed logins",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress security blocked-ips",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "security_blocked_ips",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The lockouts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressBlockedIpList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/security/blocked-ips/{ip_id}": {
      "delete": {
        "operationId": "wordpress.security.blocked_ips.delete",
        "summary": "Lift a lockout",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress security unblock",
          "positional": [
            "service_id",
            "ip_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "security_unblock",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "ip_id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Unblocked."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/monitoring/pagespeed": {
      "get": {
        "operationId": "wordpress.monitoring.pagespeed",
        "summary": "Run PageSpeed Insights",
        "description": "Runs Google PageSpeed Insights live for mobile and desktop: 10–30 s. Core Web Vitals included.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress pagespeed",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "pagespeed",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The scores.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressPagespeed"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/monitoring/recovery": {
      "get": {
        "operationId": "wordpress.monitoring.recovery",
        "summary": "Get the auto-recovery state and history",
        "description": "The platform watches every site and repairs the common failures on its own (plugin fatals, stuck services). This is what it did to yours, and whether it gave up (`halted`).",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress recovery",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "recovery",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–365. Defaults to 30."
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The recovery state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressRecovery"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cdn": {
      "get": {
        "operationId": "wordpress.cdn.get",
        "summary": "Get the CDN state",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress cdn get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cdn_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The CDN state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressCdn"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cdn/enable": {
      "post": {
        "operationId": "wordpress.cdn.enable",
        "summary": "Enable the media CDN",
        "description": "Serves uploads from the edge with on-the-fly image optimization. Media URLs are rewritten on the frontend only.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress cdn enable",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cdn_enable",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cdn/disable": {
      "post": {
        "operationId": "wordpress.cdn.disable",
        "summary": "Disable the media CDN",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress cdn disable",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cdn_disable",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cdn/purge": {
      "post": {
        "operationId": "wordpress.cdn.purge",
        "summary": "Purge the CDN cache",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "none",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress cdn purge",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cdn_purge",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Purged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/wp-cli": {
      "post": {
        "operationId": "wordpress.wpcli.run",
        "summary": "Run a WP-CLI command",
        "description": "Runs `wp <command> <args…>` inside the site and returns `exit_code`, `output` and `error` in the operation `result` (output capped at 64 KB, `truncated: true` past it). A non-zero exit code is the command's result, not an API error. Only an allowlist of subcommands runs: no `eval`, no `shell`, no free-form `db query`, no global flags that change where it runs. Requires `wordpress:console`: WP-CLI is full access to the site and its database.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:console",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress wp-cli",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "wp_cli",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Name of one of the site's staging environments (`GET /v1/wordpress/{id}/staging`). The call runs on that clone instead of the live site.",
              "example": "fix-header"
            },
            "required": false,
            "name": "staging",
            "in": "query"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "command": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "The WP-CLI subcommand, without the leading `wp`. Allowed: cache, cap, comment, config, core, cron, db, language, maintenance-mode, media, menu, option, plugin, post, redis, rewrite, role, search-replace, sidebar, taxonomy, term, theme, transient, user, widget.",
                    "example": "plugin list"
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 1000
                    },
                    "maxItems": 32,
                    "description": "Extra arguments, one per element. Quoted for you.",
                    "example": [
                      "--status=active"
                    ]
                  }
                },
                "required": [
                  "command"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Command finished.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cron": {
      "get": {
        "operationId": "wordpress.cron.list",
        "summary": "List scheduled WP-Cron events",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress cron list",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cron_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressCronEventList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cron/{hook}/run": {
      "post": {
        "operationId": "wordpress.cron.run",
        "summary": "Run a WP-Cron event now",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress cron run",
          "positional": [
            "service_id",
            "hook"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cron_run",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "wp_version_check"
            },
            "required": true,
            "name": "hook",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Event ran.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/cron/{hook}": {
      "delete": {
        "operationId": "wordpress.cron.delete",
        "summary": "Unschedule a WP-Cron event",
        "description": "Removes every scheduled occurrence of the hook. A plugin may schedule it again.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress cron delete",
          "positional": [
            "service_id",
            "hook"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "cron_delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_1241"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "wp_version_check"
            },
            "required": true,
            "name": "hook",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Unscheduled."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/email": {
      "get": {
        "operationId": "wordpress.email.get",
        "summary": "Get how the site sends email",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress email get",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "email_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The email configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressEmail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/email/log": {
      "get": {
        "operationId": "wordpress.email.log",
        "summary": "List recently sent emails",
        "description": "What `wp_mail()` sent in the last 7 days: recipient, subject and method. No bodies.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress email log",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "email_log",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The log.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressEmailLogList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/email/test": {
      "post": {
        "operationId": "wordpress.email.test",
        "summary": "Send a test email",
        "description": "Sends through the site's own mailer. `result.sent` says whether `wp_mail()` succeeded; a `false` is the diagnosis, not an error.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "none",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "wordpress email test",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "email_test",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "format": "email",
                    "example": "you@example.com"
                  }
                },
                "required": [
                  "to"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Test sent (or not: see `result`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wordpress/{id}/autologin": {
      "post": {
        "operationId": "wordpress.autologin",
        "summary": "Get a one-time login URL to wp-admin",
        "description": "Logs in as the first administrator without a password. **Single use, short-lived** (`expires_in_seconds`). It is a POST because the URL is a credential: it is not cached, not replayed by `Idempotency-Key`, and it enters the audit log. Requires `wordpress:console`.",
        "tags": [
          "WordPress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "wordpress:console",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "wordpress autologin",
          "positional": [
            "service_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "wordpress",
          "action": "autologin",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "svc_10432"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The login URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordpressAutologin"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/products": {
      "get": {
        "operationId": "orders.products.list",
        "summary": "List the products this account can order",
        "description": "The orderable catalog, priced in the account currency. `product` is the stable slug to pass to `POST /v1/orders`; `prices` lists the cycles actually sold; `options` the configurable choices. Hidden and retired products are not listed and cannot be ordered. The whole catalog fits in one page by default (`limit` defaults to 100 here); filter with `family` (e.g. `wordpress`, `vps`).",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "orders:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "orders products"
        },
        "x-truo-mcp": {
          "toolset": "orders",
          "action": "products_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only products of this family (`wordpress`, `vps`, `dbaas`, `dns`, …).",
              "example": "wordpress"
            },
            "required": false,
            "name": "family",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Orderable products.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderableProductList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/payment-methods": {
      "get": {
        "operationId": "orders.payment_methods.list",
        "summary": "List the payment methods available to this account",
        "description": "What `payment_method` accepts when ordering. The one flagged `default` is used when omitted. An order whose invoice cannot be settled with account credit stays `pending` until it is paid through the panel with one of these.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "orders:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "orders payment-methods"
        },
        "x-truo-mcp": {
          "toolset": "orders",
          "action": "payment_methods_list",
          "readonly": true
        },
        "responses": {
          "200": {
            "description": "Payment methods.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders": {
      "get": {
        "operationId": "orders.list",
        "summary": "List the account's orders",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "orders:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "orders list"
        },
        "x-truo-mcp": {
          "toolset": "orders",
          "action": "list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Orders, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "orders.create",
        "summary": "Order a product",
        "description": "Creates the order in WHMCS and returns an **operation** to follow (`202` + `Location`). If the invoice is settled at once (free, 100 % promo code, or account credit), the order is accepted and provisioning starts: the operation goes `running` → `succeeded` with `result.service` when the service is active (for WordPress, when the site is up). If the invoice needs a payment, the operation stays `pending` with `result.invoice.payment_url` until it is paid; there is no timeout on that. An accepted order that is not active after 30 minutes fails with `provisioning_timeout`.\n\nEverything that can be rejected without touching WHMCS is rejected first: unknown product or cycle, invalid promo code (`invalid_promocode`), taken WordPress site name (`hostname_taken`), bad options.\n\n**`Idempotency-Key` is required**: a retry without it would be a second purchase.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "orders:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-long-running": true,
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "orders create"
        },
        "x-truo-mcp": {
          "toolset": "orders",
          "action": "create",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "**Required.** Retrying with the same key and body returns the original operation (`Idempotent-Replay: true`); a different body is a 409. Stored for 24 h."
            },
            "required": true,
            "name": "idempotency-key",
            "in": "header"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The operation that follows the order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{id}": {
      "get": {
        "operationId": "orders.get",
        "summary": "Get an order",
        "description": "The order, its invoice (if any) and the services it created. An order of another account is a 404.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "orders:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "orders get",
          "positional": [
            "order_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "orders",
          "action": "get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "ord_245"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{id}/cancel": {
      "post": {
        "operationId": "orders.cancel",
        "summary": "Cancel an order or request the cancellation of its services",
        "description": "A `pending` order (unpaid) is voided at once. An `active` order gets a cancellation request per service, which WHMCS executes `immediate`ly or at the `end_of_cycle`. **This call destroys nothing by itself**; backups are kept according to the product policy.",
        "tags": [
          "Orders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "orders:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "orders cancel",
          "positional": [
            "order_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "orders",
          "action": "cancel",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "ord_245"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What was done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCancellation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks": {
      "get": {
        "operationId": "webhooks.list",
        "summary": "List the account's webhooks",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "webhooks list"
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhooks. The secret is never included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "webhooks.create",
        "summary": "Register a webhook",
        "description": "The response includes `secret` **once**. Verify every delivery with it: `Truo-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`, and reject timestamps older than 5 minutes. The URL must be `https` and publicly reachable. Up to 10 webhooks per account.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "webhooks create"
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "create",
          "readonly": false
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The webhook, with its secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}": {
      "get": {
        "operationId": "webhooks.get",
        "summary": "Get a webhook",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "webhooks get",
          "positional": [
            "webhook_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "whk_12"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The webhook, without its secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "webhooks.update",
        "summary": "Update a webhook",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "reversible",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "webhooks update",
          "positional": [
            "webhook_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "update",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "whk_12"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "webhooks.delete",
        "summary": "Delete a webhook",
        "description": "Pending deliveries to it are dropped.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:write",
        "x-truo-rate-bucket": "write",
        "x-truo-danger": "destructive",
        "x-truo-idempotent": true,
        "x-truo-cli": {
          "command": "webhooks delete",
          "positional": [
            "webhook_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "delete",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "whk_12"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: the resource already exists, or the `Idempotency-Key` was reused with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}/rotate-secret": {
      "post": {
        "operationId": "webhooks.rotate_secret",
        "summary": "Rotate a webhook's signing secret",
        "description": "The old secret stops working immediately. Deliveries already in flight were signed with it.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-cli": {
          "command": "webhooks rotate-secret",
          "positional": [
            "webhook_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "rotate_secret",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "whk_12"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The new secret, shown once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}/ping": {
      "post": {
        "operationId": "webhooks.ping",
        "summary": "Send a test event",
        "description": "Queues a `webhook.ping` delivery to this webhook only, regardless of its subscriptions. Follow it in `GET /v1/webhooks/{id}/deliveries`.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-cli": {
          "command": "webhooks ping",
          "positional": [
            "webhook_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "ping",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "whk_12"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "The queued delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}/deliveries": {
      "get": {
        "operationId": "webhooks.deliveries.list",
        "summary": "List a webhook's deliveries",
        "description": "Newest first, with the exact signed body of each. This is where to look when a receiver disagrees.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "webhooks deliveries",
          "positional": [
            "webhook_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "deliveries_list",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "whk_12"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "1–100. Defaults to 25.",
              "example": "25"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor from `next_cursor`."
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Deliveries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}/deliveries/{delivery_id}": {
      "get": {
        "operationId": "webhooks.deliveries.get",
        "summary": "Get a delivery",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:read",
        "x-truo-rate-bucket": "read",
        "x-truo-danger": "none",
        "x-truo-cli": {
          "command": "webhooks delivery",
          "positional": [
            "webhook_id",
            "delivery_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "deliveries_get",
          "readonly": true
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "whk_12"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "dlv_01JQ8X…"
            },
            "required": true,
            "name": "delivery_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver": {
      "post": {
        "operationId": "webhooks.deliveries.redeliver",
        "summary": "Send a delivery again",
        "description": "Re-queues a `delivered` or `failed` delivery with the same body (and a fresh signature).",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-truo-scope": "account:write",
        "x-truo-rate-bucket": "expensive",
        "x-truo-danger": "reversible",
        "x-truo-cli": {
          "command": "webhooks redeliver",
          "positional": [
            "webhook_id",
            "delivery_id"
          ]
        },
        "x-truo-mcp": {
          "toolset": "webhooks",
          "action": "deliveries_redeliver",
          "readonly": false
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "whk_12"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "dlv_01JQ8X…"
            },
            "required": true,
            "name": "delivery_id",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "The re-queued delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The credential is missing, invalid, revoked, or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The credential lacks the required scope or permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist or is not visible to this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Check `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}
