{
    "openapi": "3.0.3",
    "info": {
        "title": "Star8 Server API",
        "description": "Star8 API は、スターレンタルサーバーのサーバーパネルで提供している主要機能を REST API で利用するためのインターフェースです。",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://api.star.ne.jp",
            "description": "Star8"
        }
    ],
    "security": [
        {
            "BearerAuth": [

            ]
        }
    ],
    "paths": {
        "/v1/me": {
            "get": {
                "tags": [
                    "APIキー情報"
                ],
                "summary": "認証中のAPIキー情報を取得",
                "description": "現在認証に使用しているAPIキーの情報を返します。有効期限と、キーに設定された各サービス（server / domain / wphosting）の権限・操作対象を確認できます。\n\n権限・操作対象の正本は services{} です。トップレベルの service_type / servername / permission_type は、旧来型のサーバーAPIキー（server × selected × 1台）でのみ後方互換のため返されます。\n\nservices.server.targets にはサーバー名（初期ドメイン）が入ります。target_mode=all（「すべてのサーバー」）の場合は targets は空配列です。",
                "x-scope": "読み取り",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "expires_at": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "有効期限（YYYY-MM-DD HH:MM:SS形式）。無期限の場合は null"
                                        },
                                        "services": {
                                            "type": "object",
                                            "description": "permission_type=custom 時のみ。カテゴリ名をキーとした権限マップ（full / read / none）",
                                            "properties": {
                                                "domain": {
                                                    "type": "object",
                                                    "properties": {
                                                        "allow_acquisition": {
                                                            "type": "boolean",
                                                            "description": "services.domain にのみ含まれる。ドメイン取得・移管・更新の許可"
                                                        }
                                                    }
                                                },
                                                "server": {
                                                    "type": "object",
                                                    "properties": {
                                                        "allow_signup": {
                                                            "type": "boolean",
                                                            "description": "services.server にのみ含まれる。サーバーの新規お申し込みの許可"
                                                        }
                                                    }
                                                },
                                                "wphosting": {
                                                    "type": "object",
                                                    "properties": {
                                                        "allow_signup": {
                                                            "type": "boolean",
                                                            "description": "services.wphosting にのみ含まれる。新規お申し込みの許可"
                                                        },
                                                        "site_target_mode": {
                                                            "type": "string",
                                                            "description": "services.wphosting にのみ含まれる。サイト操作対象（all / selected）"
                                                        },
                                                        "sites": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "description": "services.wphosting にのみ含まれる。site_target_mode=selected 時のサイト servername 一覧"
                                                        }
                                                    }
                                                }
                                            }
                                        },
                                        "service_type": {
                                            "type": "string",
                                            "description": "【非推奨・後方互換】旧来型サーバー1台キーのみ含まれる。常に server"
                                        },
                                        "servername": {
                                            "type": "string",
                                            "description": "【非推奨・後方互換】旧来型サーバー1台キーのみ含まれる。services.server.targets[0] と同値"
                                        },
                                        "permission_type": {
                                            "type": "string",
                                            "description": "【非推奨・後方互換】旧来型サーバー1台キーのみ含まれる。services.server.permission_type と同値"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/logs": {
            "get": {
                "tags": [
                    "APIキー情報"
                ],
                "summary": "API実行ログを取得",
                "description": "現在認証に使用しているAPIキー自身の実行ログを、新しい順に返します。サーバーのWebアクセスログとは異なり、公開APIへのリクエストのメタデータ（メソッド・パス・ステータスコード・レスポンスタイム・接続元IPアドレス・実行日時）が対象です。リクエストボディとレスポンスボディは含まれません。\n\nログの保持期間は直近90日です。複数のフィルタを指定した場合は、すべての条件に一致するログを返します。count は検索結果の総件数ではなく、今回のレスポンスに含まれる件数です。has_more が true の場合は、next_cursor を次のリクエストの cursor にそのまま指定して続きを取得してください。\n\nこのAPIで取得できるのは、呼び出しに使用したAPIキー自身のログのみです。アカウント内の複数のAPIキーを横断したログは、APIキー管理画面の「実行ログ」で確認してください。APIキーに紐づけられない認証失敗のログは、このAPIの結果には含まれません。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "取得期間の開始日時。この日時以降のログを取得します（YYYY-MM-DD HH:MM:SS形式を推奨）"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "取得期間の終了日時。この日時以前のログを取得します（YYYY-MM-DD HH:MM:SS形式を推奨）"
                        }
                    },
                    {
                        "name": "status_class",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "実行結果。success: ステータスコード400未満 / error: ステータスコード400以上"
                        }
                    },
                    {
                        "name": "status_code",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "HTTPステータスコードの完全一致。status_class と併用できます"
                        }
                    },
                    {
                        "name": "method",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "HTTPメソッドの完全一致（大文字で指定。例: GET / POST / PUT / DELETE）"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "取得件数（1〜500、省略時は50）"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "次のページを取得するためのカーソル。前回レスポンスの next_cursor をそのまま指定してください"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "logs": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "method": {
                                                        "type": "string",
                                                        "description": "実行したHTTPメソッド"
                                                    },
                                                    "path": {
                                                        "type": "string",
                                                        "description": "実行したAPIのパス"
                                                    },
                                                    "status_code": {
                                                        "type": "integer",
                                                        "description": "HTTPステータスコード"
                                                    },
                                                    "response_time_ms": {
                                                        "type": "integer",
                                                        "nullable": true,
                                                        "description": "レスポンスタイム（ミリ秒）。記録されていない場合は null"
                                                    },
                                                    "ip_address": {
                                                        "type": "string",
                                                        "description": "APIを実行した接続元IPアドレス"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "description": "実行日時（YYYY-MM-DD HH:MM:SS、日本時間）"
                                                    }
                                                }
                                            }
                                        },
                                        "count": {
                                            "type": "integer",
                                            "description": "今回のレスポンスに含まれるログ件数（検索結果の総件数ではありません）"
                                        },
                                        "limit": {
                                            "type": "integer",
                                            "description": "適用された取得件数"
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "続きのログがある場合は true"
                                        },
                                        "next_cursor": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "次のページを取得するためのカーソル。続きがない場合は null"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "クエリパラメータの検証エラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/plans": {
            "get": {
                "tags": [
                    "新規お申し込み"
                ],
                "summary": "お申し込み可能なプラン・料金を取得",
                "description": "APIからお申し込み可能なプランと、契約期間ごとの料金（税込）の一覧を返します。\n\nご利用には、APIキー設定で「このAPIキーでサーバーの新規お申し込みを行う」を有効にする必要があります。\n\n新規お申し込みAPIの expected_total_price には、このAPIが返した対象プラン・契約期間の total_price（キャンペーン適用後の実際のお支払い額）を指定してください。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "plan_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "取得するプランを指定します。カンマ区切りで複数指定できます。未指定の場合は全プランを返します"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "plans": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "plan_id": {
                                                        "type": "string",
                                                        "description": "プランID。新規お申し込みAPIの plan_id に指定します"
                                                    },
                                                    "plan_name": {
                                                        "type": "string",
                                                        "description": "プラン名"
                                                    },
                                                    "periods": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "months": {
                                                                    "type": "integer",
                                                                    "description": "契約期間（月数）"
                                                                },
                                                                "total_price": {
                                                                    "type": "integer",
                                                                    "description": "契約期間分の合計金額（税込・円・キャンペーン適用後の実際のお支払い額）"
                                                                },
                                                                "regular_total_price": {
                                                                    "type": "integer",
                                                                    "description": "契約期間分の通常価格（税込・円・キャンペーン適用前）。キャンペーン適用がない場合は total_price と同額"
                                                                },
                                                                "campaign_applied": {
                                                                    "type": "boolean",
                                                                    "description": "キャンペーン価格が適用されているか"
                                                                }
                                                            }
                                                        }
                                                    },
                                                    "currency": {
                                                        "type": "string",
                                                        "description": "通貨（JPY）"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server": {
            "post": {
                "tags": [
                    "新規お申し込み"
                ],
                "summary": "サーバーを新規お申し込み",
                "description": "サーバーの新規契約をお申し込みます。料金はプリペイド残高から引き落とされ、無料お試し期間なしの本契約となります。残高が不足している場合は PAYMENT_REQUIRED エラーになります。\n\nご利用には、APIキー設定で「このAPIキーでサーバーの新規お申し込みを行う」を有効にする必要があります。設定時には20,000円以上のプリペイド残高が必要です。「指定のサーバーのみ」のAPIキーからは利用できません。新規アカウントの作成には対応していません。\n\n実申請前に dry_run=true で料金とお申し込み内容を確認してください。実申請には Idempotency-Key が必要です。安全な実行と再申請については、ページ上部の「新規申込の安全な実行」を参照してください。\n\n成功時はお申し込みした契約情報を server に返します。status が setup_pending の場合もお申し込みとお支払いは完了しており、その後の状況はお申し込み状況確認APIで確認できます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）。dry_run=true の場合も送信できます",
                        "schema": {
                            "type": "string",
                            "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）。dry_run=true の場合も送信できます",
                            "example": "550e8400-e29b-41d4-a716-446655440000",
                            "minLength": 8,
                            "maxLength": 64,
                            "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "x-required-when": "dry_run=false"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "plan_id": {
                                        "type": "string",
                                        "description": "プランID。プラン・料金取得APIが返した plan_id を指定します",
                                        "example": "standard",
                                        "maxLength": 64
                                    },
                                    "period": {
                                        "type": "integer",
                                        "description": "契約期間（月数）。プラン・料金取得APIが返した months から指定します",
                                        "example": 12,
                                        "minimum": 1,
                                        "maximum": 60
                                    },
                                    "server_id": {
                                        "type": "string",
                                        "description": "希望するサーバーID。3〜12文字で、小文字の英字で始まる小文字英数字のみ。省略時は自動で割り当てられます。指定したIDが利用できない場合はエラーになります",
                                        "minLength": 3,
                                        "maxLength": 12,
                                        "pattern": "^[a-z][a-z0-9]+$"
                                    },
                                    "expected_total_price": {
                                        "type": "integer",
                                        "description": "合計金額（税込・円・キャンペーン適用後）。プラン・料金取得APIが返した total_price を指定します。現在価格と一致しない場合はエラー（PRICE_MISMATCH）になります",
                                        "example": 11880,
                                        "minimum": 0
                                    },
                                    "agree_to_terms": {
                                        "type": "boolean",
                                        "description": "「利用規約・個人情報の取り扱い」を確認し、同意した場合に true を指定してください（true 必須）",
                                        "example": true,
                                        "enum": [
                                            true
                                        ]
                                    },
                                    "partner_code": {
                                        "type": "string",
                                        "description": "お取次店コード（半角英数50文字以内）。パートナー（お取次店）経由のお申し込みの場合に指定します",
                                        "maxLength": 50,
                                        "pattern": "^[A-Za-z0-9]*$"
                                    },
                                    "auto_renew": {
                                        "type": "boolean",
                                        "description": "自動更新の設定（省略時は true）。true でプリペイドからの自動引き落としが有効になります。更新時に残高が不足すると設定が解除され、メールで通知されます。プリペイド残高が0円の間は会員管理画面の「自動更新設定」に契約が表示されませんが、設定自体は維持されます"
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "description": "true の場合、課金・契約作成を行わずに実行可否のみ検証。省略時は false（実申請）",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "plan_id",
                                    "period",
                                    "expected_total_price",
                                    "agree_to_terms"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK（実申請とdry_runでレスポンス形式が異なります）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "oneOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "server": {
                                                    "type": "object",
                                                    "properties": {
                                                        "server_id": {
                                                            "type": "string",
                                                            "description": "サーバーID"
                                                        },
                                                        "servername": {
                                                            "type": "string",
                                                            "description": "サーバー名（初期ドメイン）。各サーバー管理APIの {servername} に指定します"
                                                        },
                                                        "plan_id": {
                                                            "type": "string",
                                                            "description": "プランID"
                                                        },
                                                        "period": {
                                                            "type": "integer",
                                                            "description": "契約期間（月数）"
                                                        },
                                                        "status": {
                                                            "type": "string",
                                                            "description": "サーバーの状態。active: 利用可能 / setup_pending: サーバー設定処理中。setup_pending の場合は、お申し込み状況確認APIで設定状況を確認できます"
                                                        },
                                                        "expiry_date": {
                                                            "type": "string",
                                                            "nullable": true,
                                                            "description": "契約の有効期限（YYYY-MM-DD）。setup_pending の間は null"
                                                        },
                                                        "auto_renew": {
                                                            "type": "boolean",
                                                            "description": "自動更新設定の有無"
                                                        }
                                                    }
                                                }
                                            }
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "dry_run": {
                                                    "type": "boolean",
                                                    "description": "dry run であることを示す値（true）"
                                                },
                                                "total_price": {
                                                    "type": "integer",
                                                    "description": "実申請時の合計金額（税込・円）"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバーIDの重複（SERVER_ID_TAKEN）・処理中の重複リクエスト（DUPLICATE_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "価格不一致（PRICE_MISMATCH）・お申し込み対象外のプラン/期間（PLAN_NOT_AVAILABLE）・入力値/Idempotency-Key の検証エラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "プリペイド残高不足（PAYMENT_REQUIRED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "サーバー契約管理"
                ],
                "summary": "サーバー契約の一覧を取得",
                "description": "アカウントのサーバー契約の一覧を返します。\n\n会員管理画面に表示される契約が対象です。解約済みでも利用期限内でサーバーが利用可能な契約は一覧に含まれます。\n\nAPIキーの操作範囲が「指定のサーバーのみ」の場合は、対象に設定されたサーバーのみ返します。",
                "x-scope": "読み取り",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servers": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "servername": {
                                                        "type": "string",
                                                        "description": "サーバー名（初期ドメイン）。各サーバー管理APIの {servername} に指定します"
                                                    },
                                                    "server_id": {
                                                        "type": "string",
                                                        "description": "サーバーID"
                                                    },
                                                    "plan_id": {
                                                        "type": "string",
                                                        "description": "プランID"
                                                    },
                                                    "plan_name": {
                                                        "type": "string",
                                                        "description": "プラン名"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "サーバーの状態。active: 利用可能 / setup_pending: サーバー設定処理中 / suspended: 凍結中"
                                                    },
                                                    "expiry_date": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "契約の有効期限（YYYY-MM-DD）。setup_pending の間は null"
                                                    },
                                                    "auto_renew": {
                                                        "type": "boolean",
                                                        "description": "自動更新設定の有無"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "メモ。未設定の場合は空文字"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/signup-status": {
            "get": {
                "tags": [
                    "新規お申し込み"
                ],
                "summary": "お申し込み状況を確認",
                "description": "お申し込み後のサーバー設定状況を返します。新規お申し込みAPIのレスポンスの status が setup_pending だった場合の確認先です。\n\nご利用には、APIキー設定で「このAPIキーでサーバーの新規お申し込みを行う」を有効にする必要があります。\n\nsetup_pending は通常自動で解消され、active になるとサーバーを利用できます。凍結された場合は suspended を返します。長時間 setup_pending のまま解消されない場合は、サポートまでお問い合わせください。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "新規お申し込みAPIのレスポンスで返されたサーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servername": {
                                            "type": "string",
                                            "description": "サーバー名（初期ドメイン）"
                                        },
                                        "server_id": {
                                            "type": "string",
                                            "description": "サーバーID"
                                        },
                                        "plan_id": {
                                            "type": "string",
                                            "description": "プランID"
                                        },
                                        "status": {
                                            "type": "string",
                                            "description": "サーバーの状態。active: 利用可能 / setup_pending: サーバー設定処理中 / suspended: 凍結中"
                                        },
                                        "expiry_date": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "契約の有効期限（YYYY-MM-DD）。setup_pending の間は null"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/memo": {
            "get": {
                "tags": [
                    "サーバー契約管理"
                ],
                "summary": "メモを取得",
                "description": "サーバー契約に設定したメモを返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servername": {
                                            "type": "string",
                                            "description": "サーバー名（初期ドメイン）"
                                        },
                                        "memo": {
                                            "type": "string",
                                            "description": "メモ。未設定の場合は空文字"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "サーバー契約管理"
                ],
                "summary": "メモを更新",
                "description": "サーバー契約のメモを更新します。契約管理画面のサーバー一覧に表示されるメモと同一です。空文字を指定するとメモを削除します。絵文字など、eucJP-winで表現できない文字は使用できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（最大500文字）。空文字で削除。絵文字など、eucJP-winで表現できない文字は使用できません",
                                        "example": "制作会社A案件",
                                        "maxLength": 500
                                    }
                                },
                                "required": [
                                    "memo"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servername": {
                                            "type": "string",
                                            "description": "サーバー名（初期ドメイン）"
                                        },
                                        "memo": {
                                            "type": "string",
                                            "description": "更新後のメモ"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/server-info": {
            "get": {
                "tags": [
                    "サーバー情報"
                ],
                "summary": "サーバー情報を取得",
                "description": "サーバーのスペック・ソフトウェアバージョン・ネームサーバーなどの基本情報を返します。サーバーパネルの「サーバー情報」画面に相当します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "server_id": {
                                            "type": "string",
                                            "description": "サーバーID（例: ss123456）"
                                        },
                                        "hostname": {
                                            "type": "string",
                                            "description": "ホスト名（例: sv12345.star.ne.jp）"
                                        },
                                        "ip_address": {
                                            "type": "string",
                                            "description": "IPアドレス"
                                        },
                                        "os": {
                                            "type": "string",
                                            "description": "OS名（例: Linux）"
                                        },
                                        "cpu": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "CPU情報。XServerビジネスのサブアカウントでは null"
                                        },
                                        "memory": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "メモリ容量（例: 1024GB）。XServerビジネスのサブアカウントでは null"
                                        },
                                        "apache_version": {
                                            "type": "string",
                                            "description": "Apacheバージョン（パッチ番号は x 表記。例: 2.4.x）"
                                        },
                                        "perl_versions": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "利用可能なPerlバージョンの配列"
                                        },
                                        "php_versions": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "利用可能なPHPバージョンの配列（PHP8→PHP7→PHP5→PHP4 の順）"
                                        },
                                        "db_versions": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "利用可能なDB製品＋バージョンの配列。先頭が mysql または mariadb（例: mariadb10.5.x）"
                                        },
                                        "name_servers": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "ネームサーバーの配列（通常 ns1〜ns5）"
                                        },
                                        "domain_validation_token": {
                                            "type": "string",
                                            "description": "ドメイン追加時の所有権確認用トークン。_xserver-verify.{domain} の TXT レコードに xserver-verify={token} を設定して使用する"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/server-info/usage": {
            "get": {
                "tags": [
                    "サーバー情報"
                ],
                "summary": "サーバー利用状況を取得",
                "description": "ディスク使用量・ファイル数・各種設定件数を返します。サーバーパネルのトップページに表示される利用状況に相当します。ディスク容量はサーバーパネルと同じ基準（MB を 1000 で除算した小数2桁）で GB 換算した値を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "disk": {
                                            "type": "object",
                                            "properties": {
                                                "quota_gb": {
                                                    "type": "number",
                                                    "description": "ディスク容量の上限（GB、小数2桁）"
                                                },
                                                "used_gb": {
                                                    "type": "number",
                                                    "description": "ディスク使用量（GB、小数2桁）"
                                                },
                                                "file_limit": {
                                                    "type": "integer",
                                                    "description": "ファイル数の上限（プランにより 0 の場合は無制限）"
                                                },
                                                "file_count": {
                                                    "type": "integer",
                                                    "description": "現在のファイル数"
                                                }
                                            }
                                        },
                                        "counts": {
                                            "type": "object",
                                            "properties": {
                                                "domains": {
                                                    "type": "integer",
                                                    "description": "ドメイン設定数（初期ドメインを除く）"
                                                },
                                                "subdomains": {
                                                    "type": "integer",
                                                    "description": "サブドメイン設定数"
                                                },
                                                "mail_accounts": {
                                                    "type": "integer",
                                                    "description": "メールアカウント数"
                                                },
                                                "ftp_accounts": {
                                                    "type": "integer",
                                                    "description": "FTPアカウント数（メインアカウントを除く追加分）"
                                                },
                                                "mysql_databases": {
                                                    "type": "integer",
                                                    "description": "MySQLデータベース数"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/auto-backup/backup-dates": {
            "get": {
                "tags": [
                    "自動バックアップの取得・復元"
                ],
                "summary": "選択可能なバックアップ日一覧を取得",
                "description": "取得・復元の申込で指定できる backup_date の候補を返します。通常14日分ですが、サーバーによっては7日分のみの場合があります。backup_dates[].available はその日のバックアップデータが存在するかを示します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "backup_dates": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "date": {
                                                        "type": "string",
                                                        "description": "バックアップ日（Y-m-d）"
                                                    },
                                                    "available": {
                                                        "type": "boolean",
                                                        "description": "その日のバックアップデータが存在するか（日次バックアップ成功日）"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/auto-backup": {
            "post": {
                "tags": [
                    "自動バックアップの取得・復元"
                ],
                "summary": "自動バックアップの取得または復元を申し込む",
                "description": "指定したバックアップ日のデータ取得（operation_type=fetch）または復元（operation_type=restore）を非同期で申し込みます。レスポンスは申込受付のみです。進捗は GET /auto-backup/{request_id} をポーリングし、status が succeeded または failed になるまで確認してください。operation_type=restore はサーバー上のデータを上書きする破壊的操作であり、取り消しできません。operation_type=fetch は userbackup 配下へバックアップデータを配置します。完了後は FTP 等で取得してください。利用できない backup_date や処理中の申込がある場合は 409（OPERATION_ERROR）を返します。scope=selected のときは domain_elements の指定が必須です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "backup_date": {
                                        "type": "string",
                                        "description": "対象バックアップ日（Y-m-d。GET /auto-backup/backup-dates で available=true の日）",
                                        "example": "2026-06-01"
                                    },
                                    "operation_type": {
                                        "type": "string",
                                        "description": "処理種別。fetch: データ取得 / restore: 復元",
                                        "example": "fetch"
                                    },
                                    "scope": {
                                        "type": "string",
                                        "description": "処理方法。all: サーバー領域全体 / selected: 対象ドメイン・種別を指定",
                                        "example": "all"
                                    },
                                    "domain_elements": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "domain": {
                                                    "type": "string",
                                                    "description": "契約ドメイン。scope=selected のとき domain_elements を1件以上指定（最大10ドメイン）",
                                                    "example": "example.com"
                                                },
                                                "elements": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "description": "対象種別。web: 公開フォルダ / setting: Web用設定ファイル / mail: メール",
                                                    "example": [
                                                        "web",
                                                        "setting"
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "backup_date",
                                    "operation_type",
                                    "scope"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "request_id": {
                                            "type": "integer",
                                            "description": "申込ID（正の整数。履歴詳細・状態確認に使用）"
                                        },
                                        "request_date": {
                                            "type": "string",
                                            "description": "申込日時"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "自動バックアップの取得・復元"
                ],
                "summary": "自動バックアップ申込履歴一覧を取得",
                "description": "過去の取得・復元申込の履歴を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "requests": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "request_id": {
                                                        "type": "integer",
                                                        "description": "申込ID（正の整数）"
                                                    },
                                                    "request_date": {
                                                        "type": "string",
                                                        "description": "申込日時"
                                                    },
                                                    "backup_date": {
                                                        "type": "string",
                                                        "description": "対象バックアップ日（Y-m-d）"
                                                    },
                                                    "operation_type": {
                                                        "type": "string",
                                                        "description": "fetch または restore"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "pending / running / succeeded / failed"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/auto-backup/{request_id}": {
            "get": {
                "tags": [
                    "自動バックアップの取得・復元"
                ],
                "summary": "自動バックアップ申込履歴の詳細を取得",
                "description": "指定した申込の詳細を返します。申込後の進捗確認に使用してください。存在しない申込IDは 404（NOT_FOUND）を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "request_id",
                        "in": "path",
                        "required": true,
                        "description": "申込ID（正の整数。POST /auto-backup または履歴一覧で得られる request_id）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "request_id": {
                                            "type": "integer",
                                            "description": "申込ID（正の整数）"
                                        },
                                        "request_date": {
                                            "type": "string",
                                            "description": "申込日時"
                                        },
                                        "backup_date": {
                                            "type": "string",
                                            "description": "対象バックアップ日（Y-m-d）"
                                        },
                                        "operation_type": {
                                            "type": "string",
                                            "description": "fetch または restore"
                                        },
                                        "scope": {
                                            "type": "string",
                                            "description": "all または selected"
                                        },
                                        "status": {
                                            "type": "string",
                                            "description": "pending / running / succeeded / failed"
                                        },
                                        "ended_at": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "終了日時（succeeded 時）"
                                        },
                                        "output_path": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "取得先パス（operation_type=fetch 時。未設定時は null）。配置データは24時間経過で自動削除されます"
                                        },
                                        "failure_reason": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "失敗理由（status=failed 時）。insufficient_disk_space: 空き容量不足 / backup_not_found: バックアップ不存在 / fetch_failed: 取得失敗（operation_type=fetch 時） / restore_failed: 復元失敗（operation_type=restore 時） / quota_exceeded: クォータ超過 / server_copy_failed: サーバー側コピー失敗 / infrastructure_error: 基盤エラー / processing_aborted: 処理中断 / processing_failed: その他の処理失敗"
                                        },
                                        "required_free_gb": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "必要空き容量GB（failure_reason=insufficient_disk_space 時）"
                                        },
                                        "domain_elements": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "契約ドメイン"
                                                    },
                                                    "elements": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "description": "対象種別。web: 公開フォルダ / setting: Web用設定ファイル / mail: メール"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/cron": {
            "get": {
                "tags": [
                    "Cron設定"
                ],
                "summary": "Cron一覧を取得",
                "description": "登録済みのCron設定を一覧で返します。各要素の id は PUT/DELETE で指定するハッシュIDです。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "crons": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "description": "CronのハッシュID（PUT/DELETEで使用）"
                                                    },
                                                    "minute": {
                                                        "type": "string",
                                                        "description": "分（0-59, */5 等）"
                                                    },
                                                    "hour": {
                                                        "type": "string",
                                                        "description": "時（0-23, * 等）"
                                                    },
                                                    "day": {
                                                        "type": "string",
                                                        "description": "日（1-31, * 等）"
                                                    },
                                                    "month": {
                                                        "type": "string",
                                                        "description": "月（1-12, * 等）"
                                                    },
                                                    "weekday": {
                                                        "type": "string",
                                                        "description": "曜日（0-7, * 等）"
                                                    },
                                                    "command": {
                                                        "type": "string",
                                                        "description": "実行コマンド"
                                                    },
                                                    "comment": {
                                                        "type": "string",
                                                        "description": "コメント"
                                                    },
                                                    "enabled": {
                                                        "type": "boolean",
                                                        "description": "有効/無効"
                                                    }
                                                }
                                            }
                                        },
                                        "notification_email": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "Cron実行結果の通知先メールアドレス（未設定時は null）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Cron設定"
                ],
                "summary": "Cronを新規追加",
                "description": "新しいCron設定を追加します。レスポンスの id は後続の PUT・DELETE で使用します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "minute": {
                                        "type": "string",
                                        "description": "分（0-59, */5 等）",
                                        "example": "*/5"
                                    },
                                    "hour": {
                                        "type": "string",
                                        "description": "時（0-23, * 等）",
                                        "example": "*"
                                    },
                                    "day": {
                                        "type": "string",
                                        "description": "日（1-31, * 等）",
                                        "example": "*"
                                    },
                                    "month": {
                                        "type": "string",
                                        "description": "月（1-12, * 等）",
                                        "example": "*"
                                    },
                                    "weekday": {
                                        "type": "string",
                                        "description": "曜日（0-7, * 等）",
                                        "example": "*"
                                    },
                                    "command": {
                                        "type": "string",
                                        "description": "実行コマンド（最大1024文字）",
                                        "example": "/usr/bin/php /home/user/cron.php"
                                    },
                                    "comment": {
                                        "type": "string",
                                        "description": "コメント",
                                        "example": "5分毎のバッチ"
                                    }
                                },
                                "required": [
                                    "minute",
                                    "hour",
                                    "day",
                                    "month",
                                    "weekday",
                                    "command"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "description": "追加されたCronのハッシュID"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/cron/{cron_id}": {
            "put": {
                "tags": [
                    "Cron設定"
                ],
                "summary": "Cronを変更",
                "description": "既存のCron設定を変更します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。スケジュール・コマンド・コメントなどの内容を変更すると id が変わります。後続の PUT/DELETE ではレスポンスの新しい id を使用してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "cron_id",
                        "in": "path",
                        "required": true,
                        "description": "CronのハッシュID（一覧取得で得られる id）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "minute": {
                                        "type": "string",
                                        "description": "分",
                                        "example": "0"
                                    },
                                    "hour": {
                                        "type": "string",
                                        "description": "時",
                                        "example": "3"
                                    },
                                    "day": {
                                        "type": "string",
                                        "description": "日",
                                        "example": "*"
                                    },
                                    "month": {
                                        "type": "string",
                                        "description": "月",
                                        "example": "*"
                                    },
                                    "weekday": {
                                        "type": "string",
                                        "description": "曜日",
                                        "example": "*"
                                    },
                                    "command": {
                                        "type": "string",
                                        "description": "実行コマンド",
                                        "example": "/usr/bin/php /home/user/cron.php"
                                    },
                                    "comment": {
                                        "type": "string",
                                        "description": "コメント",
                                        "example": "毎日3時のバッチ"
                                    },
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "有効/無効（デフォルト: true）",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "description": "変更したCronのハッシュID"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Cron設定"
                ],
                "summary": "Cronを削除",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "cron_id",
                        "in": "path",
                        "required": true,
                        "description": "CronのハッシュID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/ssh": {
            "get": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH設定を取得",
                "description": "SSH接続の有効/無効、国外アクセス制限の状態、接続情報、登録済み公開鍵数を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ssh_enabled": {
                                            "type": "boolean",
                                            "description": "SSH接続が有効かどうか"
                                        },
                                        "abroad_access_restriction": {
                                            "type": "boolean",
                                            "description": "SSH接続の国外アクセス制限の有効/無効"
                                        },
                                        "connection_info": {
                                            "type": "object",
                                            "properties": {
                                                "host": {
                                                    "type": "string",
                                                    "description": "接続先ホスト名"
                                                },
                                                "port": {
                                                    "type": "integer",
                                                    "description": "接続ポート"
                                                },
                                                "username": {
                                                    "type": "string",
                                                    "description": "ユーザー名"
                                                },
                                                "auth_method": {
                                                    "type": "string",
                                                    "description": "認証方式（publickey）"
                                                }
                                            }
                                        },
                                        "key_count": {
                                            "type": "integer",
                                            "description": "登録済み公開鍵数"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH設定を変更",
                "description": "SSH接続の有効/無効、国外アクセス制限の有効/無効を変更します。変更したいフィールドのみ送信してください。SSH公開鍵の登録・更新・削除の結果によっては、SSH接続および国外アクセス制限が自動で有効/無効される場合があります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "ssh_enabled": {
                                        "type": "boolean",
                                        "description": "SSH接続の有効/無効",
                                        "example": true
                                    },
                                    "abroad_access_restriction": {
                                        "type": "boolean",
                                        "description": "国外アクセス制限の有効/無効",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ssh_enabled": {
                                            "type": "boolean",
                                            "description": "変更後のSSH接続状態（送信時のみ）"
                                        },
                                        "abroad_access_restriction": {
                                            "type": "boolean",
                                            "description": "変更後の国外制限状態（送信時のみ）"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/ssh/key": {
            "get": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH公開鍵一覧を取得",
                "description": "登録済みSSH公開鍵の一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "keys": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "公開鍵ID"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "description": "ラベル"
                                                    },
                                                    "public_key": {
                                                        "type": "string",
                                                        "description": "公開鍵"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "ステータス（on/off）"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "description": "登録日時"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH公開鍵を登録",
                "description": "公開鍵を手動で登録するか、generate: true でサーバー側で鍵ペアを自動生成します。自動生成時は秘密鍵がレスポンスに含まれます（発行時の1回のみ）。公開鍵が最初に登録される場合は、SSH接続および国外アクセス制限が自動で有効になります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "ラベル（1〜500文字）",
                                        "example": "デプロイ用"
                                    },
                                    "public_key": {
                                        "type": "string",
                                        "description": "公開鍵（手動登録時。OpenSSH形式）",
                                        "example": "ssh-ed25519 AAAA..."
                                    },
                                    "generate": {
                                        "type": "boolean",
                                        "description": "サーバー側で鍵ペアを自動生成するか（デフォルト: false）",
                                        "example": true
                                    },
                                    "passphrase": {
                                        "type": "string",
                                        "description": "パスフレーズ（自動生成時のみ。6〜32文字）"
                                    }
                                },
                                "required": [
                                    "label"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "description": "公開鍵ID"
                                        },
                                        "label": {
                                            "type": "string",
                                            "description": "ラベル"
                                        },
                                        "public_key": {
                                            "type": "string",
                                            "description": "公開鍵"
                                        },
                                        "status": {
                                            "type": "string",
                                            "description": "ステータス"
                                        },
                                        "private_key": {
                                            "type": "string",
                                            "description": "秘密鍵（自動生成時のみ、発行時の1回だけ返却）"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/ssh/key/{key_id}": {
            "put": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH公開鍵を更新",
                "description": "ラベルやステータス（on/off）を変更します。変更したいフィールドのみ送信してください。ステータスの変更により、公開鍵が有効になる一つ目の場合は SSH接続および国外アクセス制限が自動で有効になります。有効な公開鍵が0件になる場合は SSH接続および国外アクセス制限が自動で無効になります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "key_id",
                        "in": "path",
                        "required": true,
                        "description": "公開鍵ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "ラベル",
                                        "example": "本番用"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "ステータス（on/off）",
                                        "example": "off"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "description": "公開鍵ID"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH公開鍵を削除",
                "description": "指定したSSH公開鍵を削除します。公開鍵がすべて削除されて有効な公開鍵が0件になる場合は、SSH接続および国外アクセス制限が自動で無効になります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "key_id",
                        "in": "path",
                        "required": true,
                        "description": "公開鍵ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "description": "公開鍵ID"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/resource-monitor": {
            "get": {
                "tags": [
                    "リソースモニター"
                ],
                "summary": "指定日のCPU・メモリ・転送量時系列を取得",
                "description": "指定日の CPU・メモリ・転送量を5分刻みの時系列で返します。date は当日を含む直近1か月以内のみ指定できます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "対象日（Y-m-d または Ymd。当日含む直近1か月）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "available": {
                                            "type": "boolean",
                                            "description": "リソースモニターが利用可能かどうか（成功時は常に true。非対応契約は409）"
                                        },
                                        "date": {
                                            "type": "string",
                                            "description": "対象日（Y-m-d）"
                                        },
                                        "cpu": {
                                            "type": "object",
                                            "properties": {
                                                "unit": {
                                                    "type": "string",
                                                    "description": "単位。cores（使用量）または percent（使用率）"
                                                },
                                                "datas": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "number",
                                                            "nullable": true
                                                        }
                                                    },
                                                    "description": "5分刻み時系列の配列。各要素は [ミリ秒UNIX時刻, 値|null]。起点は対象日 00:00:00（Asia/Tokyo）"
                                                }
                                            }
                                        },
                                        "memory": {
                                            "type": "object",
                                            "properties": {
                                                "unit": {
                                                    "type": "string",
                                                    "description": "単位。GB（使用量）または percent（使用率）"
                                                },
                                                "datas": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "number",
                                                            "nullable": true
                                                        }
                                                    },
                                                    "description": "5分刻み時系列の配列。各要素は [ミリ秒UNIX時刻, 値|null]。起点は対象日 00:00:00（Asia/Tokyo）"
                                                }
                                            }
                                        },
                                        "traffic": {
                                            "type": "object",
                                            "properties": {
                                                "unit": {
                                                    "type": "string",
                                                    "description": "単位（GB）"
                                                },
                                                "datas": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "number",
                                                            "nullable": true
                                                        }
                                                    },
                                                    "description": "5分刻み累積転送量（GB）の配列。各要素は [ミリ秒UNIX時刻, 累積転送量|null]。起点は対象日 00:00:00（Asia/Tokyo）"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/url-redirect": {
            "get": {
                "tags": [
                    "サイト転送設定"
                ],
                "summary": "サイト転送設定一覧を取得",
                "description": "サイト転送設定の一覧を返します。domain を指定すると、そのドメインの設定のみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "url_redirects": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "description": "サイト転送設定のID（DELETEで使用）"
                                                    },
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "契約ドメイン"
                                                    },
                                                    "from_host": {
                                                        "type": "string",
                                                        "description": "転送元ホスト（FQDN）"
                                                    },
                                                    "from_path": {
                                                        "type": "string",
                                                        "description": "転送元パス"
                                                    },
                                                    "redirect_to_url": {
                                                        "type": "string",
                                                        "description": "転送先URL"
                                                    },
                                                    "status_code": {
                                                        "type": "integer",
                                                        "description": "リダイレクト時のステータスコード。301: 恒久的 / 302: 一時的"
                                                    },
                                                    "decoded_from_host": {
                                                        "type": "string",
                                                        "description": "転送元ホストの Unicode 表記（Punycode の場合のみ）"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "サイト転送設定"
                ],
                "summary": "サイト転送設定を追加",
                "description": "サイト転送設定を追加します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "契約ドメイン（最大253文字。日本語ドメインの場合はPunycodeで指定）",
                                        "example": "example.com"
                                    },
                                    "from_host": {
                                        "type": "string",
                                        "description": "転送元ホスト（FQDN。契約ドメインまたはサブドメイン）",
                                        "example": "example.com"
                                    },
                                    "from_path": {
                                        "type": "string",
                                        "description": "転送元パス（英数字・記号のみ）",
                                        "example": "/old-path"
                                    },
                                    "redirect_to_url": {
                                        "type": "string",
                                        "description": "転送先URL（http または https）",
                                        "example": "https://example.com/new-path"
                                    },
                                    "status_code": {
                                        "type": "integer",
                                        "description": "リダイレクト時のステータスコード。301: 恒久的 / 302: 一時的",
                                        "example": "301"
                                    }
                                },
                                "required": [
                                    "domain",
                                    "from_host",
                                    "redirect_to_url",
                                    "status_code"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "description": "追加されたサイト転送設定のID"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/url-redirect/{redirect_id}": {
            "delete": {
                "tags": [
                    "サイト転送設定"
                ],
                "summary": "サイト転送設定を削除",
                "description": "redirect_id で指定したサイト転送設定を削除します。id は GET または POST のレスポンスで得られる ID です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "redirect_id",
                        "in": "path",
                        "required": true,
                        "description": "サイト転送設定のID（一覧取得または追加で得られる id）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/access-deny": {
            "get": {
                "tags": [
                    "アクセス拒否設定"
                ],
                "summary": "アクセス拒否設定一覧を取得",
                "description": "アクセス拒否設定の一覧を返します。domain を指定すると、そのドメインの設定のみに絞り込めます。サーバーキャッシュが有効なドメインでは、拒否設定が反映されない場合があります。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "access_denies": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "description": "アクセス拒否設定のID（PUT / DELETEで使用）"
                                                    },
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "契約ドメイン"
                                                    },
                                                    "ip_address": {
                                                        "type": "string",
                                                        "description": "拒否IPアドレス・ホスト（IPv4 / CIDR / 部分IP / ホスト名）"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "メモ"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "アクセス拒否設定"
                ],
                "summary": "アクセス拒否設定を追加",
                "description": "指定ドメインにアクセス拒否設定を追加します。同一 IP/ホストの重複追加は 409 です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "契約ドメイン（最大253文字。日本語ドメインの場合はPunycodeで指定）",
                                        "example": "example.com"
                                    },
                                    "ip_address": {
                                        "type": "string",
                                        "description": "拒否IPアドレス・ホスト（IPv4 / CIDR / 部分IP / ホスト名）",
                                        "example": "192.168.1.1"
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（最大500文字）",
                                        "example": "社内テスト用"
                                    }
                                },
                                "required": [
                                    "domain",
                                    "ip_address"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "description": "追加されたアクセス拒否設定のID"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/access-deny/{deny_id}": {
            "put": {
                "tags": [
                    "アクセス拒否設定"
                ],
                "summary": "アクセス拒否設定のメモを更新",
                "description": "指定したアクセス拒否設定のメモのみを更新します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "deny_id",
                        "in": "path",
                        "required": true,
                        "description": "アクセス拒否設定のID（一覧取得または追加で得られる id）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（最大500文字。省略または空文字でクリア）",
                                        "example": "更新メモ"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "アクセス拒否設定"
                ],
                "summary": "アクセス拒否設定を削除",
                "description": "指定したアクセス拒否設定を削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "deny_id",
                        "in": "path",
                        "required": true,
                        "description": "アクセス拒否設定のID（一覧取得または追加で得られる id）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/xpagespeed": {
            "get": {
                "tags": [
                    "XPageSpeed設定"
                ],
                "summary": "XPageSpeed設定一覧を取得",
                "description": "契約ドメインごとの XPageSpeed 設定を返します。domain を指定すると、そのドメインの設定のみに絞り込めます。※ 本機能はスターレンタルサーバー（ビジネスプラン）では利用できません。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "xpagespeed_settings": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン名"
                                                    },
                                                    "settings": {
                                                        "type": "object",
                                                        "properties": {
                                                            "xoptimize_images": {
                                                                "type": "boolean",
                                                                "description": "画像最適化の有効/無効"
                                                            },
                                                            "lazyload_images": {
                                                                "type": "boolean",
                                                                "description": "画像遅延読み込みの有効/無効"
                                                            },
                                                            "xoptimize_css": {
                                                                "type": "boolean",
                                                                "description": "CSS最適化の有効/無効"
                                                            },
                                                            "lazyload_css": {
                                                                "type": "boolean",
                                                                "description": "CSS遅延読み込みの有効/無効"
                                                            },
                                                            "xoptimize_javascript": {
                                                                "type": "boolean",
                                                                "description": "JavaScript最適化の有効/無効"
                                                            },
                                                            "lazyload_javascript": {
                                                                "type": "boolean",
                                                                "description": "JavaScript遅延読み込みの有効/無効"
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/xpagespeed/{domain}": {
            "put": {
                "tags": [
                    "XPageSpeed設定"
                ],
                "summary": "XPageSpeedの最適化機能を変更",
                "description": "指定ドメインの XPageSpeed 最適化機能を1件ずつ変更します。body には変更する機能のキーを1つだけ指定してください。※ 本機能はスターレンタルサーバー（ビジネスプラン）では利用できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "xoptimize_images": {
                                        "type": "boolean",
                                        "description": "画像最適化の有効/無効",
                                        "example": true
                                    },
                                    "lazyload_images": {
                                        "type": "boolean",
                                        "description": "画像遅延読み込みの有効/無効",
                                        "example": "false"
                                    },
                                    "xoptimize_css": {
                                        "type": "boolean",
                                        "description": "CSS最適化の有効/無効",
                                        "example": "false"
                                    },
                                    "lazyload_css": {
                                        "type": "boolean",
                                        "description": "CSS遅延読み込みの有効/無効",
                                        "example": "false"
                                    },
                                    "xoptimize_javascript": {
                                        "type": "boolean",
                                        "description": "JavaScript最適化の有効/無効",
                                        "example": "false"
                                    },
                                    "lazyload_javascript": {
                                        "type": "boolean",
                                        "description": "JavaScript遅延読み込みの有効/無効",
                                        "example": "false"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/wp": {
            "get": {
                "tags": [
                    "WordPress簡単インストール"
                ],
                "summary": "WordPress一覧を取得",
                "description": "簡単インストールでインストール済みのWordPress一覧を返します。domain を指定すると、そのドメインのインストールのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "wordpress": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "description": "WordPressのハッシュID（PUT/DELETEで使用）"
                                                    },
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "親ドメイン"
                                                    },
                                                    "url": {
                                                        "type": "string",
                                                        "description": "インストール先URL"
                                                    },
                                                    "title": {
                                                        "type": "string",
                                                        "description": "サイトのタイトル"
                                                    },
                                                    "version": {
                                                        "type": "string",
                                                        "description": "WordPressバージョン"
                                                    },
                                                    "db_name": {
                                                        "type": "string",
                                                        "description": "使用しているデータベース名"
                                                    },
                                                    "db_user": {
                                                        "type": "string",
                                                        "description": "使用しているデータベースユーザー名"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "メモ"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "WordPress簡単インストール"
                ],
                "summary": "WordPressを新規インストール",
                "description": "指定URLにWordPressを簡単インストールします。URLにはドメインまたはサブドメインを指定でき、パス付きも可能です。スキーム（https:// 等）は省略できます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "インストール先URL（最大512文字）。スキーム省略可。例: example.com/blog, https://sub.example.com/wp",
                                        "example": "https://example.com/blog"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "サイトタイトル（最大255文字）",
                                        "example": "My Blog"
                                    },
                                    "admin_username": {
                                        "type": "string",
                                        "description": "管理者ユーザー名（最大255文字）",
                                        "example": "admin"
                                    },
                                    "admin_password": {
                                        "type": "string",
                                        "description": "管理者パスワード（7文字以上）",
                                        "example": "SecurePass123"
                                    },
                                    "admin_email": {
                                        "type": "string",
                                        "description": "管理者メールアドレス（最大255文字）",
                                        "example": "admin@example.com"
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（最大500文字）",
                                        "example": "ブログ用WP"
                                    }
                                },
                                "required": [
                                    "url",
                                    "title",
                                    "admin_username",
                                    "admin_password",
                                    "admin_email"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "description": "作成されたWordPressのハッシュID"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/wp/{wp_id}": {
            "put": {
                "tags": [
                    "WordPress簡単インストール"
                ],
                "summary": "WordPress設定を変更",
                "description": "現在変更可能な項目はメモのみです。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "wp_id",
                        "in": "path",
                        "required": true,
                        "description": "WordPressのID（一覧取得で得られる id）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（省略時は空文字に更新）",
                                        "example": "ブログ用WP"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "WordPress簡単インストール"
                ],
                "summary": "WordPressを削除",
                "description": "WordPressをアンインストールします。関連するデータベース・ユーザー・Cronの削除はオプションで制御できます。デフォルトでは delete_db / delete_cron は true ですが、delete_db_user は false（DBユーザーは残す）である点に注意してください。完全に削除したい場合は delete_db_user: true を明示的に指定してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "wp_id",
                        "in": "path",
                        "required": true,
                        "description": "WordPressのID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "delete_db": {
                                        "type": "boolean",
                                        "description": "関連するMySQLデータベースも削除するか（デフォルト: true）",
                                        "example": true
                                    },
                                    "delete_db_user": {
                                        "type": "boolean",
                                        "description": "関連するMySQLユーザーも削除するか（デフォルト: false。完全削除したい場合は明示的に true を指定）",
                                        "example": false
                                    },
                                    "delete_cron": {
                                        "type": "boolean",
                                        "description": "キャッシュ自動削除Cronも削除するか（デフォルト: true）",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/wordpress-security": {
            "get": {
                "tags": [
                    "WordPressセキュリティ設定"
                ],
                "summary": "WordPressセキュリティ設定一覧を取得",
                "description": "契約ドメインごとの WordPress セキュリティ設定（コメント制限・ログイン試行回数制限・国外アクセス制限・IPアドレス制限）を返します。domain を指定すると、そのドメインの設定のみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domains": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "対象ドメイン"
                                                    },
                                                    "ip_restriction": {
                                                        "type": "object",
                                                        "properties": {
                                                            "enabled": {
                                                                "type": "boolean",
                                                                "description": "IPアドレス制限（ダッシュボード）の有効/無効"
                                                            },
                                                            "allowed_ip_addresses": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                },
                                                                "description": "IPアドレス制限のホワイトリスト(IPアドレス)"
                                                            }
                                                        }
                                                    },
                                                    "foreign_ip_restriction": {
                                                        "type": "object",
                                                        "properties": {
                                                            "dashboard": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "enabled": {
                                                                        "type": "boolean",
                                                                        "description": "ダッシュボード アクセス制限の有効/無効 ※IPアドレス制限設定が有効な場合、本設定にかかわらずIPアドレス制限設定が優先されます。 ※REST API アクセス制限が有効な場合、本制限も必ず有効になります。"
                                                                    },
                                                                    "allowed_ip_addresses": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "string"
                                                                        },
                                                                        "description": "ダッシュボード アクセス制限のホワイトリスト(IPアドレス)"
                                                                    }
                                                                }
                                                            },
                                                            "xml_rpc_api": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "enabled": {
                                                                        "type": "boolean",
                                                                        "description": "XML-RPC API アクセス制限の有効/無効"
                                                                    },
                                                                    "allowed_ip_addresses": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "string"
                                                                        },
                                                                        "description": "XML-RPC API アクセス制限のホワイトリスト(IPアドレス)"
                                                                    }
                                                                }
                                                            },
                                                            "rest_api": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "enabled": {
                                                                        "type": "boolean",
                                                                        "description": "REST API アクセス制限の有効/無効 ※国外アクセス制限が無効な場合、本設定も必ず無効になります。"
                                                                    },
                                                                    "allowed_ip_addresses": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "string"
                                                                        },
                                                                        "description": "REST API アクセス制限のホワイトリスト(IPアドレス)"
                                                                    }
                                                                }
                                                            },
                                                            "wlwmanifest": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "enabled": {
                                                                        "type": "boolean",
                                                                        "description": "wlwmanifest.xml アクセス制限の有効/無効"
                                                                    },
                                                                    "allowed_ip_addresses": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "string"
                                                                        },
                                                                        "description": "wlwmanifest.xml アクセス制限のホワイトリスト(IPアドレス)"
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    },
                                                    "login_attempt_limit": {
                                                        "type": "object",
                                                        "properties": {
                                                            "enabled": {
                                                                "type": "boolean",
                                                                "description": "ログイン試行回数制限の有効/無効"
                                                            }
                                                        }
                                                    },
                                                    "comment_restriction": {
                                                        "type": "object",
                                                        "properties": {
                                                            "bulk_post": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "enabled": {
                                                                        "type": "boolean",
                                                                        "description": "単一ユーザーからの大量投稿の有効/無効"
                                                                    }
                                                                }
                                                            },
                                                            "foreign_post": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "enabled": {
                                                                        "type": "boolean",
                                                                        "description": "国外からの投稿の有効/無効"
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "WordPressセキュリティ設定"
                ],
                "summary": "WordPressセキュリティ設定を更新",
                "description": "指定ドメインの WordPress セキュリティ設定を更新します。送信したブロック・フィールドのみ更新され、省略した項目は現状維持です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "対象ドメイン（例: example.com。日本語ドメインの場合はPunycodeで指定）",
                                        "example": "example.com"
                                    },
                                    "comment_restriction": {
                                        "type": "object",
                                        "properties": {
                                            "bulk_post": {
                                                "type": "object",
                                                "properties": {
                                                    "enabled": {
                                                        "type": "boolean",
                                                        "description": "単一ユーザーからの大量投稿の有効/無効",
                                                        "example": true
                                                    }
                                                }
                                            },
                                            "foreign_post": {
                                                "type": "object",
                                                "properties": {
                                                    "enabled": {
                                                        "type": "boolean",
                                                        "description": "国外からの投稿の有効/無効",
                                                        "example": false
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    "login_attempt_limit": {
                                        "type": "object",
                                        "properties": {
                                            "enabled": {
                                                "type": "boolean",
                                                "description": "ログイン試行回数制限の有効/無効（login_attempt_limit ブロック指定時は必須）",
                                                "example": true
                                            }
                                        }
                                    },
                                    "foreign_ip_restriction": {
                                        "type": "object",
                                        "properties": {
                                            "dashboard": {
                                                "type": "object",
                                                "properties": {
                                                    "enabled": {
                                                        "type": "boolean",
                                                        "description": "ダッシュボード アクセス制限の有効/無効"
                                                    },
                                                    "allowed_ip_addresses": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "description": "ダッシュボード アクセス制限のホワイトリスト（IPv4形式またはワイルドカード。空配列でクリア）",
                                                        "example": [
                                                            "203.0.113.10"
                                                        ]
                                                    }
                                                }
                                            },
                                            "xml_rpc_api": {
                                                "type": "object",
                                                "properties": {
                                                    "enabled": {
                                                        "type": "boolean",
                                                        "description": "XML-RPC API アクセス制限の有効/無効"
                                                    },
                                                    "allowed_ip_addresses": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "description": "XML-RPC API アクセス制限のホワイトリスト"
                                                    }
                                                }
                                            },
                                            "rest_api": {
                                                "type": "object",
                                                "properties": {
                                                    "enabled": {
                                                        "type": "boolean",
                                                        "description": "REST API アクセス制限の有効/無効"
                                                    },
                                                    "allowed_ip_addresses": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "description": "REST API アクセス制限のホワイトリスト"
                                                    }
                                                }
                                            },
                                            "wlwmanifest": {
                                                "type": "object",
                                                "properties": {
                                                    "enabled": {
                                                        "type": "boolean",
                                                        "description": "wlwmanifest.xml アクセス制限の有効/無効"
                                                    },
                                                    "allowed_ip_addresses": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "description": "wlwmanifest.xml アクセス制限のホワイトリスト"
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    "ip_restriction": {
                                        "type": "object",
                                        "properties": {
                                            "enabled": {
                                                "type": "boolean",
                                                "description": "IPアドレス制限（ダッシュボード）の有効/無効 ※本設定が有効な場合、国外アクセス制限のダッシュボード アクセス制限の設定にかかわらず本設定が優先されます。有効化するには許可IPアドレスを1件以上登録してください。"
                                            },
                                            "allowed_ip_addresses": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                },
                                                "description": "IPアドレス制限のホワイトリスト（IPv4 または CIDR。空配列でクリア）",
                                                "example": [
                                                    "203.0.113.10",
                                                    "192.168.1.0/24"
                                                ]
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "domain"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ（連動・優先関係がある場合は括弧付きで追記）。例: REST API 有効化時「(REST API アクセス制限を有効にした場合、ダッシュボード アクセス制限も有効になります)」、ダッシュボード有効化時「(IPアドレス制限が有効な場合、国外アクセス制限（ダッシュボード）より IPアドレス制限が優先されます)」、ダッシュボード無効化で REST API も連動 OFF したとき「(ダッシュボード アクセス制限を無効にしたため、REST API アクセス制限も無効にしました)」、IP制限有効化時「(ダッシュボードのアクセス制御は IPアドレス制限が優先されます)」"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/mail": {
            "get": {
                "tags": [
                    "メールアカウント設定"
                ],
                "summary": "メールアカウント一覧を取得",
                "description": "サーバーに登録済みのメールアカウントを一覧で返します。domain を指定すると、そのドメインのアカウントのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "accounts": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "mail_address": {
                                                        "type": "string",
                                                        "description": "メールアドレス"
                                                    },
                                                    "quota_mb": {
                                                        "type": "integer",
                                                        "description": "メールボックス容量（MB）"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "メモ"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "メールアカウント設定"
                ],
                "summary": "メールアカウントを作成",
                "description": "メールアカウントを作成します。作成時にドメイン所有権の確認（TXTレコード検証）が自動で実施されます。詳細は「ドメイン所有権確認」を参照してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mail_address": {
                                        "type": "string",
                                        "description": "メールアドレス",
                                        "example": "info@example.com"
                                    },
                                    "password": {
                                        "type": "string",
                                        "description": "パスワード（8文字以上）",
                                        "example": "SecurePass123"
                                    },
                                    "quota_mb": {
                                        "type": "integer",
                                        "description": "容量(MB) 1-20000",
                                        "example": 2000
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "問い合わせ用"
                                    }
                                },
                                "required": [
                                    "mail_address",
                                    "password"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "mail_address": {
                                            "type": "string",
                                            "description": "作成されたメールアドレス"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/mail/{mail_account}": {
            "get": {
                "tags": [
                    "メールアカウント設定"
                ],
                "summary": "メールアカウント詳細を取得",
                "description": "指定したメールアカウントの詳細情報（容量・使用量を含む）を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "mail_account",
                        "in": "path",
                        "required": true,
                        "description": "メールアカウント（例: user@example.com）。URLエンコードすること",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "mail_address": {
                                            "type": "string",
                                            "description": "メールアドレス"
                                        },
                                        "quota_mb": {
                                            "type": "integer",
                                            "description": "メールボックス容量上限（MB）"
                                        },
                                        "used_mb": {
                                            "type": "number",
                                            "description": "メールボックス使用量（MB）"
                                        },
                                        "memo": {
                                            "type": "string",
                                            "description": "メモ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "メールアカウント設定"
                ],
                "summary": "メールアカウントを変更",
                "description": "指定したメールアカウントを変更します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "mail_account",
                        "in": "path",
                        "required": true,
                        "description": "メールアカウント（例: user@example.com）。URLエンコードすること",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "password": {
                                        "type": "string",
                                        "description": "パスワード（8文字以上）",
                                        "example": "NewPass456"
                                    },
                                    "quota_mb": {
                                        "type": "integer",
                                        "description": "容量(MB)",
                                        "example": 3000
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "営業部用"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "メールアカウント設定"
                ],
                "summary": "メールアカウントを削除",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "mail_account",
                        "in": "path",
                        "required": true,
                        "description": "メールアカウント（例: user@example.com）。URLエンコードすること",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/mail/{mail_account}/forwarding": {
            "get": {
                "tags": [
                    "メールアカウント設定"
                ],
                "summary": "メール転送設定を取得",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "mail_account",
                        "in": "path",
                        "required": true,
                        "description": "メールアカウント（例: user@example.com）。URLエンコードすること",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "forwarding_addresses": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "転送先メールアドレスの配列"
                                        },
                                        "keep_in_mailbox": {
                                            "type": "boolean",
                                            "description": "転送後もメールボックスに残すか"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "メールアカウント設定"
                ],
                "summary": "メール転送設定を更新",
                "description": "指定したメールアカウントのメール転送設定を更新します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "mail_account",
                        "in": "path",
                        "required": true,
                        "description": "メールアカウント（例: user@example.com）。URLエンコードすること",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "forwarding_addresses": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "転送先メールアドレスの配列（上書きで設定。空配列でクリア）",
                                        "example": [
                                            "forward@example.com"
                                        ]
                                    },
                                    "keep_in_mailbox": {
                                        "type": "boolean",
                                        "description": "転送後もメールボックスに残すか",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/spam-filter": {
            "get": {
                "tags": [
                    "迷惑メールフィルタ"
                ],
                "summary": "迷惑メールフィルタ設定を取得",
                "description": "指定したドメインの迷惑メールフィルタ設定を返します。domain を指定すると、そのドメインの設定のみを取得できます。迷惑メールフィルタが標準スパムフィルタ（standard）のときは、標準スパムフィルタ判定基準・日本語を含まない件名に対して判定を厳しくする・HTMLメールに対して判定を厳しくするをレスポンスに含めます。それ以外（off / cloudmark_authority）のときは含まれません。※ filter_type の 高性能スパムフィルタ「Cloudmark Authority」は、エックスサーバー・XServerビジネスでのみ指定・利用できます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "spam_filters": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "対象ドメイン"
                                                    },
                                                    "settings": {
                                                        "type": "object",
                                                        "properties": {
                                                            "filter_type": {
                                                                "type": "string",
                                                                "description": "迷惑メールフィルタ。off: OFF / standard: 標準スパムフィルタ / cloudmark_authority: 高性能スパムフィルタ「Cloudmark Authority」"
                                                            },
                                                            "detection_action": {
                                                                "type": "string",
                                                                "description": "検知時の処理。inbox: 受信箱へ配信する / spam: 迷惑メールフォルダへ移動する / trash: ゴミ箱へ移動する / delete: 削除する"
                                                            },
                                                            "spam_level": {
                                                                "type": "string",
                                                                "description": "標準スパムフィルタ判定基準（filter_type が standard のときのみ、それ以外の場合は無視される）。very_lenient: 非常にゆるい / lenient: ゆるい / normal: 普通 / strict: 厳しい / very_strict: 非常に厳しい / strictest: 最も厳しい"
                                                            },
                                                            "strict_non_japanese_subject": {
                                                                "type": "boolean",
                                                                "description": "日本語を含まない件名に対して判定を厳しくする（filter_type が standard のときのみ、それ以外の場合は無視される）"
                                                            },
                                                            "strict_html_mail": {
                                                                "type": "boolean",
                                                                "description": "HTMLメールに対して判定を厳しくする（filter_type が standard のときのみ、それ以外の場合は無視される）"
                                                            },
                                                            "white_list": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                },
                                                                "description": "ホワイトリスト"
                                                            },
                                                            "black_list": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                },
                                                                "description": "ブラックリスト"
                                                            },
                                                            "dmarc_receiver": {
                                                                "type": "boolean",
                                                                "description": "受信側DMARC設定"
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/spam-filter/{domain}": {
            "put": {
                "tags": [
                    "迷惑メールフィルタ"
                ],
                "summary": "迷惑メールフィルタ設定を更新",
                "description": "指定したドメインの迷惑メールフィルタ設定を更新します。迷惑メールフィルタを標準スパムフィルタ（standard）に指定するときは、標準スパムフィルタ判定基準・日本語を含まない件名に対して判定を厳しくする・HTMLメールに対して判定を厳しくするを指定してください。更新するフィールドが1つも指定されなかった場合は422を返します。※ filter_type の 高性能スパムフィルタ「Cloudmark Authority」は、エックスサーバー・XServerビジネスでのみ指定・利用できます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "対象ドメイン（例: example.com。日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "filter_type": {
                                        "type": "string",
                                        "description": "迷惑メールフィルタ（空文字不可）。off: OFF / standard: 標準スパムフィルタ / cloudmark_authority: 高性能スパムフィルタ「Cloudmark Authority」",
                                        "example": "standard"
                                    },
                                    "detection_action": {
                                        "type": "string",
                                        "description": "検知時の処理（空文字不可）。inbox: 受信箱へ配信する / spam: 迷惑メールフォルダへ移動する / trash: ゴミ箱へ移動する / delete: 削除する",
                                        "example": "spam"
                                    },
                                    "spam_level": {
                                        "type": "string",
                                        "description": "標準スパムフィルタ判定基準（空文字不可、filter_typeが standard のとき必須、それ以外の場合は無視される）。very_lenient: 非常にゆるい / lenient: ゆるい / normal: 普通 / strict: 厳しい / very_strict: 非常に厳しい / strictest: 最も厳しい",
                                        "example": "normal"
                                    },
                                    "strict_non_japanese_subject": {
                                        "type": "boolean",
                                        "description": "日本語を含まない件名に対して判定を厳しくする（filter_typeが standard のとき必須、それ以外の場合は無視される）",
                                        "example": false
                                    },
                                    "strict_html_mail": {
                                        "type": "boolean",
                                        "description": "HTMLメールに対して判定を厳しくする（filter_typeが standard のとき必須、それ以外の場合は無視される）",
                                        "example": false
                                    },
                                    "white_list": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "ホワイトリスト（メールアドレスの配列。空配列の明示送信でクリア）",
                                        "example": [
                                            "allow@example.net"
                                        ]
                                    },
                                    "black_list": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "ブラックリスト（メールアドレスの配列。空配列の明示送信でクリア）",
                                        "example": [
                                            "block@example.org"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/spam-filter/{domain}/dmarc-receiver": {
            "put": {
                "tags": [
                    "迷惑メールフィルタ"
                ],
                "summary": "受信側DMARC設定を更新",
                "description": "指定したドメインの受信側DMARC設定を更新します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "対象ドメイン（例: example.com）。URLエンコードすること",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "dmarc_receiver": {
                                        "type": "boolean",
                                        "description": "受信側DMARC設定",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "dmarc_receiver"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dmarc_receiver": {
                                            "type": "boolean",
                                            "description": "更新後の受信側DMARC設定"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/auto-reply": {
            "get": {
                "tags": [
                    "自動応答設定"
                ],
                "summary": "自動応答設定一覧を取得",
                "description": "設定済みの自動応答の一覧を返します。domain を指定すると、そのドメインのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "auto_replies": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン"
                                                    },
                                                    "mail_address": {
                                                        "type": "string",
                                                        "description": "メールアドレス"
                                                    },
                                                    "subject": {
                                                        "type": "string",
                                                        "description": "件名"
                                                    },
                                                    "from_name": {
                                                        "type": "string",
                                                        "description": "送信者名"
                                                    },
                                                    "quote_incoming": {
                                                        "type": "boolean",
                                                        "description": "受信メールの引用を含めるか"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "自動応答設定"
                ],
                "summary": "自動応答設定を追加",
                "description": "未設定のメールアドレスに自動応答を新規追加します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "ドメイン",
                                        "example": "example.com"
                                    },
                                    "mail_address": {
                                        "type": "string",
                                        "description": "メールアドレス",
                                        "example": "info@example.com"
                                    },
                                    "from_name": {
                                        "type": "string",
                                        "description": "送信者名（空文字不可）",
                                        "example": "Example Inc."
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "件名（空文字不可）",
                                        "example": "お問い合わせありがとうございます"
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "本文（空文字不可）",
                                        "example": "担当者より折り返しご連絡いたします。"
                                    },
                                    "quote_incoming": {
                                        "type": "boolean",
                                        "description": "受信メールの引用を含めるか",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "domain",
                                    "mail_address",
                                    "from_name",
                                    "subject",
                                    "body",
                                    "quote_incoming"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "mail_address": {
                                            "type": "string",
                                            "description": "追加したメールアドレス"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/auto-reply/{mail_address}": {
            "get": {
                "tags": [
                    "自動応答設定"
                ],
                "summary": "自動応答設定の詳細を取得",
                "description": "指定したメールアドレスの自動応答設定（本文を含む）を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "mail_address",
                        "in": "path",
                        "required": true,
                        "description": "メールアドレス（user@domain 形式）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain": {
                                            "type": "string",
                                            "description": "ドメイン"
                                        },
                                        "mail_address": {
                                            "type": "string",
                                            "description": "メールアドレス"
                                        },
                                        "subject": {
                                            "type": "string",
                                            "description": "件名"
                                        },
                                        "from_name": {
                                            "type": "string",
                                            "description": "送信者名"
                                        },
                                        "body": {
                                            "type": "string",
                                            "description": "本文"
                                        },
                                        "quote_incoming": {
                                            "type": "boolean",
                                            "description": "受信メールの引用を含めるか"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "自動応答設定"
                ],
                "summary": "自動応答設定を更新",
                "description": "既存の自動応答設定を更新します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "mail_address",
                        "in": "path",
                        "required": true,
                        "description": "メールアドレス（user@domain 形式）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "from_name": {
                                        "type": "string",
                                        "description": "送信者名（空文字不可）",
                                        "example": "Example Inc."
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "件名（空文字不可）",
                                        "example": "【自動応答】お問い合わせ受付"
                                    },
                                    "body": {
                                        "type": "string",
                                        "description": "本文（空文字不可）",
                                        "example": "担当者より折り返しご連絡いたします。"
                                    },
                                    "quote_incoming": {
                                        "type": "boolean",
                                        "description": "受信メールの引用を含めるか",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "自動応答設定"
                ],
                "summary": "自動応答設定を削除",
                "description": "指定したメールアドレスの自動応答設定を削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "mail_address",
                        "in": "path",
                        "required": true,
                        "description": "メールアドレス（user@domain 形式）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/smtp-abroad-restriction": {
            "get": {
                "tags": [
                    "SMTP認証の国外アクセス制限"
                ],
                "summary": "SMTP認証の国外アクセス制限設定を取得",
                "description": "ドメインごとのSMTP認証の国外アクセス制限の有効/無効を返します。domain を指定すると、そのドメインのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "smtp_abroad_restrictions": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン"
                                                    },
                                                    "abroad_access_restriction": {
                                                        "type": "boolean",
                                                        "description": "国外アクセス制限の有効/無効"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/smtp-abroad-restriction/{domain}": {
            "put": {
                "tags": [
                    "SMTP認証の国外アクセス制限"
                ],
                "summary": "SMTP認証の国外アクセス制限設定を更新",
                "description": "指定ドメインのSMTP認証の国外アクセス制限を有効または無効にします。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "abroad_access_restriction": {
                                        "type": "boolean",
                                        "description": "国外アクセス制限の有効/無効",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "abroad_access_restriction"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/mail-filter": {
            "get": {
                "tags": [
                    "メール振り分け設定"
                ],
                "summary": "メール振り分け設定一覧を取得",
                "description": "条件とアクションで定義された振り分けルールの一覧を返します。domain を指定すると、そのドメインのルールのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "filters": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "description": "振り分けルールのID（DELETEで使用）"
                                                    },
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "対象ドメイン"
                                                    },
                                                    "priority": {
                                                        "type": "integer",
                                                        "description": "ドメイン内での優先度（1から連番。番号が小さいほど先に評価される）"
                                                    },
                                                    "conditions": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "keyword": {
                                                                    "type": "string",
                                                                    "description": "マッチさせるキーワード"
                                                                },
                                                                "field": {
                                                                    "type": "string",
                                                                    "description": "対象フィールド。subject: 件名 / from: 差出人 / to: あて先 / body: 本文 / header: ヘッダー全体"
                                                                },
                                                                "match_type": {
                                                                    "type": "string",
                                                                    "description": "一致条件。contain: キーワードを含む / match: キーワードと完全一致 / start_from: キーワードから始まる"
                                                                }
                                                            }
                                                        },
                                                        "description": "条件の配列。複数条件はすべてANDで評価される"
                                                    },
                                                    "action": {
                                                        "type": "object",
                                                        "description": "振り分けアクション",
                                                        "properties": {
                                                            "type": {
                                                                "type": "string",
                                                                "description": "転送先種別。spam_folder: 迷惑メールフォルダに振り分け / trash: ゴミ箱に振り分け / delete: 削除する / mail_address: その他の宛先"
                                                            },
                                                            "target": {
                                                                "type": "string",
                                                                "description": "転送先メールアドレスまたはコマンドパス。type が mail_address の場合に値が入り、それ以外では空文字"
                                                            },
                                                            "method": {
                                                                "type": "string",
                                                                "description": "処理方法。move: 転送（元のメールボックスには残さない） / copy: コピー転送（元のメールボックスにも残す）"
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "メール振り分け設定"
                ],
                "summary": "メール振り分け設定を追加",
                "description": "条件を1つ以上、アクションを必須で指定します。1ルールあたりの条件は最大3つまで指定できます。複数条件はすべてANDで評価されます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "ドメイン（最大253文字。日本語ドメインの場合はPunycodeで指定）",
                                        "example": "example.com"
                                    },
                                    "conditions": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "keyword": {
                                                    "type": "string",
                                                    "description": "マッチさせるキーワード",
                                                    "example": "spam@example.net"
                                                },
                                                "field": {
                                                    "type": "string",
                                                    "description": "対象フィールド。subject: 件名 / from: 差出人 / to: あて先 / body: 本文 / header: ヘッダー全体",
                                                    "example": "from"
                                                },
                                                "match_type": {
                                                    "type": "string",
                                                    "description": "一致条件。contain: キーワードを含む / match: キーワードと完全一致 / start_from: キーワードから始まる",
                                                    "example": "match"
                                                }
                                            }
                                        }
                                    },
                                    "action": {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "description": "転送先種別。spam_folder: 迷惑メールフォルダに振り分け / trash: ゴミ箱に振り分け / delete: 削除する / mail_address: その他の宛先",
                                                "example": "spam_folder"
                                            },
                                            "target": {
                                                "type": "string",
                                                "description": "転送先メールアドレスまたはコマンドパス。type が mail_address の場合に指定（それ以外では省略可）",
                                                "example": ""
                                            },
                                            "method": {
                                                "type": "string",
                                                "description": "処理方法。move: 転送（元のメールボックスには残さない） / copy: コピー転送（元のメールボックスにも残す）",
                                                "example": "copy"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "domain",
                                    "conditions",
                                    "action"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "description": "追加された振り分けルールのID"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/mail-filter/{filter_id}": {
            "delete": {
                "tags": [
                    "メール振り分け設定"
                ],
                "summary": "メール振り分け設定を削除",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "filter_id",
                        "in": "path",
                        "required": true,
                        "description": "振り分けルールのID（一覧取得で得られる id）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/dkim": {
            "get": {
                "tags": [
                    "DKIM設定"
                ],
                "summary": "DKIM設定一覧を取得",
                "description": "ドメイン配下のサブドメインごとのDKIM有効/無効を返します。domain を指定すると、そのドメインのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dkim_settings": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン"
                                                    },
                                                    "fqdn": {
                                                        "type": "string",
                                                        "description": "FQDN（example.com または sub.example.com）"
                                                    },
                                                    "enabled": {
                                                        "type": "boolean",
                                                        "description": "DKIMの有効/無効"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/dkim/{fqdn}": {
            "get": {
                "tags": [
                    "DKIM設定"
                ],
                "summary": "DKIM設定の詳細を取得",
                "description": "指定したFQDNのDKIM設定（DNSレコード情報を含む）を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "fqdn",
                        "in": "path",
                        "required": true,
                        "description": "FQDN（example.com または sub.example.com）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "fqdn": {
                                            "type": "string",
                                            "description": "FQDN"
                                        },
                                        "enabled": {
                                            "type": "boolean",
                                            "description": "DKIMの有効/無効"
                                        },
                                        "dkim_record": {
                                            "type": "object",
                                            "properties": {
                                                "hostname": {
                                                    "type": "string",
                                                    "description": "DKIMレコードのホスト名"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "description": "レコード種別"
                                                },
                                                "content": {
                                                    "type": "string",
                                                    "description": "レコード内容"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "DKIM設定"
                ],
                "summary": "DKIM設定を更新",
                "description": "指定したFQDNのDKIMを有効または無効にします。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "fqdn",
                        "in": "path",
                        "required": true,
                        "description": "FQDN（example.com または sub.example.com）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "DKIMの有効/無効",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "enabled"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "fqdn": {
                                            "type": "string",
                                            "description": "FQDN"
                                        },
                                        "enabled": {
                                            "type": "boolean",
                                            "description": "DKIMの有効/無効"
                                        },
                                        "dkim_record": {
                                            "type": "object",
                                            "properties": {
                                                "hostname": {
                                                    "type": "string",
                                                    "description": "DKIMレコードのホスト名"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "description": "レコード種別"
                                                },
                                                "content": {
                                                    "type": "string",
                                                    "description": "レコード内容"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/spf": {
            "get": {
                "tags": [
                    "SPF設定"
                ],
                "summary": "SPF設定一覧を取得",
                "description": "ドメイン配下のサブドメインごとのSPF設定を返します。domain を指定すると、そのドメインのみに絞り込めます。初期ドメイン（契約のメインドメイン／servername）およびそのホスト名へのSPF設定は一覧に含めません。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "spf_records": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン"
                                                    },
                                                    "fqdn": {
                                                        "type": "string",
                                                        "description": "FQDN（example.com または sub.example.com）"
                                                    },
                                                    "spf_record": {
                                                        "type": "string",
                                                        "description": "現在のSPFレコード"
                                                    },
                                                    "gmail_enabled": {
                                                        "type": "boolean",
                                                        "description": "Gmail設定が含まれるか"
                                                    },
                                                    "custom": {
                                                        "type": "boolean",
                                                        "description": "カスタム設定かどうか"
                                                    },
                                                    "duplicate": {
                                                        "type": "boolean",
                                                        "description": "SPFレコードが重複しているか"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "SPF設定"
                ],
                "summary": "SPF設定を追加",
                "description": "指定したサブドメインに標準SPFレコードを追加します。初期ドメイン（契約のメインドメイン）には設定できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "fqdn": {
                                        "type": "string",
                                        "description": "FQDN（example.com または sub.example.com）",
                                        "example": "sub.example.com"
                                    }
                                },
                                "required": [
                                    "fqdn"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "fqdn": {
                                            "type": "string",
                                            "description": "FQDN"
                                        },
                                        "spf_record": {
                                            "type": "string",
                                            "description": "追加したSPFレコード"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/spf/{fqdn}": {
            "put": {
                "tags": [
                    "SPF設定"
                ],
                "summary": "SPF設定を更新",
                "description": "指定したFQDNのSPF設定を更新します。enable_gmail 指定時にカスタム設定の場合は409（OPERATION_ERROR）を返します。指定したFQDNのSPF設定が存在しない場合は404（NOT_FOUND）を返します。SPFレコードが重複している場合は409（OPERATION_ERROR）を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "fqdn",
                        "in": "path",
                        "required": true,
                        "description": "FQDN（example.com または sub.example.com）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "action": {
                                        "type": "string",
                                        "description": "操作種別。reset: 標準SPFへ初期化 / enable_gmail: 標準+Gmail許可のSPFを設定 / custom: カスタムSPFを設定",
                                        "example": "reset"
                                    },
                                    "spf_record": {
                                        "type": "string",
                                        "description": "カスタムSPFレコード（action=custom のとき必須。v=spf1 で始まり、ダブルクォートを含まない）",
                                        "example": "v=spf1 +a:sv1234.xserver.jp +a:sub.example.com +mx include:spf.sender.xserver.jp ~all"
                                    }
                                },
                                "required": [
                                    "action"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "fqdn": {
                                            "type": "string",
                                            "description": "FQDN"
                                        },
                                        "spf_record": {
                                            "type": "string",
                                            "description": "更新後のSPFレコード"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "SPF設定"
                ],
                "summary": "SPF設定を削除",
                "description": "指定したFQDNのSPF設定を削除します。SPF設定が存在しない場合は404（NOT_FOUND）を返します。SPFレコードが重複している場合は409（OPERATION_ERROR）を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "fqdn",
                        "in": "path",
                        "required": true,
                        "description": "FQDN（example.com または sub.example.com）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/dmarc": {
            "get": {
                "tags": [
                    "送信側DMARC設定"
                ],
                "summary": "送信側DMARC設定を取得",
                "description": "ドメインごとの送信側DMARC設定を返します。domain を指定すると、そのドメインのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dmarc_settings": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン"
                                                    },
                                                    "policy": {
                                                        "type": "string",
                                                        "description": "DMARCポリシー（未設定時は空文字）。none: 何もしない / quarantine: 迷惑メールとして配送する / reject: メールを配送しない"
                                                    },
                                                    "report_enabled": {
                                                        "type": "boolean",
                                                        "description": "レポート通知が有効か（レポート通知先メールアドレスが1件以上ある場合 true）"
                                                    },
                                                    "notification_mail_addresses": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "description": "レポート通知先メールアドレス"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/dmarc/{domain}": {
            "put": {
                "tags": [
                    "送信側DMARC設定"
                ],
                "summary": "送信側DMARC設定を更新",
                "description": "指定したドメインの送信側DMARC設定を更新します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "policy": {
                                        "type": "string",
                                        "description": "DMARCポリシー（空文字不可）。none: 何もしない / quarantine: 迷惑メールとして配送する / reject: メールを配送しない",
                                        "example": "reject"
                                    },
                                    "report_enabled": {
                                        "type": "boolean",
                                        "description": "レポート通知の有効/無効。false のときレポート通知先メールアドレスは自動的に空になる",
                                        "example": true
                                    },
                                    "notification_mail_addresses": {
                                        "type": "string",
                                        "description": "レポート通知先メールアドレス（改行区切り、または配列）。report_enabled が true のときは1件以上必須",
                                        "example": "report@example.com"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/ftp": {
            "get": {
                "tags": [
                    "FTPアカウント設定"
                ],
                "summary": "FTPアカウント一覧を取得",
                "description": "登録済みFTPアカウントを一覧で返します。メインアカウントは含まれません。domain を指定すると、そのドメインのアカウントのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "accounts": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "ftp_account": {
                                                        "type": "string",
                                                        "description": "FTPアカウント（user@domain 形式）"
                                                    },
                                                    "directory": {
                                                        "type": "string",
                                                        "description": "アクセス先ディレクトリ"
                                                    },
                                                    "quota_mb": {
                                                        "type": "integer",
                                                        "description": "容量制限（MB。0 は無制限）"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "メモ"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "FTPアカウント設定"
                ],
                "summary": "FTPアカウントを追加",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "ftp_account": {
                                        "type": "string",
                                        "description": "FTPアカウント（user@domain 形式。例: ftpuser@example.com）",
                                        "example": "ftpuser@example.com"
                                    },
                                    "password": {
                                        "type": "string",
                                        "description": "パスワード（8文字以上）",
                                        "example": "FtpPass123!"
                                    },
                                    "directory": {
                                        "type": "string",
                                        "description": "ディレクトリ（デフォルト: /）",
                                        "example": "/public_html"
                                    },
                                    "quota_mb": {
                                        "type": "integer",
                                        "description": "容量(MB)",
                                        "example": 5000
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "開発用"
                                    }
                                },
                                "required": [
                                    "ftp_account",
                                    "password"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ftp_account": {
                                            "type": "string",
                                            "description": "作成されたFTPアカウント（user@domain 形式）"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/ftp/{ftp_account}": {
            "put": {
                "tags": [
                    "FTPアカウント設定"
                ],
                "summary": "FTPアカウントを変更",
                "description": "送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "ftp_account",
                        "in": "path",
                        "required": true,
                        "description": "FTPアカウント（user@domain 形式）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "password": {
                                        "type": "string",
                                        "description": "パスワード（8文字以上）",
                                        "example": "NewFtpPass456!"
                                    },
                                    "directory": {
                                        "type": "string",
                                        "description": "ディレクトリ",
                                        "example": "/public_html"
                                    },
                                    "quota_mb": {
                                        "type": "integer",
                                        "description": "容量(MB)",
                                        "example": 1000
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "本番用"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "FTPアカウント設定"
                ],
                "summary": "FTPアカウントを削除",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "ftp_account",
                        "in": "path",
                        "required": true,
                        "description": "FTPアカウント",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/db": {
            "get": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "データベース一覧を取得",
                "description": "MySQLデータベースの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "databases": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "db_name": {
                                                        "type": "string",
                                                        "description": "データベース名"
                                                    },
                                                    "version_name": {
                                                        "type": "string",
                                                        "description": "バージョン表示名（例: MariaDB10.5）"
                                                    },
                                                    "size_mb": {
                                                        "type": "number",
                                                        "description": "データベースサイズ（MB）"
                                                    },
                                                    "granted_users": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "description": "アクセス権限を持つMySQLユーザー名の配列"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "メモ"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "データベースを作成",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name_suffix": {
                                        "type": "string",
                                        "description": "データベース名のサフィックス（サーバーID_に続く部分、例: db01 → ss123456_db01）",
                                        "example": "db01"
                                    },
                                    "character_set": {
                                        "type": "string",
                                        "description": "文字コード（省略時 utf8mb4）。utf8mb4 / UTF-8 / EUC-JP / SHIFT-JIS / Binary",
                                        "example": "utf8mb4"
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "本番用DB"
                                    }
                                },
                                "required": [
                                    "name_suffix"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "db_name": {
                                            "type": "string",
                                            "description": "作成されたデータベース名（サーバーID_サフィックス）"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/db/{db_name}": {
            "put": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "データベースのメモを更新",
                "description": "送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "db_name",
                        "in": "path",
                        "required": true,
                        "description": "データベース名",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "本番用DB"
                                    }
                                },
                                "required": [
                                    "memo"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "データベースを削除",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "db_name",
                        "in": "path",
                        "required": true,
                        "description": "データベース名",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/db/user": {
            "get": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "MySQLユーザー一覧を取得",
                "description": "MySQLユーザーの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "users": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "db_user": {
                                                        "type": "string",
                                                        "description": "MySQLユーザー名"
                                                    },
                                                    "version_name": {
                                                        "type": "string",
                                                        "description": "バージョン表示名"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "メモ"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "MySQLユーザーを作成",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name_suffix": {
                                        "type": "string",
                                        "description": "ユーザー名のサフィックス（サーバーID_に続く部分、例: user01 → ss123456_user01）",
                                        "example": "user01"
                                    },
                                    "password": {
                                        "type": "string",
                                        "description": "パスワード（8文字以上）",
                                        "example": "DbPass123!"
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "アプリ用ユーザー"
                                    }
                                },
                                "required": [
                                    "name_suffix",
                                    "password"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "db_user": {
                                            "type": "string",
                                            "description": "作成されたMySQLユーザー名（サーバーID_サフィックス）"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/db/user/{db_user}": {
            "put": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "MySQLユーザーを変更",
                "description": "送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "db_user",
                        "in": "path",
                        "required": true,
                        "description": "MySQLユーザー名",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "password": {
                                        "type": "string",
                                        "description": "パスワード（8文字以上）",
                                        "example": "NewDbPass456!"
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "WP用ユーザー"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "MySQLユーザーを削除",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "db_user",
                        "in": "path",
                        "required": true,
                        "description": "MySQLユーザー名",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/db/user/{db_user}/grant": {
            "get": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "データベース権限を取得",
                "description": "指定したMySQLユーザーがアクセス権限を持つデータベースの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "db_user",
                        "in": "path",
                        "required": true,
                        "description": "MySQLユーザー名",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "databases": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "description": "アクセス権限を持つデータベース名の配列"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "データベース権限を付与",
                "description": "指定したMySQLユーザーにデータベースへのアクセス権限を付与します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "db_user",
                        "in": "path",
                        "required": true,
                        "description": "MySQLユーザー名",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "db_name": {
                                        "type": "string",
                                        "description": "データベース名",
                                        "example": "ss123456_db01"
                                    }
                                },
                                "required": [
                                    "db_name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "MySQL設定"
                ],
                "summary": "データベース権限を削除",
                "description": "指定したMySQLユーザーからデータベースへのアクセス権限を削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "db_user",
                        "in": "path",
                        "required": true,
                        "description": "MySQLユーザー名",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "db_name": {
                                        "type": "string",
                                        "description": "データベース名",
                                        "example": "ss123456_db01"
                                    }
                                },
                                "required": [
                                    "db_name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/mysql-backup/databases": {
            "get": {
                "tags": [
                    "MySQLバックアップの取得・復元"
                ],
                "summary": "MySQLバックアップの状態を取得",
                "description": "各データベースで取得・復元申込に指定できるバックアップ日を返します。backup_dates[].fetch_available / restore_available はその日のバックアップデータが存在するかを示します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "databases": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "db_name": {
                                                        "type": "string",
                                                        "description": "データベース名"
                                                    },
                                                    "version_name": {
                                                        "type": "string",
                                                        "description": "MySQLバージョン表示名（例: MariaDB10.5）"
                                                    },
                                                    "backup_dates": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "date": {
                                                                    "type": "string",
                                                                    "description": "バックアップ日（Y-m-d）"
                                                                },
                                                                "fetch_available": {
                                                                    "type": "boolean",
                                                                    "description": "その日の自動バックアップデータが存在するか（日次バックアップ成功日）"
                                                                },
                                                                "restore_available": {
                                                                    "type": "boolean",
                                                                    "description": "その日の自動バックアップデータが存在するか（復元申込の backup_date 候補）"
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/mysql-backup": {
            "post": {
                "tags": [
                    "MySQLバックアップの取得・復元"
                ],
                "summary": "MySQLバックアップの取得または復元を申し込む",
                "description": "指定したバックアップ日のデータ取得（operation_type=fetch）または復元（operation_type=restore）を非同期で申し込みます。fetch 完了後は FTP 等で取得してください。restore は対象 DB を上書きする破壊的操作であり、取り消しできません。同名のデータベースが複数存在する場合は 422（VALIDATION_ERROR）を返します。処理中または利用できない backup_date の場合は 409（OPERATION_ERROR）を返します。進捗は GET /mysql-backup/{request_id} をポーリングしてください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "db_name": {
                                        "type": "string",
                                        "description": "データベース名",
                                        "example": "ss123456_db01"
                                    },
                                    "backup_date": {
                                        "type": "string",
                                        "description": "対象バックアップ日（Y-m-d）",
                                        "example": "2026-06-01"
                                    },
                                    "operation_type": {
                                        "type": "string",
                                        "description": "処理種別。fetch: 自動バックアップデータの取得 / restore: 自動バックアップデータの復元",
                                        "example": "fetch"
                                    }
                                },
                                "required": [
                                    "db_name",
                                    "backup_date",
                                    "operation_type"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "description": "ポーリング用の申込識別子（32文字の小文字16進数。GET /mysql-backup/{request_id} で使用。履歴の見分けには requested_at 等を利用してください）"
                                        },
                                        "requested_at": {
                                            "type": "string",
                                            "description": "申込日時"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "MySQLバックアップの取得・復元"
                ],
                "summary": "MySQLバックアップ申込履歴一覧を取得",
                "description": "過去の取得・復元申込の履歴を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "requests": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "request_id": {
                                                        "type": "string",
                                                        "description": "ポーリング用の申込識別子（32文字の小文字16進数）"
                                                    },
                                                    "requested_at": {
                                                        "type": "string",
                                                        "description": "申込日時"
                                                    },
                                                    "db_name": {
                                                        "type": "string",
                                                        "description": "データベース名"
                                                    },
                                                    "backup_date": {
                                                        "type": "string",
                                                        "description": "対象バックアップ日（Y-m-d）"
                                                    },
                                                    "operation_type": {
                                                        "type": "string",
                                                        "description": "「MySQLバックアップの取得または復元を申し込む」の operation_type を参考"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "以下凡例。pending: 準備中 / running: 実行中 / succeeded: 正常終了 / failed: 失敗"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/mysql-backup/{request_id}": {
            "get": {
                "tags": [
                    "MySQLバックアップの取得・復元"
                ],
                "summary": "MySQLバックアップ申込履歴詳細を取得",
                "description": "指定した申込の詳細を返します。申込後の進捗確認に使用してください。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "request_id",
                        "in": "path",
                        "required": true,
                        "description": "申込識別子（32文字の小文字16進数。POST /mysql-backup または履歴一覧で得られる request_id）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "description": "申込識別子（32文字の小文字16進数）"
                                        },
                                        "db_name": {
                                            "type": "string",
                                            "description": "データベース名"
                                        },
                                        "version_name": {
                                            "type": "string",
                                            "description": "バージョン表示名"
                                        },
                                        "operation_type": {
                                            "type": "string",
                                            "description": "fetch または restore"
                                        },
                                        "backup_date": {
                                            "type": "string",
                                            "description": "対象バックアップ日（Y-m-d）"
                                        },
                                        "backup_size_mib": {
                                            "type": "integer",
                                            "description": "バックアップサイズ（MiB）"
                                        },
                                        "status": {
                                            "type": "string",
                                            "description": "pending / running / succeeded / failed"
                                        },
                                        "requested_at": {
                                            "type": "string",
                                            "description": "申込日時"
                                        },
                                        "finished_at": {
                                            "type": "string",
                                            "description": "終了日時（succeeded 時）"
                                        },
                                        "failure_reason": {
                                            "type": "string",
                                            "description": "失敗理由（failed 時）。insufficient_disk_space: 空き容量不足（fetch） / backup_not_found: バックアップ不存在（fetch） / fetch_failed: 取得失敗（fetch） / restore_failed: 復元失敗（restore）。処理中・保存先競合等は POST 時に 409（OPERATION_ERROR）となるため failure_reason には含まれません。"
                                        },
                                        "backup_path": {
                                            "type": "string",
                                            "description": "サーバー内保存パス（fetch 成功時のみ、任意）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/php-version": {
            "get": {
                "tags": [
                    "PHPバージョン"
                ],
                "summary": "PHPバージョン設定を取得",
                "description": "選択可能なPHPバージョン一覧と、ドメインごとの現在のバージョンを返します。domain を指定すると、そのドメインの情報のみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "available_versions": {
                                            "type": "object",
                                            "description": "選択可能なPHPバージョン。キーがバージョン番号、値が表示名称（例: {\"8.3\": \"PHP8.3.21\", \"8.2\": \"PHP8.2.28\"}）",
                                            "additionalProperties": {
                                                "type": "string"
                                            }
                                        },
                                        "domains": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン名"
                                                    },
                                                    "current_version": {
                                                        "type": "string",
                                                        "description": "現在設定されているPHPバージョン"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/php-version/{domain}": {
            "put": {
                "tags": [
                    "PHPバージョン"
                ],
                "summary": "PHPバージョンを変更",
                "description": "指定ドメインのPHPバージョンを変更します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "version": {
                                        "type": "string",
                                        "description": "PHPバージョン（例: 8.2）",
                                        "example": "8.2"
                                    }
                                },
                                "required": [
                                    "version"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/php-ini": {
            "get": {
                "tags": [
                    "php.ini設定"
                ],
                "summary": "php.ini設定を取得",
                "description": "ドメインごとの php.ini 設定（settings）と、.user.ini による php.ini 相当設定の有効状態（user_ini_active）を返します。domain を指定すると、そのドメインの情報のみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domains": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン名"
                                                    },
                                                    "user_ini_active": {
                                                        "type": "boolean",
                                                        "description": ".user.ini による php.ini 相当設定の有効/無効"
                                                    },
                                                    "settings": {
                                                        "type": "object",
                                                        "properties": {
                                                            "display_errors": {
                                                                "type": "string",
                                                                "description": "PHPプログラム実行時のエラー内容を画面に出力するかどうかを設定します。On: ブラウザ上にエラーを表示 / Off: ブラウザ上にエラーを表示しない"
                                                            },
                                                            "error_reporting": {
                                                                "type": "string",
                                                                "description": "PHPプログラム実行時のエラー出力レベルを設定します"
                                                            },
                                                            "display_startup_errors": {
                                                                "type": "string",
                                                                "description": "PHP の起動シーケンスで発生するエラーを表示するかどうかを設定します。On: 表示する / Off: 表示しない"
                                                            },
                                                            "session": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "auto_start": {
                                                                        "type": "string",
                                                                        "description": "リクエスト開始時にセッションを自動的に開始するかどうかを指定します。0: 自動開始しない / 1: 自動開始する"
                                                                    },
                                                                    "name": {
                                                                        "type": "string",
                                                                        "description": "クッキーに設定されるセッション名を指定します"
                                                                    },
                                                                    "use_cookies": {
                                                                        "type": "string",
                                                                        "description": "クライアント側へのセッションIDの保存に、クッキーを使用するかどうかを指定します。0: 使用しない / 1: 使用する"
                                                                    },
                                                                    "use_only_cookies": {
                                                                        "type": "string",
                                                                        "description": "クライアント側へのセッションIDの保存に、クッキーのみを使用可能とする指定を行います。0: クッキーのみに限定しない / 1: クッキーのみを使用"
                                                                    },
                                                                    "use_trans_sid": {
                                                                        "type": "string",
                                                                        "description": "URLへのセッションIDの設定を自動で行うかを設定します。0: 自動設定しない / 1: 自動設定する"
                                                                    },
                                                                    "cookie_lifetime": {
                                                                        "type": "string",
                                                                        "description": "クッキーの有効期間を（秒単位で）指定します。0を設定するとブラウザをクローズするまでセッションが有効となります"
                                                                    },
                                                                    "cookie_path": {
                                                                        "type": "string",
                                                                        "description": "クッキーを有効とするパスを指定します。ここで指定したパス以下へのアクセスのみクッキーが有効となります"
                                                                    },
                                                                    "cookie_domain": {
                                                                        "type": "string",
                                                                        "description": "クッキーを有効とするドメインを指定します"
                                                                    }
                                                                }
                                                            },
                                                            "mbstring": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "language": {
                                                                        "type": "string",
                                                                        "description": "デフォルトの言語を設定します"
                                                                    },
                                                                    "internal_encoding": {
                                                                        "type": "string",
                                                                        "description": "内部文字エンコーディングを設定します"
                                                                    },
                                                                    "http_input": {
                                                                        "type": "string",
                                                                        "description": "HTTP入力文字エンコーディング変換を設定します"
                                                                    },
                                                                    "http_output": {
                                                                        "type": "string",
                                                                        "description": "HTTP出力文字エンコーディング変換を設定します"
                                                                    },
                                                                    "encoding_translation": {
                                                                        "type": "string",
                                                                        "description": "内部文字エンコーディングへの変換を有効にするかどうかを設定します。On: 有効 / Off: 無効"
                                                                    },
                                                                    "detect_order": {
                                                                        "type": "string",
                                                                        "description": "文字コード検出を設定します"
                                                                    },
                                                                    "substitute_character": {
                                                                        "type": "string",
                                                                        "description": "無効な文字を代替する文字を設定します"
                                                                    }
                                                                }
                                                            },
                                                            "max_execution_time": {
                                                                "type": "string",
                                                                "description": "無限ループなどにより永続的に実行されているスクリプトが、強制終了されるまでの時間を秒単位で指定します"
                                                            },
                                                            "max_input_time": {
                                                                "type": "string",
                                                                "description": "スクリプトが POST、GET、そしてファイルアップロードなどの入力をパースする最大の時間を秒単位で指定します"
                                                            },
                                                            "memory_limit": {
                                                                "type": "string",
                                                                "description": "プログラムが使用できる最大メモリ数を指定します"
                                                            },
                                                            "post_max_size": {
                                                                "type": "string",
                                                                "description": "POSTデータの許容最大サイズを設定します"
                                                            },
                                                            "upload_max_filesize": {
                                                                "type": "string",
                                                                "description": "アップロードファイルの許容サイズを設定します"
                                                            },
                                                            "register_globals": {
                                                                "type": "string",
                                                                "description": "環境変数やGET値、POST値などの、PHPの外部からくる値を全て $変数名 という書式で使用可能とする設定を行います（PHP 5.3.0 で非推奨、Off推奨）。On: 有効 / Off: 無効"
                                                            },
                                                            "magic_quotes_gpc": {
                                                                "type": "string",
                                                                "description": "PHPのフォームより文字列データを取得する際、エスケープ処理（「'」や「\"」や「\\」の前に「\\」を追加）を自動で行うかどうかを設定します。On: 有効 / Off: 無効"
                                                            },
                                                            "safe_mode": {
                                                                "type": "string",
                                                                "description": "プログラムファイルの所有者が、プログラム内の関数によって処理されているファイル及びディレクトリの所有者と同一かの確認を行う設定をします(※user_ini_active が true のときは固定値を返します)。On: 有効 / Off: 無効"
                                                            },
                                                            "file_uploads": {
                                                                "type": "string",
                                                                "description": "HTTP ファイルアップロードを可能とするかどうかを設定します(※user_ini_active が true のときは固定値を返します)。On: 有効 / Off: 無効"
                                                            },
                                                            "allow_url_fopen": {
                                                                "type": "string",
                                                                "description": "URLオブジェクトに対してファイル同様の操作を可能とする設定をします(※user_ini_active が true のときは固定値を返します) (PHP 5.2以降)。On: 有効 / Off: 無効"
                                                            },
                                                            "allow_url_include": {
                                                                "type": "string",
                                                                "description": "include関数、include_once関数、require関数、require_once関数で、URL対応のfopenラッパーが使用できるようになります(※user_ini_active が true のときは固定値を返します)。On: 有効 / Off: 無効"
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/php-ini/{domain}": {
            "put": {
                "tags": [
                    "php.ini設定"
                ],
                "summary": "php.ini設定を更新",
                "description": "指定ドメインの php.ini 設定を更新します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。設定の反映には最大5分程度かかることがあります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "display_errors": {
                                        "type": "string",
                                        "description": "PHPプログラム実行時のエラー内容を画面に出力するかどうかを設定します。On: ブラウザ上にエラーを表示 / Off: ブラウザ上にエラーを表示しない",
                                        "example": "Off"
                                    },
                                    "error_reporting": {
                                        "type": "string",
                                        "description": "PHPプログラム実行時のエラー出力レベルを設定します",
                                        "example": "E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED"
                                    },
                                    "display_startup_errors": {
                                        "type": "string",
                                        "description": "PHP の起動シーケンスで発生するエラーを表示するかどうかを設定します。On: 表示する / Off: 表示しない",
                                        "example": "Off"
                                    },
                                    "session.auto_start": {
                                        "type": "string",
                                        "description": "リクエスト開始時にセッションを自動的に開始するかどうかを指定します。0: 自動開始しない / 1: 自動開始する",
                                        "example": "0"
                                    },
                                    "session.name": {
                                        "type": "string",
                                        "description": "クッキーに設定されるセッション名を指定します",
                                        "example": "PHPSESSID"
                                    },
                                    "session.use_cookies": {
                                        "type": "string",
                                        "description": "クライアント側へのセッションIDの保存に、クッキーを使用するかどうかを指定します。0: 使用しない / 1: 使用する",
                                        "example": "1"
                                    },
                                    "session.use_only_cookies": {
                                        "type": "string",
                                        "description": "クライアント側へのセッションIDの保存に、クッキーのみを使用可能とする指定を行います。0: クッキーのみに限定しない / 1: クッキーのみを使用",
                                        "example": "1"
                                    },
                                    "session.use_trans_sid": {
                                        "type": "string",
                                        "description": "URLへのセッションIDの設定を自動で行うかを設定します。0: 自動設定しない / 1: 自動設定する",
                                        "example": "0"
                                    },
                                    "session.cookie_lifetime": {
                                        "type": "string",
                                        "description": "クッキーの有効期間を（秒単位で）指定します。0を設定するとブラウザをクローズするまでセッションが有効となります",
                                        "example": "0"
                                    },
                                    "session.cookie_path": {
                                        "type": "string",
                                        "description": "クッキーを有効とするパスを指定します。ここで指定したパス以下へのアクセスのみクッキーが有効となります",
                                        "example": "/"
                                    },
                                    "session.cookie_domain": {
                                        "type": "string",
                                        "description": "クッキーを有効とするドメインを指定します",
                                        "example": ""
                                    },
                                    "mbstring.language": {
                                        "type": "string",
                                        "description": "デフォルトの言語を設定します",
                                        "example": "Japanese"
                                    },
                                    "mbstring.internal_encoding": {
                                        "type": "string",
                                        "description": "内部文字エンコーディングを設定します",
                                        "example": "UTF-8"
                                    },
                                    "mbstring.http_input": {
                                        "type": "string",
                                        "description": "HTTP入力文字エンコーディング変換を設定します",
                                        "example": "pass"
                                    },
                                    "mbstring.http_output": {
                                        "type": "string",
                                        "description": "HTTP出力文字エンコーディング変換を設定します",
                                        "example": "pass"
                                    },
                                    "mbstring.encoding_translation": {
                                        "type": "string",
                                        "description": "内部文字エンコーディングへの変換を有効にするかどうかを設定します。On: 有効 / Off: 無効",
                                        "example": "Off"
                                    },
                                    "mbstring.detect_order": {
                                        "type": "string",
                                        "description": "文字コード検出を設定します",
                                        "example": "auto"
                                    },
                                    "mbstring.substitute_character": {
                                        "type": "string",
                                        "description": "無効な文字を代替する文字を設定します",
                                        "example": "none"
                                    },
                                    "max_execution_time": {
                                        "type": "string",
                                        "description": "無限ループなどにより永続的に実行されているスクリプトが、強制終了されるまでの時間を秒単位で指定します",
                                        "example": "180"
                                    },
                                    "max_input_time": {
                                        "type": "string",
                                        "description": "スクリプトが POST、GET、そしてファイルアップロードなどの入力をパースする最大の時間を秒単位で指定します",
                                        "example": "-1"
                                    },
                                    "memory_limit": {
                                        "type": "string",
                                        "description": "プログラムが使用できる最大メモリ数を指定します",
                                        "example": "1G"
                                    },
                                    "post_max_size": {
                                        "type": "string",
                                        "description": "POSTデータの許容最大サイズを設定します",
                                        "example": "1G"
                                    },
                                    "upload_max_filesize": {
                                        "type": "string",
                                        "description": "アップロードファイルの許容サイズを設定します",
                                        "example": "1G"
                                    },
                                    "register_globals": {
                                        "type": "string",
                                        "description": "環境変数やGET値、POST値などの、PHPの外部からくる値を全て $変数名 という書式で使用可能とする設定を行います（PHP 5.3.0 で非推奨、Off推奨）。On: 有効 / Off: 無効",
                                        "example": "Off"
                                    },
                                    "magic_quotes_gpc": {
                                        "type": "string",
                                        "description": "PHPのフォームより文字列データを取得する際、エスケープ処理（「'」や「\"」や「\\」の前に「\\」を追加）を自動で行うかどうかを設定します。On: 有効 / Off: 無効",
                                        "example": "Off"
                                    },
                                    "safe_mode": {
                                        "type": "string",
                                        "description": "プログラムファイルの所有者が、プログラム内の関数によって処理されているファイル及びディレクトリの所有者と同一かの確認を行う設定をします(※user_ini_active が true のときは変更できません)。On: 有効 / Off: 無効",
                                        "example": "Off"
                                    },
                                    "file_uploads": {
                                        "type": "string",
                                        "description": "HTTP ファイルアップロードを可能とするかどうかを設定します(※user_ini_active が true のときは変更できません)。On: 有効 / Off: 無効",
                                        "example": "On"
                                    },
                                    "allow_url_fopen": {
                                        "type": "string",
                                        "description": "URLオブジェクトに対してファイル同様の操作を可能とする設定をします(※user_ini_active が true のときは変更できません)。On: 有効 / Off: 無効",
                                        "example": "On"
                                    },
                                    "allow_url_include": {
                                        "type": "string",
                                        "description": "include関数、include_once関数、require関数、require_once関数で、URL対応のfopenラッパーが使用できるようになります(※user_ini_active が true のときは変更できません)。On: 有効 / Off: 無効",
                                        "example": "Off"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/php-ini/{domain}/reset": {
            "post": {
                "tags": [
                    "php.ini設定"
                ],
                "summary": "php.ini設定を初期値に戻す",
                "description": "指定ドメインの php.ini をサーバー初期値で上書きします。取り消しできません。設定の反映には最大5分程度かかることがあります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/domain": {
            "get": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメイン一覧を取得",
                "description": "サーバーに追加済みのドメインの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domains": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン名"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "description": "ドメイン種別（例: addon = 追加ドメイン）"
                                                    },
                                                    "ssl": {
                                                        "type": "boolean",
                                                        "description": "SSL設定の有無"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "メモ"
                                                    },
                                                    "is_awaiting": {
                                                        "type": "boolean",
                                                        "description": "ドメイン設定反映待ちかどうか"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメインを追加",
                "description": "追加型ドメインをサーバーに追加します。追加時にドメイン所有権の確認（TXTレコード検証）が自動で実施されます。詳細は「ドメイン所有権確認」を参照してください。ssl を true にすると無料SSLも設定されます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "ドメイン名",
                                        "example": "example.com"
                                    },
                                    "ssl": {
                                        "type": "boolean",
                                        "description": "SSL設定（デフォルト: true）",
                                        "example": true
                                    },
                                    "redirect_https": {
                                        "type": "boolean",
                                        "description": "HTTPS転送設定（デフォルト: ssl と同じ値）",
                                        "example": true
                                    },
                                    "ai_crawler_block_enabled": {
                                        "type": "boolean",
                                        "description": "AIクローラー遮断設定（デフォルト: true）",
                                        "example": true
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": ""
                                    }
                                },
                                "required": [
                                    "domain"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain": {
                                            "type": "string",
                                            "description": "追加されたドメイン名"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        },
                                        "ssl_status": {
                                            "type": "string",
                                            "description": "SSL設定結果（ssl=true 指定時のみ）。success: 成功 / failed: 失敗 / failed_nameserver: ネームサーバー未設定のため失敗"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/domain/{domain}": {
            "get": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメイン詳細を取得",
                "description": "ドキュメントルート、PHPバージョン、SSL設定状況を含む詳細情報を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定。URLエンコードすること）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain": {
                                            "type": "string",
                                            "description": "ドメイン名"
                                        },
                                        "type": {
                                            "type": "string",
                                            "description": "ドメイン種別（例: addon = 追加ドメイン）"
                                        },
                                        "document_root": {
                                            "type": "string",
                                            "description": "ドキュメントルートの絶対パス"
                                        },
                                        "url": {
                                            "type": "string",
                                            "description": "サイトURL（SSL設定時は https）"
                                        },
                                        "php_version": {
                                            "type": "string",
                                            "description": "現在のPHPバージョン（例: 8.3）"
                                        },
                                        "ssl": {
                                            "type": "boolean",
                                            "description": "SSL証明書が設定されているかどうか"
                                        },
                                        "memo": {
                                            "type": "string",
                                            "description": "メモ"
                                        },
                                        "is_awaiting": {
                                            "type": "boolean",
                                            "description": "ドメイン設定反映待ちかどうか"
                                        },
                                        "created_at": {
                                            "type": "string",
                                            "description": "追加日"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメインのメモを更新",
                "description": "送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "メインサイト"
                                    }
                                },
                                "required": [
                                    "memo"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメインを削除",
                "description": "ドメインを削除します。delete_files を true にすると、ユーザー公開領域のドメインディレクトリも合わせて削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "delete_files": {
                                        "type": "boolean",
                                        "description": "ユーザー公開領域のドメインディレクトリも削除するか（デフォルト: false）",
                                        "example": false
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/domain/{domain}/reset": {
            "post": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメイン設定を初期化",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "リセット種別。all: 全初期化 / web: Web領域のみ初期化 / other: Web以外の設定を初期化",
                                        "example": "all"
                                    }
                                },
                                "required": [
                                    "type"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/subdomain": {
            "get": {
                "tags": [
                    "サブドメイン設定"
                ],
                "summary": "サブドメイン一覧を取得",
                "description": "登録済みサブドメインの一覧を返します。domain を指定すると、その親ドメインのサブドメインのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象の親ドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "subdomains": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "subdomain": {
                                                        "type": "string",
                                                        "description": "サブドメイン名（FQDN 形式。例: blog.example.com）"
                                                    },
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "親ドメイン名"
                                                    },
                                                    "document_root": {
                                                        "type": "string",
                                                        "description": "ドキュメントルートのパス"
                                                    },
                                                    "ssl": {
                                                        "type": "boolean",
                                                        "description": "SSL設定の有無"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "メモ"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "サブドメイン設定"
                ],
                "summary": "サブドメインを追加",
                "description": "短時間に連続して作成すると、一時的にエラーが返る場合があります。間隔をあけて再試行してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subdomain": {
                                        "type": "string",
                                        "description": "サブドメイン（例: blog.example.com）。日本語ドメインの場合はドメイン部分をPunycodeで指定",
                                        "example": "blog.example.com"
                                    },
                                    "document_root_type": {
                                        "type": "string",
                                        "description": "ドキュメントルート種別。subdomain_only（デフォルト）: /public_html/sub 形式 / full_subdomain: /public_html/sub.example.com 形式",
                                        "example": "subdomain_only"
                                    },
                                    "ssl": {
                                        "type": "boolean",
                                        "description": "SSL設定（デフォルト: true）",
                                        "example": true
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "ブログ用"
                                    }
                                },
                                "required": [
                                    "subdomain"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "subdomain": {
                                            "type": "string",
                                            "description": "追加されたサブドメイン（FQDN 形式）"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        },
                                        "ssl_status": {
                                            "type": "string",
                                            "description": "SSL設定結果（ssl=true 指定時のみ）。success: 成功 / failed: 失敗 / failed_nameserver: ネームサーバー未設定のため失敗"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/subdomain/{subdomain}": {
            "put": {
                "tags": [
                    "サブドメイン設定"
                ],
                "summary": "サブドメインのメモを更新",
                "description": "送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "subdomain",
                        "in": "path",
                        "required": true,
                        "description": "サブドメイン（日本語ドメインの場合はドメイン部分をPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ",
                                        "example": "ブログ用"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "サブドメイン設定"
                ],
                "summary": "サブドメインを削除",
                "description": "サブドメインを削除します。delete_files を true にすると、ユーザー公開領域のサブドメインディレクトリも合わせて削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "subdomain",
                        "in": "path",
                        "required": true,
                        "description": "サブドメイン（日本語ドメインの場合はドメイン部分をPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "delete_files": {
                                        "type": "boolean",
                                        "description": "ユーザー公開領域のサブドメインディレクトリも削除するか（デフォルト: false）",
                                        "example": false
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/ssl": {
            "get": {
                "tags": [
                    "SSL設定"
                ],
                "summary": "SSL設定一覧を取得",
                "description": "無料SSL（Let's Encrypt）およびオプションSSLの一覧を返します。domain を指定すると、そのドメインの証明書のみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ssl_list": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "SSL設定のID"
                                                    },
                                                    "common_name": {
                                                        "type": "string",
                                                        "description": "コモンネーム（ドメイン名）"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "description": "証明書種別。letsencrypt: 無料SSL（Let's Encrypt） / option: オプション独自SSL"
                                                    },
                                                    "expires_at": {
                                                        "type": "string",
                                                        "description": "有効期限（例: 2025-12-31）"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "状態。active: 有効 / expired: 期限切れ"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "SSL設定"
                ],
                "summary": "無料SSLをインストール",
                "description": "指定ドメインに対して無料SSL証明書（Let's Encrypt）を発行・インストールします。対象ドメインのネームサーバーが当社ネームサーバーの場合のみ利用可能です。外部ネームサーバーを利用中の場合はサーバーパネルから操作してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "common_name": {
                                        "type": "string",
                                        "description": "コモンネーム（ドメイン名。日本語ドメインの場合はPunycodeで指定）",
                                        "example": "example.com"
                                    }
                                },
                                "required": [
                                    "common_name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/ssl/{common_name}": {
            "delete": {
                "tags": [
                    "SSL設定"
                ],
                "summary": "無料SSLをアンインストール",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "common_name",
                        "in": "path",
                        "required": true,
                        "description": "Common Name（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/dns": {
            "get": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコード一覧を取得",
                "description": "ドメインに登録されたDNSレコードを一覧で返します。domain を指定すると、そのドメインのレコードのみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "records": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "DNSレコードID（PUT/DELETEで使用）"
                                                    },
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "対象ドメイン"
                                                    },
                                                    "host": {
                                                        "type": "string",
                                                        "description": "ホスト名（@ は apex）"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "description": "レコードタイプ。A / AAAA / CNAME / MX / TXT / SRV / NS"
                                                    },
                                                    "content": {
                                                        "type": "string",
                                                        "description": "レコードの値"
                                                    },
                                                    "ttl": {
                                                        "type": "integer",
                                                        "description": "TTL（秒）"
                                                    },
                                                    "priority": {
                                                        "type": "integer",
                                                        "description": "MX/SRVレコードの優先度。それ以外のレコードでは 0"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコードを追加",
                "description": "A, AAAA, CNAME, MX, TXT 等のレコードを追加します。MX の場合は priority を指定できます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "ドメイン（最大253文字。日本語ドメインの場合はPunycodeで指定）",
                                        "example": "example.com"
                                    },
                                    "host": {
                                        "type": "string",
                                        "description": "ホスト名（@ で apex、最大255文字）",
                                        "example": "www"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "レコードタイプ。A / AAAA / CNAME / MX / TXT / SRV / NS",
                                        "example": "A"
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "内容",
                                        "example": "192.0.2.1"
                                    },
                                    "ttl": {
                                        "type": "integer",
                                        "description": "TTL（60-86400。省略時 3600）",
                                        "example": 3600
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "MX レコードの優先度",
                                        "example": 10
                                    }
                                },
                                "required": [
                                    "domain",
                                    "host",
                                    "type",
                                    "content"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "description": "追加されたDNSレコードのID（PUT/DELETEで使用）"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/dns/{dns_id}": {
            "put": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコードを更新",
                "description": "送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。レコードを自動解決できない場合は domain, host, type, content の指定が必要です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "dns_id",
                        "in": "path",
                        "required": true,
                        "description": "DNSレコードID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "ドメイン（日本語ドメインの場合はPunycodeで指定）",
                                        "example": "example.com"
                                    },
                                    "host": {
                                        "type": "string",
                                        "description": "ホスト名",
                                        "example": "www"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "レコードタイプ",
                                        "example": "A"
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "内容",
                                        "example": "192.0.2.1"
                                    },
                                    "ttl": {
                                        "type": "integer",
                                        "description": "TTL（60-86400）",
                                        "example": 3600
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "MXレコードの優先度（省略時は現在の設定を維持）",
                                        "example": 10
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコードを削除",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "dns_id",
                        "in": "path",
                        "required": true,
                        "description": "DNSレコードID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/access-log": {
            "get": {
                "tags": [
                    "アクセスログ"
                ],
                "summary": "アクセスログを取得",
                "description": "指定ドメインのアクセスログを取得します。lines で末尾からの取得行数、keyword で絞り込みが可能です。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "ドメイン（日本語ドメインの場合はPunycodeで指定）"
                        }
                    },
                    {
                        "name": "lines",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "取得行数（末尾から。省略時は全件）"
                        }
                    },
                    {
                        "name": "keyword",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込みキーワード"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain": {
                                            "type": "string",
                                            "description": "対象ドメイン"
                                        },
                                        "log": {
                                            "type": "string",
                                            "description": "アクセスログ本文（改行区切り）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/error-log": {
            "get": {
                "tags": [
                    "エラーログ"
                ],
                "summary": "エラーログを取得",
                "description": "指定ドメインのエラーログを取得します。lines で末尾からの取得行数、keyword で絞り込みが可能です。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "ドメイン（日本語ドメインの場合はPunycodeで指定）"
                        }
                    },
                    {
                        "name": "lines",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "取得行数（末尾から）"
                        }
                    },
                    {
                        "name": "keyword",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込みキーワード"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain": {
                                            "type": "string",
                                            "description": "対象ドメイン"
                                        },
                                        "log": {
                                            "type": "string",
                                            "description": "エラーログ本文（改行区切り）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/x-accelerator": {
            "get": {
                "tags": [
                    "Xアクセラレータ設定"
                ],
                "summary": "Xアクセラレータ設定一覧を取得",
                "description": "契約ドメインごとの Xアクセラレータ設定を返します。domain を指定すると、そのドメインの設定のみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "x_accelerator_settings": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン名"
                                                    },
                                                    "xaccelerator_status": {
                                                        "type": "string",
                                                        "description": "Xアクセラレータ設定。off: OFF / v1: Xアクセラレータ Ver.1 / v2: Xアクセラレータ Ver.2"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/x-accelerator/{domain}": {
            "put": {
                "tags": [
                    "Xアクセラレータ設定"
                ],
                "summary": "Xアクセラレータ設定を変更",
                "description": "指定ドメインの Xアクセラレータ設定を変更します。サーバーキャッシュ ON 中の off 変更、PHP 7.2 未満での v2 変更は 409 を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "xaccelerator_status": {
                                        "type": "string",
                                        "description": "Xアクセラレータ設定。off: OFF / v1: Xアクセラレータ Ver.1 / v2: Xアクセラレータ Ver.2",
                                        "example": "v1"
                                    }
                                },
                                "required": [
                                    "xaccelerator_status"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/server-cache": {
            "get": {
                "tags": [
                    "サーバーキャッシュ設定"
                ],
                "summary": "サーバーキャッシュ設定一覧を取得",
                "description": "契約ドメインごとのサーバーキャッシュ設定を返します。domain を指定すると、そのドメインの設定のみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "server_cache_settings": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン名"
                                                    },
                                                    "server_cache_status": {
                                                        "type": "string",
                                                        "description": "サーバーキャッシュ設定。on: ON / off: OFF"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/server-cache/{domain}": {
            "put": {
                "tags": [
                    "サーバーキャッシュ設定"
                ],
                "summary": "サーバーキャッシュ設定を変更",
                "description": "指定ドメインのサーバーキャッシュ設定を変更します。ECサイトやログインが必要なサイトでは、キャッシュによる意図しない公開にご注意ください。サーバーキャッシュ ON 中は Xアクセラレータを off にできません（409）。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "server_cache_status": {
                                        "type": "string",
                                        "description": "サーバーキャッシュ設定。on: ON / off: OFF",
                                        "example": "on"
                                    }
                                },
                                "required": [
                                    "server_cache_status"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ。server_cache_status を on にし、更新後に Xアクセラレータが有効な場合は末尾に「(Xアクセラレータは現在有効です)」が付与されます"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/server-cache/{domain}/cache": {
            "delete": {
                "tags": [
                    "サーバーキャッシュ設定"
                ],
                "summary": "サーバーキャッシュの内容を削除",
                "description": "指定ドメインのキャッシュ内容を削除します。設定（ON/OFF）は変更しません。server_cache_status が off の場合は 409 を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/browser-cache": {
            "get": {
                "tags": [
                    "ブラウザキャッシュ設定"
                ],
                "summary": "ブラウザキャッシュ設定一覧を取得",
                "description": "契約ドメインごとのブラウザキャッシュ設定と反映状態（is_applied）を返します。domain を指定すると、そのドメインの設定のみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "browser_cache_settings": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン名"
                                                    },
                                                    "browser_cache_status": {
                                                        "type": "string",
                                                        "description": "ブラウザキャッシュ設定。all: ON（全ての静的ファイル） / ignore-css-js: ON（CSS/JavaScript以外） / off: OFF"
                                                    },
                                                    "is_applied": {
                                                        "type": "boolean",
                                                        "description": "Nginx 設定が反映済みかどうか（false の場合、反映に最大15分程度かかることがあります）"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/browser-cache/{domain}": {
            "put": {
                "tags": [
                    "ブラウザキャッシュ設定"
                ],
                "summary": "ブラウザキャッシュ設定を変更",
                "description": "指定ドメインのブラウザキャッシュ設定を変更します。反映には最大15分程度かかることがあります。反映状態は GET 一覧の is_applied で確認できます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "browser_cache_status": {
                                        "type": "string",
                                        "description": "ブラウザキャッシュ設定。all: ON（全ての静的ファイル） / ignore-css-js: ON（CSS/JavaScript以外） / off: OFF",
                                        "example": "all"
                                    }
                                },
                                "required": [
                                    "browser_cache_status"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/waf": {
            "get": {
                "tags": [
                    "WAF設定"
                ],
                "summary": "WAF設定一覧を取得",
                "description": "契約ドメインごとの WAF 設定を返します。domain を指定すると、そのドメインの設定のみに絞り込めます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込み対象のドメイン（省略時は全ドメイン。日本語ドメインの場合はPunycodeで指定。サブドメインでの絞り込みには対応していません）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "waf_settings": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "type": "string",
                                                        "description": "ドメイン名"
                                                    },
                                                    "xss_protection": {
                                                        "type": "object",
                                                        "properties": {
                                                            "enabled": {
                                                                "type": "boolean",
                                                                "description": "XSS対策の有効/無効"
                                                            },
                                                            "is_applied": {
                                                                "type": "boolean",
                                                                "description": "XSS対策の反映状態"
                                                            }
                                                        }
                                                    },
                                                    "sql_injection_protection": {
                                                        "type": "object",
                                                        "properties": {
                                                            "enabled": {
                                                                "type": "boolean",
                                                                "description": "SQL対策の有効/無効"
                                                            },
                                                            "is_applied": {
                                                                "type": "boolean",
                                                                "description": "SQL対策の反映状態"
                                                            }
                                                        }
                                                    },
                                                    "file_protection": {
                                                        "type": "object",
                                                        "properties": {
                                                            "enabled": {
                                                                "type": "boolean",
                                                                "description": "ファイル対策の有効/無効"
                                                            },
                                                            "is_applied": {
                                                                "type": "boolean",
                                                                "description": "ファイル対策の反映状態"
                                                            }
                                                        }
                                                    },
                                                    "mail_protection": {
                                                        "type": "object",
                                                        "properties": {
                                                            "enabled": {
                                                                "type": "boolean",
                                                                "description": "メール対策の有効/無効"
                                                            },
                                                            "is_applied": {
                                                                "type": "boolean",
                                                                "description": "メール対策の反映状態"
                                                            }
                                                        }
                                                    },
                                                    "command_protection": {
                                                        "type": "object",
                                                        "properties": {
                                                            "enabled": {
                                                                "type": "boolean",
                                                                "description": "コマンド対策の有効/無効"
                                                            },
                                                            "is_applied": {
                                                                "type": "boolean",
                                                                "description": "コマンド対策の反映状態"
                                                            }
                                                        }
                                                    },
                                                    "php_protection": {
                                                        "type": "object",
                                                        "properties": {
                                                            "enabled": {
                                                                "type": "boolean",
                                                                "description": "PHP対策の有効/無効"
                                                            },
                                                            "is_applied": {
                                                                "type": "boolean",
                                                                "description": "PHP対策の反映状態"
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/server/{servername}/waf/{domain}": {
            "put": {
                "tags": [
                    "WAF設定"
                ],
                "summary": "WAF設定を更新",
                "description": "指定ドメインの WAF 設定を更新します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。設定の反映には最大1時間程度かかることがあります。他の設定変更処理が実行中の場合は 422 を返します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（日本語ドメインの場合はPunycodeで指定）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サーバー名（初期ドメイン）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "xss_protection": {
                                        "type": "boolean",
                                        "description": "XSS対策。javascript 等のスクリプトタグを含むアクセスを検知",
                                        "example": true
                                    },
                                    "sql_injection_protection": {
                                        "type": "boolean",
                                        "description": "SQL対策。SQL構文に該当する文字列を含むアクセスを検知",
                                        "example": false
                                    },
                                    "file_protection": {
                                        "type": "boolean",
                                        "description": "ファイル対策。.htaccess 等の設定ファイル名を含むアクセスを検知",
                                        "example": true
                                    },
                                    "mail_protection": {
                                        "type": "boolean",
                                        "description": "メール対策。メールヘッダー関連の文字列を含むアクセスを検知",
                                        "example": false
                                    },
                                    "command_protection": {
                                        "type": "boolean",
                                        "description": "コマンド対策。kill、ftp 等のコマンド関連文字列を含むアクセスを検知",
                                        "example": false
                                    },
                                    "php_protection": {
                                        "type": "boolean",
                                        "description": "PHP対策。session やファイル操作関数等を含むアクセスを検知",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "サーバー側の制約により操作を完了できなかった（OPERATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "APIキーを Bearer トークンとして送信"
            }
        },
        "schemas": {
            "ErrorResponse": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "description": "エラーコード"
                            },
                            "message": {
                                "type": "string",
                                "description": "エラー内容"
                            },
                            "errors": {
                                "type": "array",
                                "description": "入力項目ごとの詳細。存在しない場合があります",
                                "items": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}