{
    "openapi": "3.0.3",
    "info": {
        "title": "XServer WordPress Hosting API",
        "description": "XServer for WordPress API は、XServer for WordPress のWPパネルで提供している主要機能（サイト管理・WordPress運用・ドメイン/DNS・PHP・ログ・Cron・SSH 等）を REST API で利用するためのインターフェースです。",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://api.xserver.ne.jp",
            "description": "XServer"
        }
    ],
    "security": [
        {
            "BearerAuth": [

            ]
        }
    ],
    "paths": {
        "/v1/me": {
            "get": {
                "tags": [
                    "APIキー情報"
                ],
                "summary": "認証中のAPIキー情報を取得",
                "description": "現在認証に使用しているAPIキーの情報を返します。有効期限・サービス種別を確認できます。",
                "x-scope": "読み取り",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "service_type": {
                                            "type": "string",
                                            "description": "APIキーのサービス種別。XServer for WordPress 用のキーでは wphosting"
                                        },
                                        "expires_at": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "有効期限。無期限の場合は null"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites": {
            "get": {
                "tags": [
                    "サイト情報"
                ],
                "summary": "サイト一覧を取得",
                "description": "ご契約内のすべてのWordPressサイト（本番・ステージング環境）を返します。WPパネルのサイト一覧に相当します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "sites": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "servername": {
                                                        "type": "string",
                                                        "description": "サイト環境の識別子"
                                                    },
                                                    "site_name": {
                                                        "type": "string",
                                                        "description": "サイト名"
                                                    },
                                                    "env_type": {
                                                        "type": "string",
                                                        "description": "環境種別（production / staging）"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "サイトの状態。setting: 作成中 / reset: 初期化中 / restore: 復元中 / sync: 同期中 / error: エラー / waiting_reload: 反映待ち / maintenance: メンテナンス / public: 公開 / private: 非公開 / suspend: 凍結中"
                                                    },
                                                    "site_url": {
                                                        "type": "string",
                                                        "description": "サイトURL"
                                                    },
                                                    "wp_version": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "WordPressバージョン"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "サイト作成・削除"
                ],
                "summary": "サイトを作成",
                "description": "ご契約内に新しいWordPressサイト（本番環境）を作成します。非同期で申し込みます。受け付け成功時は 202 で servername を返します。進捗は GET .../sites/{servername} の status で確認してください（setting → public/private、失敗時 error）。Idempotency-Key ヘッダー（任意）で再送時の重複実行を防げます。server_id で初期サイトURL（{server_id}.xwp.jp）を指定できます。未指定時は自動生成されます。サイト数・リソースは契約上限の範囲内です。上限到達・利用期限切れ・APIキーでサイト限定時は 409 です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "wp_sitename": {
                                        "type": "string",
                                        "description": "サイト名（WordPressのサイトタイトル）。全角127文字（半角255文字）以内",
                                        "example": "My Blog"
                                    },
                                    "wp_username": {
                                        "type": "string",
                                        "description": "WordPress管理ユーザー名。半角255文字以内。半角英数字、半角スペースと _-.@ が使用可能。条件を満たさない場合は 422 エラーになります",
                                        "example": "admin"
                                    },
                                    "wp_password": {
                                        "type": "string",
                                        "description": "WordPress管理ユーザーのパスワード。半角7文字以上64文字以内。半角英字と数字または記号をそれぞれ1文字以上含めてください。使用可能な文字は半角英数字と !#$%=~^|:_[]().+-*/@&<>`;?, です。wp_username と同じ文字列は指定できません。条件を満たさない場合は 422 エラーになります",
                                        "example": "Passw0rd!"
                                    },
                                    "wp_mailaddress": {
                                        "type": "string",
                                        "description": "WordPress管理ユーザーのメールアドレス。半角100文字以内。形式不正の場合は 422 エラーになります",
                                        "example": "admin@example.com"
                                    },
                                    "disk_limit_gb": {
                                        "type": "integer",
                                        "description": "このサイトに割り当てるディスク容量の上限（GB）。10 以上を指定してください（10 未満は 422 エラー）",
                                        "example": 10
                                    },
                                    "vcpu_limit": {
                                        "type": "integer",
                                        "description": "このサイトに割り当てる vCPU の上限（コア数）",
                                        "example": 1
                                    },
                                    "memory_limit_gb": {
                                        "type": "integer",
                                        "description": "このサイトに割り当てるメモリの上限（GB）",
                                        "example": 1
                                    },
                                    "server_id": {
                                        "type": "string",
                                        "description": "初期サイトURLのサーバーID（{server_id}.xwp.jp の部分）。アルファベット小文字で始まる半角英小字・数字のみ。未指定時は自動生成（例: xw123456）。形式不正・使用済みは 422 エラー"
                                    },
                                    "wp_theme": {
                                        "type": "string",
                                        "description": "インストールするWordPressテーマ。指定可能な値: default（WordPress標準テーマ）/ cocoon-master（Cocoon）/ lightning（Lightning）。未指定時は default"
                                    },
                                    "security_auto_optimize": {
                                        "type": "boolean",
                                        "description": "セキュリティ自動最適化モードを有効にするか。未指定時は true（有効）"
                                    },
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（管理用）"
                                    }
                                },
                                "required": [
                                    "wp_sitename",
                                    "wp_username",
                                    "wp_password",
                                    "wp_mailaddress",
                                    "disk_limit_gb",
                                    "vcpu_limit",
                                    "memory_limit_gb"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted（非同期処理を受け付けた）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servername": {
                                            "type": "string",
                                            "description": "作成されるサイト環境の識別子"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "非同期処理の進行確認先リソースのパス（サイト作成・ステージング作成はサイト詳細、バックアップ作成はバックアップ一覧、復元は復元履歴を指します）",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}": {
            "get": {
                "tags": [
                    "サイト情報"
                ],
                "summary": "サイト詳細を取得",
                "description": "指定したサイト環境の詳細（ドメイン・PHPバージョン・リソース割当・関連サイト等）を返します。WPパネルのサイト詳細に相当します。ディスク使用量は GET .../usage で確認できます。related_site には同一グループ内の関連サイト（本番↔ステージング）が含まれます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "site": {
                                            "type": "object",
                                            "properties": {
                                                "servername": {
                                                    "type": "string",
                                                    "description": "サイト環境の識別子"
                                                },
                                                "site_name": {
                                                    "type": "string",
                                                    "description": "サイト名"
                                                },
                                                "env_type": {
                                                    "type": "string",
                                                    "description": "環境種別（production / staging）"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "description": "サイトの状態。setting: 作成中 / reset: 初期化中 / restore: 復元中 / sync: 同期中 / error: エラー / waiting_reload: 反映待ち / maintenance: メンテナンス / public: 公開 / private: 非公開 / suspend: 凍結中"
                                                },
                                                "site_url": {
                                                    "type": "string",
                                                    "description": "サイトURL（表示用）"
                                                },
                                                "domain": {
                                                    "type": "string",
                                                    "description": "現在のドメイン（表示用）"
                                                },
                                                "wp_version": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "WordPressバージョン"
                                                },
                                                "php_version": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "PHPバージョン"
                                                },
                                                "is_multisite": {
                                                    "type": "boolean",
                                                    "description": "マルチサイトかどうか"
                                                },
                                                "security_auto_optimize": {
                                                    "type": "boolean",
                                                    "description": "セキュリティ自動最適化モードが有効かどうか"
                                                },
                                                "resource": {
                                                    "type": "object",
                                                    "properties": {
                                                        "disk_limit_gb": {
                                                            "type": "integer",
                                                            "description": "このサイトに割り当てられたディスク容量の上限（GB）"
                                                        },
                                                        "vcpu_limit": {
                                                            "type": "integer",
                                                            "description": "vCPU 上限（コア数）"
                                                        },
                                                        "memory_limit_gb": {
                                                            "type": "integer",
                                                            "description": "メモリ上限（GB）"
                                                        }
                                                    }
                                                },
                                                "related_site[]": {
                                                    "type": "object",
                                                    "properties": {
                                                        "servername": {
                                                            "type": "string",
                                                            "description": "関連サイトの識別子"
                                                        },
                                                        "domain": {
                                                            "type": "string",
                                                            "description": "関連サイトのドメイン"
                                                        },
                                                        "site_url": {
                                                            "type": "string",
                                                            "description": "関連サイトのURL"
                                                        },
                                                        "env_type": {
                                                            "type": "string",
                                                            "description": "関連サイトの環境種別（production / staging）"
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "delete": {
                "tags": [
                    "サイト作成・削除"
                ],
                "summary": "サイトを削除",
                "description": "指定したサイトを削除します。本番環境を指定した場合、関連するステージング環境も削除されます。非同期で申し込みます。受け付け成功時は 202 を返し、サイト一覧から即時に除外されます。削除したデータは復元できません。実行中の処理がある場合は 409 です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "削除するサイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted（非同期処理を受け付けた）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servername": {
                                            "type": "string",
                                            "description": "削除するサイト環境の識別子"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "非同期処理の進行確認先リソースのパス（サイト作成・ステージング作成はサイト詳細、バックアップ作成はバックアップ一覧、復元は復元履歴を指します）",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/usage": {
            "get": {
                "tags": [
                    "サイト情報"
                ],
                "summary": "利用状況を取得",
                "description": "ご契約の上限（ディスク・vCPU・メモリ・サイト数）と使用量、サイト別内訳を返します。WPパネルの利用状況に相当します。APIキーで対象サイトを限定している場合、per_site および disk.used_gb・sites.used は許可されたサイト分のみ返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "disk": {
                                            "type": "object",
                                            "properties": {
                                                "limit_gb": {
                                                    "type": "integer",
                                                    "description": "契約のディスク容量上限（GB）"
                                                },
                                                "used_gb": {
                                                    "type": "number",
                                                    "description": "使用中のディスク容量（GB）。per_site の disk_used_gb の合計"
                                                }
                                            }
                                        },
                                        "vcpu": {
                                            "type": "object",
                                            "properties": {
                                                "limit": {
                                                    "type": "integer",
                                                    "description": "vCPU 上限（コア数）"
                                                }
                                            }
                                        },
                                        "memory": {
                                            "type": "object",
                                            "properties": {
                                                "limit_gb": {
                                                    "type": "integer",
                                                    "description": "メモリ上限（GB）"
                                                }
                                            }
                                        },
                                        "sites": {
                                            "type": "object",
                                            "properties": {
                                                "limit": {
                                                    "type": "integer",
                                                    "nullable": true,
                                                    "description": "サイト数上限。null は無制限"
                                                },
                                                "used": {
                                                    "type": "integer",
                                                    "description": "使用中のサイト環境数（本番・ステージング各環境を1件としてカウント）"
                                                }
                                            }
                                        },
                                        "per_site": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "servername": {
                                                        "type": "string",
                                                        "description": "サイト環境の識別子"
                                                    },
                                                    "disk_used_gb": {
                                                        "type": "number",
                                                        "description": "当該サイト環境のディスク使用量（GB）"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/staging": {
            "post": {
                "tags": [
                    "ステージング環境"
                ],
                "summary": "ステージング環境を作成",
                "description": "指定した本番環境の複製としてステージング環境を作成します。1本番につき1ステージングまで。非同期で申し込みます。受け付け成功時は 202 で servername を返します。進捗は GET .../sites/{servername} の status で確認してください。既存ステージングあり・実行中処理・利用不可条件では 409 です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "複製元となる本番環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "disk_limit_gb": {
                                        "type": "integer",
                                        "description": "ステージング環境に割り当てるディスク容量の上限（GB）。10 以上を指定してください（10 未満は 422 エラー）",
                                        "example": 10
                                    },
                                    "vcpu_limit": {
                                        "type": "integer",
                                        "description": "ステージング環境に割り当てる vCPU の上限（コア数）",
                                        "example": 1
                                    },
                                    "memory_limit_gb": {
                                        "type": "integer",
                                        "description": "ステージング環境に割り当てるメモリの上限（GB）",
                                        "example": 1
                                    },
                                    "server_id": {
                                        "type": "string",
                                        "description": "ステージング環境URLのサーバーID（{server_id}.xwp.jp の部分）。アルファベット小文字で始まる半角英小字・数字のみ。未指定時は自動生成。形式不正・使用済みは 422 エラー"
                                    },
                                    "security_auto_optimize": {
                                        "type": "boolean",
                                        "description": "セキュリティ自動最適化モードを有効にするか。未指定時は true（有効）"
                                    }
                                },
                                "required": [
                                    "disk_limit_gb",
                                    "vcpu_limit",
                                    "memory_limit_gb"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted（非同期処理を受け付けた）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servername": {
                                            "type": "string",
                                            "description": "作成されるステージング環境の識別子"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "非同期処理の進行確認先リソースのパス（サイト作成・ステージング作成はサイト詳細、バックアップ作成はバックアップ一覧、復元は復元履歴を指します）",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/backups": {
            "get": {
                "tags": [
                    "バックアップ"
                ],
                "summary": "手動バックアップ一覧を取得",
                "description": "指定したサイトの手動バックアップの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "backups": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "backup_id": {
                                                        "type": "string",
                                                        "description": "バックアップの識別子（復元・削除APIで使用）"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "状態。waiting: 作成待ち / prepare: 準備中 / completed: 作成済み / failed: 失敗"
                                                    },
                                                    "memo": {
                                                        "type": "string",
                                                        "description": "作成時に指定したメモ"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "description": "作成受付日時"
                                                    },
                                                    "finished_at": {
                                                        "type": "string",
                                                        "description": "作成完了日時。waiting / prepare では null"
                                                    },
                                                    "expires_at": {
                                                        "type": "string",
                                                        "description": "保存期限。completed 以外では null"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "バックアップ"
                ],
                "summary": "手動バックアップを作成",
                "description": "指定したサイトの手動バックアップ（Web・メール・データベース）の作成を非同期で申し込みます。受け付け成功時は 202 で backup_id を返します。進捗は GET .../backups の status で確認してください（completed で作成済み、failed で失敗）。作成数上限到達・実行中処理がある場合は 409 です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "バックアップを作成するサイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "memo": {
                                        "type": "string",
                                        "description": "メモ（管理用・255文字まで）"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted（非同期処理を受け付けた）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servername": {
                                            "type": "string",
                                            "description": "対象サイト環境の識別子"
                                        },
                                        "backup_id": {
                                            "type": "string",
                                            "description": "作成されるバックアップの識別子"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "非同期処理の進行確認先リソースのパス（サイト作成・ステージング作成はサイト詳細、バックアップ作成はバックアップ一覧、復元は復元履歴を指します）",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/backups/{backup_id}/restore": {
            "post": {
                "tags": [
                    "バックアップ"
                ],
                "summary": "手動バックアップから復元",
                "description": "指定した手動バックアップの内容でサイトを復元します。現在の内容は上書きされ、取り消しできません。completed のバックアップのみ復元可能です。非同期で申し込みます。成否は GET .../backups/restore-history の status で確認してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "復元するサイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "backup_id",
                        "in": "path",
                        "required": true,
                        "description": "復元に使うバックアップの識別子。手動バックアップ一覧API（GET .../backups）の backup_id で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted（非同期処理を受け付けた）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "servername": {
                                            "type": "string",
                                            "description": "復元するサイト環境の識別子"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "非同期処理の進行確認先リソースのパス（サイト作成・ステージング作成はサイト詳細、バックアップ作成はバックアップ一覧、復元は復元履歴を指します）",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/backups/restore-history": {
            "get": {
                "tags": [
                    "バックアップ"
                ],
                "summary": "復元履歴を取得",
                "description": "指定したサイトのバックアップ復元履歴を新しい順で返します。手動・自動バックアップからの復元を含みます。復元申込後の成否確認に使用してください。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "restores": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "restore_id": {
                                                        "type": "integer",
                                                        "description": "復元処理のID"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "description": "復元の種別。手動バックアップからの復元 / 自動バックアップからの復元"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "状態。waiting: 実行待ち / running: 実行中 / completed: 完了 / failed: 失敗"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "受付日時"
                                                    },
                                                    "started_at": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "実行開始日時"
                                                    },
                                                    "finished_at": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "完了日時"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/backups/{backup_id}": {
            "delete": {
                "tags": [
                    "バックアップ"
                ],
                "summary": "手動バックアップを削除",
                "description": "指定した手動バックアップを削除します。削除したバックアップは復元に使用できなくなります。実行中の処理がある場合は 409 です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "backup_id",
                        "in": "path",
                        "required": true,
                        "description": "削除するバックアップの識別子。手動バックアップ一覧API（GET .../backups）の backup_id で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/wordpress": {
            "get": {
                "tags": [
                    "WordPressバージョン"
                ],
                "summary": "WordPressバージョン情報を取得",
                "description": "WordPressのバージョン・更新の有無・自動更新設定を返します。更新が利用可能な場合のみ latest_version にバージョンが入り、最新の場合は null です。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "wordpress": {
                                            "type": "object",
                                            "properties": {
                                                "version": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "現在インストールされている WordPress のバージョン"
                                                },
                                                "latest_version": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "WordPress.org 上で利用可能な更新先バージョン。更新がない場合は null"
                                                },
                                                "update_available": {
                                                    "type": "boolean",
                                                    "description": "更新が利用可能か（latest_version が null でないとき true）"
                                                },
                                                "auto_update": {
                                                    "type": "boolean",
                                                    "description": "自動更新が有効か（auto_update_scope が none 以外のとき true）"
                                                },
                                                "auto_update_scope": {
                                                    "type": "string",
                                                    "description": "自動更新スコープ。none: 無効 / minor: マイナー更新のみ / all: すべて（メジャー更新を含む）"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "WordPressバージョン"
                ],
                "summary": "WordPressバージョンの設定を変更",
                "description": "WordPress本体の自動更新設定（スコープ）を変更します。auto_update_scope のみ指定可能です。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "auto_update_scope": {
                                        "type": "string",
                                        "description": "自動更新スコープ。none: 無効 / minor: マイナー更新のみ / all: すべて（メジャー更新を含む）",
                                        "example": "minor"
                                    }
                                },
                                "required": [
                                    "auto_update_scope"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "wordpress": {
                                            "type": "object",
                                            "properties": {
                                                "auto_update": {
                                                    "type": "boolean",
                                                    "description": "変更後の自動更新が有効か（auto_update_scope が none 以外のとき true）"
                                                },
                                                "auto_update_scope": {
                                                    "type": "string",
                                                    "description": "変更後の自動更新スコープ。none: 無効 / minor: マイナー更新のみ / all: すべて（メジャー更新を含む）"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/wordpress/update": {
            "post": {
                "tags": [
                    "WordPressバージョン"
                ],
                "summary": "WordPress本体を更新",
                "description": "WordPress本体を最新バージョンへ更新します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "wordpress": {
                                            "type": "object",
                                            "properties": {
                                                "version": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "更新後のバージョン"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/maintenance-mode": {
            "get": {
                "tags": [
                    "メンテナンスモード"
                ],
                "summary": "メンテナンスモードを取得",
                "description": "サイトのメンテナンスモードの状態を返します。管理画面へのアクセス許可やメンテナンス画面の文言設定はWPパネルから行ってください。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "maintenance_mode": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean",
                                                    "description": "メンテナンスモードが有効か"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "メンテナンスモード"
                ],
                "summary": "メンテナンスモードを切替",
                "description": "サイトのメンテナンスモードを有効・無効に切り替えます。有効にするとWPパネルと同じカスタムメンテナンス画面が表示されます。管理画面へのアクセス許可やメンテナンス画面の文言設定はWPパネルから行ってください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "メンテナンスモードを有効にするか"
                                    }
                                },
                                "required": [
                                    "enabled"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "maintenance_mode": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean",
                                                    "description": "変更後の状態"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/plugins": {
            "get": {
                "tags": [
                    "プラグイン"
                ],
                "summary": "プラグイン一覧を取得",
                "description": "インストール済みプラグインの一覧（状態・バージョン・更新有無・自動更新）を返します。WPパネル「プラグイン管理」と同じ条件で返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "plugins": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "plugin": {
                                                        "type": "string",
                                                        "description": "プラグインslug"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "description": "プラグイン名"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "状態（active / inactive）"
                                                    },
                                                    "version": {
                                                        "type": "string",
                                                        "description": "バージョン"
                                                    },
                                                    "update_available": {
                                                        "type": "boolean",
                                                        "description": "更新の有無"
                                                    },
                                                    "update_version": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "更新先バージョン。update_available が true のとき WordPress.org 上の最新版。false のときは null"
                                                    },
                                                    "auto_update": {
                                                        "type": "boolean",
                                                        "description": "自動更新の有無"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "プラグイン"
                ],
                "summary": "プラグインをインストール",
                "description": "WordPress.org 公式リポジトリのプラグインを slug 指定でインストールします。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "plugin": {
                                        "type": "string",
                                        "description": "プラグインslug",
                                        "example": "akismet"
                                    },
                                    "activate": {
                                        "type": "boolean",
                                        "description": "インストール後に有効化するか",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "plugin"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "plugin": {
                                            "type": "object",
                                            "properties": {
                                                "plugin": {
                                                    "type": "string",
                                                    "description": "インストールしたプラグインの slug"
                                                },
                                                "activated": {
                                                    "type": "boolean",
                                                    "description": "有効化されたか"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/plugins/{plugin}": {
            "put": {
                "tags": [
                    "プラグイン"
                ],
                "summary": "プラグインの状態を変更",
                "description": "プラグインの有効/無効・自動更新設定を変更します。送信した項目のみ更新されます。バージョン更新は別APIです。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "plugin",
                        "in": "path",
                        "required": true,
                        "description": "プラグインslug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "active / inactive"
                                    },
                                    "auto_update": {
                                        "type": "boolean",
                                        "description": "自動更新の有無"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "plugin": {
                                            "type": "object",
                                            "description": "対象プラグイン"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "delete": {
                "tags": [
                    "プラグイン"
                ],
                "summary": "プラグインを削除",
                "description": "指定したプラグインを削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "plugin",
                        "in": "path",
                        "required": true,
                        "description": "プラグインslug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/plugins/{plugin}/update": {
            "post": {
                "tags": [
                    "プラグイン"
                ],
                "summary": "プラグインを更新",
                "description": "プラグインを最新バージョンへ更新します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "plugin",
                        "in": "path",
                        "required": true,
                        "description": "プラグインslug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "plugin": {
                                            "type": "object",
                                            "description": "対象プラグイン"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/themes": {
            "get": {
                "tags": [
                    "テーマ"
                ],
                "summary": "テーマ一覧を取得",
                "description": "インストール済みテーマの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "themes": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "theme": {
                                                        "type": "string",
                                                        "description": "テーマslug"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "description": "テーマ名"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "状態（active / inactive）"
                                                    },
                                                    "version": {
                                                        "type": "string",
                                                        "description": "バージョン"
                                                    },
                                                    "update_available": {
                                                        "type": "boolean",
                                                        "description": "更新の有無"
                                                    },
                                                    "update_version": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "更新先バージョン。update_available が true のとき WordPress.org 上の最新版。false のときは null"
                                                    },
                                                    "auto_update": {
                                                        "type": "boolean",
                                                        "description": "自動更新の有無"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "テーマ"
                ],
                "summary": "テーマをインストール",
                "description": "WordPress.org 公式リポジトリのテーマを slug 指定でインストールします。提供WordPressテーマ（Cocoon、Xwrite 等）のインストールはできません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "theme": {
                                        "type": "string",
                                        "description": "テーマslug",
                                        "example": "twentytwentyfive"
                                    },
                                    "activate": {
                                        "type": "boolean",
                                        "description": "インストール後に有効化するか",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "theme"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "theme": {
                                            "type": "object",
                                            "properties": {
                                                "theme": {
                                                    "type": "string",
                                                    "description": "インストールしたテーマの slug"
                                                },
                                                "activated": {
                                                    "type": "boolean",
                                                    "description": "有効化されたか"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/themes/{theme}": {
            "put": {
                "tags": [
                    "テーマ"
                ],
                "summary": "テーマの状態を変更",
                "description": "テーマの有効化・自動更新設定を変更します。送信した項目のみ更新されます。status は active（有効化）のみ指定可能で、無効化は API では提供しません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "theme",
                        "in": "path",
                        "required": true,
                        "description": "テーマslug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "active（有効化のみ指定可能）"
                                    },
                                    "auto_update": {
                                        "type": "boolean",
                                        "description": "自動更新の有無"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "theme": {
                                            "type": "object",
                                            "description": "対象テーマ"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "delete": {
                "tags": [
                    "テーマ"
                ],
                "summary": "テーマを削除",
                "description": "指定したテーマを削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "theme",
                        "in": "path",
                        "required": true,
                        "description": "テーマslug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/themes/{theme}/update": {
            "post": {
                "tags": [
                    "テーマ"
                ],
                "summary": "テーマを更新",
                "description": "テーマを最新バージョンへ更新します。提供WordPressテーマ（Cocoon、Xwrite 等）の更新はできません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "theme",
                        "in": "path",
                        "required": true,
                        "description": "テーマslug",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "theme": {
                                            "type": "object",
                                            "description": "対象テーマ"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/domains": {
            "get": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメイン設定一覧を取得",
                "description": "サイトに設定されているドメインの一覧（Web/SSL状態・サイトURLフラグ）を返します。初期ドメインを含み、削除済みの独自ドメインは含めません。ステージング環境では利用できません。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "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": "ドメイン名"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "Web設定の状態。awaiting_verification: 認証待ち / verifying: 認証中 / verification_failed: 認証エラー / pending_reflection: 反映待ち / active: 有効"
                                                    },
                                                    "ssl_status": {
                                                        "type": "string",
                                                        "description": "SSLの状態。unavailable: Web設定が有効化前 / not_installed: 無効 / verifying: 認証中 / verification_failed: 認証エラー / pending_reflection: 反映待ち / active: 有効"
                                                    },
                                                    "is_site_url": {
                                                        "type": "boolean",
                                                        "description": "現在のサイトURL（プライマリドメイン）か"
                                                    },
                                                    "is_default": {
                                                        "type": "boolean",
                                                        "description": "初期ドメイン（servername と同値）か。DELETE 不可"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメイン設定を追加",
                "description": "サイトにドメインを追加します。所有者確認が必要な場合は verification 情報（TXTレコード）を返します。DNS設定後、所有者確認APIを実行してください。一度削除した同一ドメインは再追加できます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "追加するドメイン",
                                        "example": "example.com"
                                    }
                                },
                                "required": [
                                    "domain"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain": {
                                            "type": "object",
                                            "properties": {
                                                "domain": {
                                                    "type": "string",
                                                    "description": "追加したドメイン名"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "description": "Web設定の状態（要確認時は awaiting_verification）"
                                                }
                                            }
                                        },
                                        "verification": {
                                            "type": "object",
                                            "nullable": true,
                                            "description": "所有者確認が必要な場合のTXTレコード情報",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "description": "所有者確認の状態（awaiting_verification）"
                                                },
                                                "txt_record_name": {
                                                    "type": "string",
                                                    "description": "DNSに設定するTXTレコード名"
                                                },
                                                "txt_record_value": {
                                                    "type": "string",
                                                    "description": "DNSに設定するTXTレコード値"
                                                },
                                                "note": {
                                                    "type": "string",
                                                    "description": "所有者確認の手順メッセージ"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/domains/{domain}/verify": {
            "post": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメインの所有者確認を実行",
                "description": "追加したドメインの所有者確認（TXTレコード検証）を実行します。成功時にWeb設定・無料SSL・リダイレクトが適用されます。確認済みのドメインへの再実行は 200 で完了状態を返します。TXTレコード反映前や処理中の再実行は失敗します。反映には数分〜数十分かかることがあります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "対象ドメイン",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain": {
                                            "type": "object",
                                            "properties": {
                                                "domain": {
                                                    "type": "string",
                                                    "description": "確認したドメイン名"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "description": "Web設定の状態（pending_reflection または active）"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/domains/{domain}": {
            "delete": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "ドメイン設定を削除",
                "description": "指定したドメイン設定を削除します。現在のサイトURLに設定中のドメインは削除できません。ステージング環境では利用できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "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）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/site-url": {
            "put": {
                "tags": [
                    "ドメイン設定"
                ],
                "summary": "サイトURLを変更",
                "description": "現在のサイトURL（プライマリドメイン）を変更します。初期ドメインおよび独自ドメインの両方を指定できます。WordPress内のURL置換が実行されます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain": {
                                        "type": "string",
                                        "description": "新しいサイトURLにするドメイン",
                                        "example": "example.com"
                                    },
                                    "auto_redirect": {
                                        "type": "boolean",
                                        "description": "旧URLからの301リダイレクトを自動設定するか（既定 true）"
                                    }
                                },
                                "required": [
                                    "domain"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "site_url": {
                                            "type": "object",
                                            "properties": {
                                                "domain": {
                                                    "type": "string",
                                                    "description": "変更後のドメイン"
                                                },
                                                "site_url": {
                                                    "type": "string",
                                                    "description": "変更後のサイトURL"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/domains/{domain}/dns": {
            "get": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコード一覧を取得",
                "description": "当社ネームサーバーを利用している独自ドメインの DNS レコード一覧を返します。初期ドメインは DNS 管理対象外です。ステージング環境では利用できません。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "対象ドメイン（独自ドメイン。is_default: false）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "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"
                                                    },
                                                    "content": {
                                                        "type": "string",
                                                        "description": "レコードの値"
                                                    },
                                                    "ttl": {
                                                        "type": "integer",
                                                        "description": "TTL（秒）"
                                                    },
                                                    "priority": {
                                                        "type": "integer",
                                                        "description": "MX/SRVレコードの優先度。それ以外のレコードでは 0"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコードを追加",
                "description": "DNSレコードを追加します。対象は独自ドメインに限ります。NS レコードは追加できません。所有者確認が完了していないドメインでは編集できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "対象ドメイン（独自ドメイン。is_default: false）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "host": {
                                        "type": "string",
                                        "description": "ホスト名（@ で apex、相対名または FQDN、最大255文字）",
                                        "example": "www"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "レコードタイプ。A / AAAA / CNAME / MX / TXT / SRV（NS は非対応）",
                                        "example": "A"
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "内容（最大1024文字。type に応じた形式チェックあり。A は IPv4 形式）",
                                        "example": "192.0.2.1"
                                    },
                                    "ttl": {
                                        "type": "integer",
                                        "description": "TTL（60-86400。省略時 3600）",
                                        "example": 3600
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "MX / SRV レコードの優先度（0～65535。省略時 0）",
                                        "example": 10
                                    }
                                },
                                "required": [
                                    "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）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/domains/{domain}/dns/{dns_id}": {
            "put": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコードを変更",
                "description": "DNSレコードを変更します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。更新するフィールドが1つも指定されなかった場合は 422 を返します。対象は独自ドメインに限ります。所有者確認が完了していないドメインでは編集できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "対象ドメイン（独自ドメイン。is_default: false）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "dns_id",
                        "in": "path",
                        "required": true,
                        "description": "DNSレコードID（GET の records[].id）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "host": {
                                        "type": "string",
                                        "description": "ホスト名（@ で apex、相対名または FQDN）",
                                        "example": "www"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "レコードタイプ。A / AAAA / CNAME / MX / TXT / SRV（NS は非対応）",
                                        "example": "A"
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "内容（最大1024文字。type に応じた形式チェックあり。A は IPv4 形式）",
                                        "example": "192.0.2.1"
                                    },
                                    "ttl": {
                                        "type": "integer",
                                        "description": "TTL（60-86400）",
                                        "example": 3600
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "MX / SRV レコードの優先度（0～65535）",
                                        "example": 10
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "delete": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコードを削除",
                "description": "DNSレコードを削除します。対象は独自ドメインに限ります。存在しない dns_id を指定した場合は 404 を返します。所有者確認が完了していないドメインでは編集できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "description": "対象ドメイン（独自ドメイン。is_default: false）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "dns_id",
                        "in": "path",
                        "required": true,
                        "description": "DNSレコードID（GET の records[].id）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/php-version": {
            "get": {
                "tags": [
                    "PHPバージョン設定"
                ],
                "summary": "PHPバージョンを取得",
                "description": "現在のPHPバージョンと利用可能なバージョン一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "php_version": {
                                            "type": "object",
                                            "properties": {
                                                "current": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "現在のPHPバージョン"
                                                },
                                                "available": {
                                                    "type": "object",
                                                    "description": "選択可能なPHPバージョン。キーがバージョン番号、値が表示名称（例: {\"8.3\": \"PHP8.3.30（推奨）\", \"8.2\": \"PHP8.2.28（非推奨）\"}）"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "PHPバージョン設定"
                ],
                "summary": "PHPバージョンを変更",
                "description": "PHPバージョンを変更します。同一バージョンを指定した場合は php_version.changed が false になり、実際には変更されません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "version": {
                                        "type": "string",
                                        "description": "変更先バージョン（GET .../php-version の available のキー。例: 8.3）",
                                        "example": "8.3"
                                    }
                                },
                                "required": [
                                    "version"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "php_version": {
                                            "type": "object",
                                            "properties": {
                                                "current": {
                                                    "type": "string",
                                                    "description": "変更後のバージョン"
                                                },
                                                "previous": {
                                                    "type": "string",
                                                    "nullable": true,
                                                    "description": "変更前のバージョン"
                                                },
                                                "changed": {
                                                    "type": "boolean",
                                                    "description": "バージョンが変更されたか（同一版本を指定した場合は false）"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ（常に「PHPバージョンを変更しました」。サーバー API 同様。実際の変更有無は php_version.changed を参照）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/access-log": {
            "get": {
                "tags": [
                    "ログ"
                ],
                "summary": "アクセスログを取得",
                "description": "サイトのアクセスログを取得します。行数指定・キーワード検索が可能です（全文取得は不可）。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "対象日（YYYY-MM-DD）。省略時および当日を指定した場合はローテーション前の当日ログ。前日以前を指定した場合は該当日のアーカイブログ（.gz）を参照"
                        }
                    },
                    {
                        "name": "keyword",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込みキーワード"
                        }
                    },
                    {
                        "name": "line_number",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "取得行数（1〜50000）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "access_log": {
                                            "type": "object",
                                            "properties": {
                                                "contents": {
                                                    "type": "string",
                                                    "description": "ログ内容"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/error-log": {
            "get": {
                "tags": [
                    "ログ"
                ],
                "summary": "エラーログを取得",
                "description": "サイトのエラーログを取得します。行数指定・キーワード検索が可能です（全文取得は不可）。日付指定は不可で、当日分のみ取得します。WPパネルと同じ条件です。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "keyword",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "絞り込みキーワード"
                        }
                    },
                    {
                        "name": "line_number",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "取得行数（1〜50000）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error_log": {
                                            "type": "object",
                                            "properties": {
                                                "contents": {
                                                    "type": "string",
                                                    "description": "ログ内容"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/cron": {
            "get": {
                "tags": [
                    "Cron設定"
                ],
                "summary": "Cron一覧を取得",
                "description": "登録済みのCron設定を一覧で返します。各要素の id は PUT/DELETE で指定するハッシュIDです。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "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）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "Cron設定"
                ],
                "summary": "Cronを新規追加",
                "description": "新しいCron設定を追加します。レスポンスの id は後続の PUT・DELETE で使用します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "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": "実行コマンド（最大5000文字）",
                                        "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）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/cron/{cron_id}": {
            "put": {
                "tags": [
                    "Cron設定"
                ],
                "summary": "Cronを変更",
                "description": "既存のCron設定を変更します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。空文字を明示送信した場合は空で上書きされます。更新するフィールドが1つも指定されなかった場合は422を返します。スケジュール・コマンド・コメントなどの内容を変更すると id が変わります。後続の PUT/DELETE ではレスポンスの新しい id を使用してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cron_id",
                        "in": "path",
                        "required": true,
                        "description": "CronのハッシュID（一覧取得で得られる id）",
                        "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）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Cron設定"
                ],
                "summary": "Cronを削除",
                "description": "指定したCron設定を削除します。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cron_id",
                        "in": "path",
                        "required": true,
                        "description": "CronのハッシュID（一覧取得で得られる id）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/ssh": {
            "get": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH設定を取得",
                "description": "SSH接続の有効/無効、国外アクセス制限の状態、接続情報、登録済み公開鍵数を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "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）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH設定を変更",
                "description": "SSH接続の有効/無効、国外アクセス制限の有効/無効を変更します。変更したいフィールドのみ送信してください。SSH公開鍵の登録・更新・削除の結果によっては、SSH接続および国外アクセス制限が自動で有効/無効される場合があります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "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接続状態（送信時のみ。未送信の項目は null）"
                                        },
                                        "abroad_access_restriction": {
                                            "type": "boolean",
                                            "description": "変更後の国外制限状態（送信時のみ。未送信の項目は null）"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/ssh/key": {
            "get": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH公開鍵一覧を取得",
                "description": "登録済みSSH公開鍵の一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "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）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH公開鍵を登録",
                "description": "公開鍵を手動で登録するか、generate: true でサーバー側で鍵ペアを自動生成します。自動生成時は秘密鍵がレスポンスに含まれます（発行時の1回のみ）。公開鍵が最初に登録される場合は、SSH接続および国外アクセス制限が自動で有効になります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "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": "処理結果メッセージ。有効な公開鍵が0件だった場合は suffix が付加される場合があります"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/ssh/key/{key_id}": {
            "put": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH公開鍵を更新",
                "description": "ラベルやステータス（on/off）を変更します。変更したいフィールドのみ送信してください。ステータスの変更により、公開鍵が有効になる一つ目の場合は SSH接続および国外アクセス制限が自動で有効になります。有効な公開鍵が0件になる場合は SSH接続および国外アクセス制限が自動で無効になります。SSH接続設定が無効の状態では更新できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "key_id",
                        "in": "path",
                        "required": true,
                        "description": "公開鍵ID",
                        "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）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "delete": {
                "tags": [
                    "SSH設定"
                ],
                "summary": "SSH公開鍵を削除",
                "description": "指定したSSH公開鍵を削除します。公開鍵がすべて削除されて有効な公開鍵が0件になる場合は、SSH接続および国外アクセス制限が自動で無効になります。SSH接続設定が無効の状態では削除できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "key_id",
                        "in": "path",
                        "required": true,
                        "description": "公開鍵ID",
                        "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）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/wp-users": {
            "get": {
                "tags": [
                    "WordPressユーザー"
                ],
                "summary": "WordPressユーザー一覧を取得",
                "description": "指定したサイトのWordPressユーザーの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "ユーザー名等の部分一致で絞り込み（半角英数字と _ - . @）"
                        }
                    },
                    {
                        "name": "orderby",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "並び替え項目（ID / user_login / display_name / user_email / user_registered）"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "並び順（asc / desc）"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "wp_users": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "WordPressユーザーID（詳細・更新・削除APIで使用）"
                                                    },
                                                    "user_login": {
                                                        "type": "string",
                                                        "description": "ユーザー名（ログインID）"
                                                    },
                                                    "display_name": {
                                                        "type": "string",
                                                        "description": "表示名"
                                                    },
                                                    "user_email": {
                                                        "type": "string",
                                                        "description": "メールアドレス"
                                                    },
                                                    "roles": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "description": "権限グループの配列（例: [\"administrator\"]）。WordPressのユーザーは複数の権限グループを持てるため、1件の場合も配列で返します"
                                                    },
                                                    "user_registered": {
                                                        "type": "string",
                                                        "description": "登録日時"
                                                    },
                                                    "user_url": {
                                                        "type": "string",
                                                        "description": "サイトURL（WordPressプロフィールの「Webサイト」欄。未設定時は空文字）"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "WordPressユーザー"
                ],
                "summary": "WordPressユーザーを作成",
                "description": "指定したサイトにWordPressユーザーを作成します。role に指定できる値は GET .../wp-users/roles で確認できます。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_login": {
                                        "type": "string",
                                        "description": "ユーザー名（半角英数字と _ - . @ のみ・60文字以内）",
                                        "example": "author01"
                                    },
                                    "user_email": {
                                        "type": "string",
                                        "description": "メールアドレス",
                                        "example": "author01@example.com"
                                    },
                                    "user_pass": {
                                        "type": "string",
                                        "description": "パスワード（半角7文字以上64文字以内）",
                                        "example": "Passw0rd!"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "権限グループ（例: administrator / editor / author / contributor / subscriber）",
                                        "example": "author"
                                    },
                                    "display_name": {
                                        "type": "string",
                                        "description": "表示名"
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "名"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "姓"
                                    },
                                    "user_url": {
                                        "type": "string",
                                        "description": "サイトURL"
                                    },
                                    "send_email": {
                                        "type": "boolean",
                                        "description": "新規ユーザーへアカウントに関するメールを送信するか（未指定時は送信しない）",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "user_login",
                                    "user_email",
                                    "user_pass",
                                    "role"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "wp_user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "description": "作成されたWordPressユーザーID"
                                                },
                                                "user_login": {
                                                    "type": "string",
                                                    "description": "ユーザー名"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/wp-users/{user_id}": {
            "get": {
                "tags": [
                    "WordPressユーザー"
                ],
                "summary": "WordPressユーザー詳細を取得",
                "description": "指定したWordPressユーザーの情報を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_id",
                        "in": "path",
                        "required": true,
                        "description": "WordPressユーザーID。ユーザー一覧API（GET .../wp-users）の id で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "wp_user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "description": "WordPressユーザーID"
                                                },
                                                "user_login": {
                                                    "type": "string",
                                                    "description": "ユーザー名（ログインID）"
                                                },
                                                "display_name": {
                                                    "type": "string",
                                                    "description": "表示名"
                                                },
                                                "user_email": {
                                                    "type": "string",
                                                    "description": "メールアドレス"
                                                },
                                                "roles": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "description": "権限グループの配列（例: [\"editor\"]）。WordPressのユーザーは複数の権限グループを持てるため、1件の場合も配列で返します"
                                                },
                                                "user_registered": {
                                                    "type": "string",
                                                    "description": "登録日時"
                                                },
                                                "user_url": {
                                                    "type": "string",
                                                    "description": "サイトURL（WordPressプロフィールの「Webサイト」欄。未設定時は空文字）"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "WordPressユーザー"
                ],
                "summary": "WordPressユーザーを更新",
                "description": "指定したWordPressユーザーの情報を更新します。送信した項目のみ更新されます（いずれか1つ以上必須）。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_id",
                        "in": "path",
                        "required": true,
                        "description": "WordPressユーザーID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_email": {
                                        "type": "string",
                                        "description": "メールアドレス"
                                    },
                                    "user_pass": {
                                        "type": "string",
                                        "description": "パスワード（半角7文字以上64文字以内）"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "権限グループ"
                                    },
                                    "display_name": {
                                        "type": "string",
                                        "description": "表示名"
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "名"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "姓"
                                    },
                                    "user_url": {
                                        "type": "string",
                                        "description": "サイトURL"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "wp_user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "description": "更新したWordPressユーザーID"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "delete": {
                "tags": [
                    "WordPressユーザー"
                ],
                "summary": "WordPressユーザーを削除",
                "description": "指定したWordPressユーザーを削除します。対象ユーザーの投稿等のコンテンツもあわせて削除されます。ユーザーID 1（サイト作成時の初期ユーザー）は削除できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_id",
                        "in": "path",
                        "required": true,
                        "description": "削除するWordPressユーザーID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/wp-users/roles": {
            "get": {
                "tags": [
                    "WordPressユーザー"
                ],
                "summary": "権限グループ一覧を取得",
                "description": "ユーザー作成・更新APIの role に指定できる権限グループの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "roles": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "role": {
                                                        "type": "string",
                                                        "description": "権限グループのキー（role に指定する値）"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "description": "権限グループの表示名"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/security": {
            "get": {
                "tags": [
                    "WordPressセキュリティ"
                ],
                "summary": "セキュリティ設定一覧を取得",
                "description": "指定したサイトのWordPressセキュリティ設定の状態を返します。国外アクセス制限・ログイン試行回数制限・コメント/トラックバック制限・その他のセキュリティ項目を含みます。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子。サイト一覧API（GET /v1/wphosting/{contract_id}/sites）の servername で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "security_settings": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "key": {
                                                        "type": "string",
                                                        "description": "設定キー（設定変更APIで使用）"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "description": "設定の表示名"
                                                    },
                                                    "is_enable": {
                                                        "type": "boolean",
                                                        "description": "現在有効かどうか"
                                                    },
                                                    "is_disable_locked": {
                                                        "type": "boolean",
                                                        "description": "無効化しようとしたときに409エラーになるか。セキュリティ自動最適化モードが有効なサイトで、ロック対象の項目のみ true になります。"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/wphosting/{contract_id}/sites/{servername}/security/{key}": {
            "put": {
                "tags": [
                    "WordPressセキュリティ"
                ],
                "summary": "セキュリティ設定を変更",
                "description": "指定したセキュリティ設定の有効/無効を切り替えます。国外からWordPressのREST APIや管理画面を利用する場合は、該当の国外アクセス制限を無効化してください。REST API制限とダッシュボード制限は連動します。セキュリティ自動最適化モードが有効なサイトでは、一部の項目を無効化できません。許可IPリストはAPIからは変更されません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "description": "ご契約の契約ID（WP- で始まる契約ID。例: WP-AB234567）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "servername",
                        "in": "path",
                        "required": true,
                        "description": "サイト環境の識別子",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "description": "設定キー。セキュリティ設定一覧API（GET .../security）の key で取得できます",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "is_enable": {
                                        "type": "boolean",
                                        "description": "有効にする場合は true・無効にする場合は false"
                                    }
                                },
                                "required": [
                                    "is_enable"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "security_setting": {
                                            "type": "object",
                                            "properties": {
                                                "key": {
                                                    "type": "string",
                                                    "description": "変更した設定キー"
                                                },
                                                "is_enable": {
                                                    "type": "boolean",
                                                    "description": "変更後の状態"
                                                }
                                            }
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ。国外アクセス制限の連動が発生した場合は suffix が付加されます（REST API 有効化時: 「(REST API アクセス制限を有効にした場合、ダッシュボード アクセス制限も有効になります)」／ダッシュボード無効化かつ変更前に REST API が ON の場合: 「(ダッシュボード アクセス制限を無効にしたため、REST API アクセス制限も無効にしました)」）。"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "409": {
                        "description": "サイト・契約の状態や実行中ジョブにより操作を完了できなかった（error.code で詳細を返却）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "APIキーを Bearer トークンとして送信"
            }
        }
    }
}