{
    "openapi": "3.0.3",
    "info": {
        "title": "Star8 Domain API",
        "description": "Star8 ドメインAPI は、ドメイン管理機能（ネームサーバー・DNSレコード・Whois情報・レジストラロック）および取得・移管・更新を REST API で利用するためのインターフェースです。",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://api.star.ne.jp",
            "description": "Star8"
        }
    ],
    "security": [
        {
            "BearerAuth": [

            ]
        }
    ],
    "paths": {
        "/v1/me": {
            "get": {
                "tags": [
                    "APIキー情報"
                ],
                "summary": "認証中のAPIキー情報を取得",
                "description": "現在認証に使用しているAPIキーの情報を返します。有効期限・サービス種別を確認できます。\n\nすべてのサービス（サーバー / ドメイン / XServer for WordPress）で共通のエンドポイントです。APIキーの疎通確認や、鍵の有効期限が切れていないかの確認に利用できます。",
                "x-scope": "読み取り",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "service_type": {
                                            "type": "string",
                                            "description": "APIキーのサービス種別。ドメイン用のキーでは domain"
                                        },
                                        "expires_at": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "有効期限。無期限の場合は null"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/domain": {
            "get": {
                "tags": [
                    "ドメイン情報"
                ],
                "summary": "ドメイン一覧を取得",
                "description": "APIキーで操作できるドメインの一覧を返します。取得申込の処理中（pending_create）や移管中（transferring）のドメインも含まれます。解約済みの契約は含まれず、同じドメイン名の契約が複数ある場合は代表1件に集約して返します。\n\nドメイン用のAPIキーはユーザー単位で発行されます。操作範囲が「すべてのドメイン」のキーではユーザーが保有する全ドメイン、「指定ドメインのみ」のキーでは許可されたドメインだけを返します。\n\n現在は全件を返します。将来ページングパラメータを追加する場合も、パラメータ未指定時の挙動（全件返却）は変更しません。",
                "x-scope": "読み取り",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domains": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain_name": {
                                                        "type": "string",
                                                        "description": "ドメイン名（Punycode表記）"
                                                    },
                                                    "expiry_date": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "有効期限（YYYY-MM-DD）。取得申込の処理中など有効期限が未確定の場合は null"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "description": "ドメインの状態。active: 有効 / expired: 失効 / transferring: 移管申請中 / transfer_action_required: 移管失敗・再申請待ち / pending_create: 取得申込の処理中"
                                                    },
                                                    "decoded_domain": {
                                                        "type": "string",
                                                        "nullable": true,
                                                        "description": "日本語ドメインの復号名。日本語ドメイン以外は null"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "ドメイン取得"
                ],
                "summary": "ドメインを取得（新規登録）",
                "description": "ドメインの新規取得を申し込みます。属性型JPドメイン（co.jp 等）とプレミアムドメインには対応していません。また、操作範囲が「指定ドメインのみ」のAPIキーからは利用できません（403 FORBIDDEN）。\n\n通常価格はプリペイド残高から引き落とされます。初回限定0円キャンペーンが適用される場合は、クレジットカードを登録済みの会員に限り無料で取得できます。カード未登録の場合は CREDIT_CARD_REQUIRED、同じカードによる無料申込の重複利用対策に該当する場合は FREE_CAMPAIGN_NOT_AVAILABLE を返します。カードの登録・変更は、会員管理画面の「料金のお支払い」→「自動更新設定」から行ってください。\n\nご利用には、APIキー発行時に「ドメインの新規取得・移管・更新（お申し込み）を許可する」設定を有効にしておく必要があります。この設定を有効にするには、Whois初期値設定の登録とプリペイド残高のご入金が必要です。申込時のWhois情報には、登録済みの「Whois初期値設定」が使用されます。\n\ndry_run が true の場合は、課金・登録を行わず、HTTP 200 で dry_run と total_price を返します。実申請には Idempotency-Key ヘッダーが必要です（UUID推奨）。\n\n実申請はリクエスト内で登録まで同期的に処理され、成功すると HTTP 200 で domain（取得したドメインの情報）を返します。通常は status が active となり、その時点で取得は完了しています。レジストラ側の処理が保留された場合など、まれに status が pending_create のまま 200 が返ることがあります。この場合も申込は受け付けられており、通常は自動で解消されます（解消されない場合はサポートまでお問い合わせください）。その後の状態はドメイン詳細取得API（GET /v1/domain/{domain_name}）の status で確認できます。詳しくは「取得・移管・更新の結果確認」を参照してください。\n\nお支払い完了後にレジストラ側の処理が失敗・保留のまま解消されない場合、自動での返金は行われません。状況の確認・返金のご相談はサポートまでお問い合わせください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）",
                        "schema": {
                            "type": "string",
                            "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）",
                            "example": "550e8400-e29b-41d4-a716-446655440000"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "domain_name": {
                                        "type": "string",
                                        "description": "取得するドメイン名。日本語ドメインは Punycode（xn-- 形式）で指定してください。日本語のまま指定した場合は 422 になります",
                                        "example": "example.com"
                                    },
                                    "years": {
                                        "type": "integer",
                                        "description": "契約年数。TLDごとの対応年数から指定します（最大5年、省略時は1）",
                                        "example": 1
                                    },
                                    "nameservers": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "ネームサーバー（最大6件、各255文字以内）。英数字・ハイフン・ドットで指定します。省略時は当社ネームサーバー",
                                        "example": [
                                            "ns1.example.jp",
                                            "ns2.example.jp"
                                        ]
                                    },
                                    "expected_total_price": {
                                        "type": "integer",
                                        "description": "合計金額（税込・円・キャンペーン適用後）。取得可能確認APIが返した価格 × 年数を指定します。現在価格と一致しない場合はエラー（PRICE_MISMATCH）になります",
                                        "example": 1602
                                    },
                                    "agree_to_terms": {
                                        "type": "boolean",
                                        "description": "利用規約への同意（true 必須）",
                                        "example": true
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "description": "true の場合、課金・登録を行わずに実行可否のみ検証",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "domain_name",
                                    "expected_total_price",
                                    "agree_to_terms"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "課金・登録を行わずに実行可否を検証した結果",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dry_run": {
                                            "type": "boolean",
                                            "description": "dry run であることを示す値（true）"
                                        },
                                        "total_price": {
                                            "type": "integer",
                                            "description": "実申請時の合計金額（税込・円）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "409": {
                        "description": "処理中の重複リクエスト・操作、または有効期限の不一致（DUPLICATE_REQUEST / DUPLICATE_OPERATION / EXPIRY_MISMATCH）"
                    },
                    "422": {
                        "description": "入力値・価格・Idempotency-Key等の検証エラー（VALIDATION_ERROR / PRICE_MISMATCH 等）"
                    },
                    "402": {
                        "description": "プリペイド残高不足または支払いエラー（PAYMENT_REQUIRED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    },
                    "503": {
                        "description": "レジストラ側のシステムを一時的に利用できない（REGISTRAR_UNAVAILABLE）"
                    }
                }
            }
        },
        "/v1/domain/{domain_name}": {
            "get": {
                "tags": [
                    "ドメイン情報"
                ],
                "summary": "ドメイン詳細を取得",
                "description": "指定したドメインの詳細情報を返します。取得申込の処理中は status が pending_create、移管の進行中は transferring になります（「取得・移管・更新の結果確認」参照）。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain_name": {
                                            "type": "string",
                                            "description": "ドメイン名（Punycode表記）"
                                        },
                                        "expiry_date": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "有効期限（YYYY-MM-DD）。取得申込の処理中など有効期限が未確定の場合は null"
                                        },
                                        "status": {
                                            "type": "string",
                                            "description": "ドメインの状態。active: 有効 / expired: 失効 / transferring: 移管申請中 / transfer_action_required: 移管失敗・再申請待ち / pending_create: 取得申込の処理中"
                                        },
                                        "auto_renew": {
                                            "type": "boolean",
                                            "description": "自動更新設定の有無"
                                        },
                                        "epp_statuses": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "当社側で把握しているEPPステータス。pendingCreate: 登録処理中 / pendingTransfer: 移管処理中 / clientTransferProhibited: レジストラロック中 / redemptionPeriod: 失効後の復旧可能期間。レジストリへのリアルタイム照会は行っていないため、レジストリ側でのみ確定する状態（clientHold 等）は含まれません"
                                        },
                                        "decoded_domain": {
                                            "type": "string",
                                            "description": "日本語ドメインの復号名（日本語ドメインの場合のみ含まれる）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/domain/{domain_name}/nameservers": {
            "get": {
                "tags": [
                    "ネームサーバー設定"
                ],
                "summary": "ネームサーバーを取得",
                "description": "有効（active）なドメインに設定されているネームサーバーの一覧を返します。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "nameservers": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "ネームサーバーの配列"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "ネームサーバー設定"
                ],
                "summary": "ネームサーバーを変更",
                "description": "ドメインのネームサーバーを、送信した内容で全件置き換えます。現在の設定への追加ではないため、設定したいネームサーバーをすべて指定してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "nameservers": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "ネームサーバーの配列（1〜13件、各253文字以内）。ホスト名で指定し、同じ値は重複指定できません",
                                        "example": [
                                            "ns1.example.jp",
                                            "ns2.example.jp"
                                        ]
                                    }
                                },
                                "required": [
                                    "nameservers"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "nameservers": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "変更後のネームサーバーの配列"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "409": {
                        "description": "ドメイン側の状態・制約により操作を完了できなかった（error.code で詳細を返却。エラーコード一覧参照）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/domain/{domain_name}/dns": {
            "get": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコード一覧を取得",
                "description": "ドメインのDNSレコードを一覧で返します。対応レコードタイプは A / AAAA / CNAME / MX / TXT / NS / SRV です（SOAレコードは取得・編集の対象外）。当社ネームサーバーを利用しているドメインが対象です。\n\nネームサーバーの設定が必要です: 取得直後のドメインは当社のドメイン用ネームサーバー（ns1.xdomain.ne.jp 〜 ns3.xdomain.ne.jp）に向いていない場合があり、その状態では本APIで設定したDNSレコードは名前解決に反映されません。ネームサーバー設定API（PUT /v1/domain/{domain_name}/nameservers）で当社ドメイン用ネームサーバーへ変更してください。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "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": "レコードID（更新・削除で使用）"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "description": "レコードタイプ。A / AAAA / CNAME / MX / TXT / NS / SRV"
                                                    },
                                                    "host": {
                                                        "type": "string",
                                                        "description": "ホスト名（@ は apex）"
                                                    },
                                                    "content": {
                                                        "type": "string",
                                                        "description": "レコードの内容（IPアドレス・ホスト名・テキスト等）"
                                                    },
                                                    "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）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "post": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコードを追加",
                "description": "ドメインにDNSレコードを追加します。レスポンスの id は後続の更新・削除で使用します。\n\nネームサーバーの設定が必要です: 取得直後のドメインは当社のドメイン用ネームサーバー（ns1.xdomain.ne.jp 〜 ns3.xdomain.ne.jp）に向いていない場合があり、その状態では本APIで設定したDNSレコードは名前解決に反映されません。ネームサーバー設定API（PUT /v1/domain/{domain_name}/nameservers）で当社ドメイン用ネームサーバーへ変更してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "レコードタイプ。A / AAAA / CNAME / MX / TXT / NS / SRV",
                                        "example": "A"
                                    },
                                    "host": {
                                        "type": "string",
                                        "description": "ホスト名（@ で apex、最大64文字）",
                                        "example": "www"
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "レコードの内容（最大1024文字）",
                                        "example": "192.0.2.1"
                                    },
                                    "ttl": {
                                        "type": "integer",
                                        "description": "TTL（秒）。60〜86400。省略時は 3600",
                                        "example": 3600
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "優先度。0〜999。MX / SRV で使用（省略時は 0）。それ以外のレコードタイプでは 0 になります",
                                        "example": 0
                                    }
                                },
                                "required": [
                                    "type",
                                    "host",
                                    "content"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "description": "追加されたDNSレコードのID（更新・削除で使用）"
                                        },
                                        "type": {
                                            "type": "string",
                                            "description": "レコードタイプ"
                                        },
                                        "host": {
                                            "type": "string",
                                            "description": "ホスト名"
                                        },
                                        "content": {
                                            "type": "string",
                                            "description": "レコードの内容"
                                        },
                                        "ttl": {
                                            "type": "integer",
                                            "description": "TTL（秒）"
                                        },
                                        "priority": {
                                            "type": "integer",
                                            "description": "優先度"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "409": {
                        "description": "ドメイン側の状態・制約により操作を完了できなかった（error.code で詳細を返却。エラーコード一覧参照）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/domain/{domain_name}/dns/{dns_id}": {
            "put": {
                "tags": [
                    "DNSレコード設定"
                ],
                "summary": "DNSレコードを変更",
                "description": "既存のDNSレコードを変更します。送信した項目のみ更新され、省略した項目は現在の設定が維持されます。存在しないDNSレコードID、または他のユーザーのDNSレコードIDを指定した場合は 404（RECORD_NOT_FOUND）になります。\n\nネームサーバーの設定が必要です: 取得直後のドメインは当社のドメイン用ネームサーバー（ns1.xdomain.ne.jp 〜 ns3.xdomain.ne.jp）に向いていない場合があり、その状態では本APIで設定したDNSレコードは名前解決に反映されません。ネームサーバー設定API（PUT /v1/domain/{domain_name}/nameservers）で当社ドメイン用ネームサーバーへ変更してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "dns_id",
                        "in": "path",
                        "required": true,
                        "description": "DNSレコードID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "レコードタイプ。A / AAAA / CNAME / MX / TXT / NS / SRV",
                                        "example": "A"
                                    },
                                    "host": {
                                        "type": "string",
                                        "description": "ホスト名（@ で apex、最大64文字）",
                                        "example": "www"
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "レコードの内容（最大1024文字）",
                                        "example": "192.0.2.2"
                                    },
                                    "ttl": {
                                        "type": "integer",
                                        "description": "TTL（秒）。60〜86400",
                                        "example": 3600
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "優先度。0〜999。MX / SRV 以外のレコードタイプでは 0 になります",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "description": "DNSレコードID"
                                        },
                                        "type": {
                                            "type": "string",
                                            "description": "レコードタイプ"
                                        },
                                        "host": {
                                            "type": "string",
                                            "description": "ホスト名"
                                        },
                                        "content": {
                                            "type": "string",
                                            "description": "レコードの内容"
                                        },
                                        "ttl": {
                                            "type": "integer",
                                            "description": "TTL（秒）"
                                        },
                                        "priority": {
                                            "type": "integer",
                                            "description": "優先度"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "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、または他のユーザーのDNSレコードIDを指定した場合は 404（RECORD_NOT_FOUND）になります。\n\nネームサーバーの設定が必要です: 取得直後のドメインは当社のドメイン用ネームサーバー（ns1.xdomain.ne.jp 〜 ns3.xdomain.ne.jp）に向いていない場合があり、その状態では本APIで設定したDNSレコードは名前解決に反映されません。ネームサーバー設定API（PUT /v1/domain/{domain_name}/nameservers）で当社ドメイン用ネームサーバーへ変更してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "dns_id",
                        "in": "path",
                        "required": true,
                        "description": "DNSレコード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）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "409": {
                        "description": "ドメイン側の状態・制約により操作を完了できなかった（error.code で詳細を返却。エラーコード一覧参照）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/domain/{domain_name}/whois": {
            "get": {
                "tags": [
                    "Whois情報設定"
                ],
                "summary": "Whois情報を取得",
                "description": "有効（active）かつWhois編集に対応しているドメインのWhois登録情報と代理公開設定を返します。属性型JPドメイン（co.jp 等）は対象外です。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain_name": {
                                            "type": "string",
                                            "description": "ドメイン名"
                                        },
                                        "whois_privacy": {
                                            "type": "boolean",
                                            "description": "代理公開設定。true: 代理公開ON / false: 代理公開OFF"
                                        },
                                        "is_whois_privacy_available": {
                                            "type": "boolean",
                                            "description": "代理公開を利用できるか（TLDにより異なる）"
                                        },
                                        "locked_by_migration": {
                                            "type": "boolean",
                                            "description": "当社レジストラ切替に伴う一時制限中かどうか。true の間は Whois 変更・レジストラロック変更が MIGRATION_LOCKED（409）で拒否されます（期間終了後に自動解除）"
                                        },
                                        "fields": {
                                            "type": "object",
                                            "properties": {
                                                "organization_name": {
                                                    "type": "string",
                                                    "description": "組織名"
                                                },
                                                "first_name": {
                                                    "type": "string",
                                                    "description": "名"
                                                },
                                                "last_name": {
                                                    "type": "string",
                                                    "description": "姓"
                                                },
                                                "postal_code": {
                                                    "type": "string",
                                                    "description": "郵便番号"
                                                },
                                                "state_province": {
                                                    "type": "string",
                                                    "description": "都道府県"
                                                },
                                                "city": {
                                                    "type": "string",
                                                    "description": "市区町村"
                                                },
                                                "address1": {
                                                    "type": "string",
                                                    "description": "住所1"
                                                },
                                                "address2": {
                                                    "type": "string",
                                                    "description": "住所2"
                                                },
                                                "email": {
                                                    "type": "string",
                                                    "description": "メールアドレス"
                                                },
                                                "phone": {
                                                    "type": "string",
                                                    "description": "電話番号（例: +81.9012345678）"
                                                },
                                                "fax": {
                                                    "type": "string",
                                                    "description": "FAX番号"
                                                },
                                                "country": {
                                                    "type": "string",
                                                    "description": "国コード（例: JP）"
                                                },
                                                "role": {
                                                    "type": "string",
                                                    "description": "担当区分"
                                                }
                                            }
                                        },
                                        "mail_validation_required": {
                                            "type": "boolean",
                                            "description": "現在の登録情報についてメールアドレス有効性確認が必要な状態か。true の場合、確認が完了するまでAPIからのWhois情報変更はできません。false は代理公開OFFへの変更可否を保証する値ではありません"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "Whois情報設定"
                ],
                "summary": "Whois情報を変更",
                "description": "ドメインのWhois登録情報と代理公開設定を変更します。\n\nfields と whois_privacy の少なくとも一方を指定してください。省略した項目は現在値を維持し、両方を省略すると 422 になります。\n\n代理公開ONでは fields に空のオブジェクトを指定できます。代理公開OFFでは、fields に13キーすべてを含めてください。9項目は値必須（空文字不可）、4項目は値任意（空文字可）です。\n\nメールアドレス有効性確認が未完了のドメイン、および属性型JPドメイン（co.jp 等）は、APIからの変更に対応していません。\n\nレジストラが登録内容を受け付けなかった場合は 409（REGISTRAR_REJECTED）を返します。同じ内容で再試行しても結果は変わらないため、message の内容をご確認のうえ、指定値を見直して再実行してください。レジストラに到達できない場合は 500（REGISTRAR_ERROR）となり、こちらは時間をおいての再試行で回復する可能性があります。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "whois_privacy": {
                                        "type": "boolean",
                                        "description": "代理公開設定。true: 代理公開ON / false: 代理公開OFF。省略時は現在の設定を維持します",
                                        "example": true
                                    },
                                    "fields": {
                                        "type": "object",
                                        "description": "Whois登録情報のオブジェクト。省略時は現在値を維持します。代理公開ONでは空のオブジェクトを指定できます。代理公開OFFでは13キーすべてが必要です。9項目は値必須（空文字不可）、4項目は値任意（空文字可）です",
                                        "example": {

                                        },
                                        "properties": {
                                            "organization_name": {
                                                "type": "string",
                                                "description": "組織名。代理公開OFFでfields指定時はキー必須、空文字可",
                                                "example": ""
                                            },
                                            "first_name": {
                                                "type": "string",
                                                "description": "名（英字）。代理公開OFFでfields指定時はキー・値必須",
                                                "example": "Taro"
                                            },
                                            "last_name": {
                                                "type": "string",
                                                "description": "姓（英字）。代理公開OFFでfields指定時はキー・値必須",
                                                "example": "Yamada"
                                            },
                                            "postal_code": {
                                                "type": "string",
                                                "description": "郵便番号。代理公開OFFでfields指定時はキー・値必須",
                                                "example": "1000001"
                                            },
                                            "state_province": {
                                                "type": "string",
                                                "description": "都道府県（英字）。代理公開OFFでfields指定時はキー・値必須",
                                                "example": "Tokyo"
                                            },
                                            "city": {
                                                "type": "string",
                                                "description": "市区町村（英字）。代理公開OFFでfields指定時はキー・値必須",
                                                "example": "Chiyoda"
                                            },
                                            "address1": {
                                                "type": "string",
                                                "description": "住所1（英字）。代理公開OFFでfields指定時はキー・値必須",
                                                "example": "1-1-1"
                                            },
                                            "address2": {
                                                "type": "string",
                                                "description": "住所2（英字）。代理公開OFFでfields指定時はキー必須、空文字可",
                                                "example": ""
                                            },
                                            "email": {
                                                "type": "string",
                                                "description": "メールアドレス。代理公開OFFでfields指定時はキー・値必須",
                                                "example": "admin@example.com"
                                            },
                                            "phone": {
                                                "type": "string",
                                                "description": "電話番号（例: +81.9012345678）。代理公開OFFでfields指定時はキー・値必須",
                                                "example": "+81.9012345678"
                                            },
                                            "fax": {
                                                "type": "string",
                                                "description": "FAX番号。代理公開OFFでfields指定時はキー必須、空文字可",
                                                "example": ""
                                            },
                                            "country": {
                                                "type": "string",
                                                "description": "国コード（例: JP）。代理公開OFFでfields指定時はキー・値必須",
                                                "example": "JP"
                                            },
                                            "role": {
                                                "type": "string",
                                                "description": "担当区分。代理公開OFFでfields指定時はキー必須、空文字可",
                                                "example": ""
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "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）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "409": {
                        "description": "ドメイン側の状態・制約により操作を完了できなかった（error.code で詳細を返却。エラーコード一覧参照）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/domain/{domain_name}/registrar-lock": {
            "get": {
                "tags": [
                    "レジストラロック設定"
                ],
                "summary": "レジストラロック状態を取得",
                "description": "レジストラロックに対応している有効（active）なドメインの移管ロック状態を返します。ロックが有効な間は他社への移管申請が承認されません。\n\n他社への移管に必要な認証鍵（AuthCode）の取得は、APIでは提供していません。契約管理画面のドメインパネル「別サービスに移管」から取得してください。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain_name": {
                                            "type": "string",
                                            "description": "ドメイン名"
                                        },
                                        "locked": {
                                            "type": "boolean",
                                            "description": "レジストラロックが有効か"
                                        },
                                        "locked_by_migration": {
                                            "type": "boolean",
                                            "description": "当社レジストラ切替に伴う一時制限中かどうか。true の間はレジストラロック変更・Whois情報変更が MIGRATION_LOCKED（409）で拒否されます（期間終了後に自動解除）"
                                        },
                                        "unlock_blocked": {
                                            "type": "boolean",
                                            "description": "true の場合、ロック解除には対象ドメインの解約申請が必要です（解除リクエストは UNLOCK_BLOCKED（409）になります）"
                                        },
                                        "warn_on_lock": {
                                            "type": "boolean",
                                            "description": "true の場合、現在は解除中ですが、一度レジストラロックを設定するとドメイン解約時まで解除できません。設定前に画面と同じ注意を表示するためのフラグです"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            },
            "put": {
                "tags": [
                    "レジストラロック設定"
                ],
                "summary": "レジストラロックを変更",
                "description": "レジストラロックに対応している有効（active）なドメインの移管ロックを設定・解除します。契約種別によっては、解除前に対象ドメインの解約申請が必要です。上位レジストラの変更期間中は操作できません。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "ドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "locked": {
                                        "type": "boolean",
                                        "description": "true: ロックを設定 / false: ロックを解除",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "locked"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "locked": {
                                            "type": "boolean",
                                            "description": "変更後のロック状態"
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "処理結果メッセージ"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "409": {
                        "description": "ドメイン側の状態・制約により操作を完了できなかった（error.code で詳細を返却。エラーコード一覧参照）"
                    },
                    "422": {
                        "description": "バリデーションエラー（VALIDATION_ERROR）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/domain/check": {
            "get": {
                "tags": [
                    "取得可能性・価格"
                ],
                "summary": "取得可能かを確認（空き確認＋見積）",
                "description": "ドメインが取得可能かどうかと、取得・更新・移管の価格（税込・キャンペーン適用後）を返します。\n\n各APIの expected_total_price には、取得・更新では価格に対象年数を掛けた合計金額、移管では transfer の金額を指定します。\n\n取得できない場合は available が false になり、理由は reason と reason_message で確認できます。prices は、形式不正・取扱対象外TLD等で価格を判定できない場合に null になります。登録済み（reason: registered）の場合は、移管の見積等に利用できる参考価格を返します。プレミアムドメインはAPIから取得できないため、reason に premium が入ります。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "確認するドメイン名（最大255文字）。日本語ドメインは Punycode（xn-- 形式）で指定してください。日本語のまま指定した場合は形式不正（reason: invalid_name）になります"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "domain_name": {
                                            "type": "string",
                                            "description": "ドメイン名（Punycode表記）"
                                        },
                                        "available": {
                                            "type": "boolean",
                                            "description": "取得可能か"
                                        },
                                        "reason": {
                                            "type": "string",
                                            "nullable": true,
                                            "description": "取得できない理由。registered: 登録済み / unsupported_tld: 未対応TLD / invalid_name: 形式不正 / external_conflict: 外部連携ドメインとして利用中 / premium: プレミアムドメイン"
                                        },
                                        "reason_message": {
                                            "type": "string",
                                            "description": "取得できない理由の詳細（available が false の場合のみ）"
                                        },
                                        "premium": {
                                            "type": "boolean",
                                            "description": "プレミアム判定の互換フィールド（現行は false）。プレミアムドメインが取得対象外の場合は reason に premium が入ります"
                                        },
                                        "prices": {
                                            "type": "object",
                                            "nullable": true,
                                            "description": "取得・更新・移管価格。形式不正・取扱対象外TLD等で価格を判定できない場合は null。登録済み（reason: registered）の場合は、移管の見積等に利用できる参考価格を返します",
                                            "properties": {
                                                "register": {
                                                    "type": "integer",
                                                    "description": "取得価格（初年度・税込・円）"
                                                },
                                                "renew": {
                                                    "type": "integer",
                                                    "nullable": true,
                                                    "description": "更新価格（1年あたり・税込・円）。価格を取得できない場合は null"
                                                },
                                                "transfer": {
                                                    "type": "integer",
                                                    "nullable": true,
                                                    "description": "移管価格（税込・円）。移管API対象外のTLDは null"
                                                },
                                                "currency": {
                                                    "type": "string",
                                                    "description": "通貨（JPY）"
                                                },
                                                "campaign_applied": {
                                                    "type": "boolean",
                                                    "description": "キャンペーン価格が適用されているか"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    },
                    "422": {
                        "description": "domain_name のバリデーションエラー（VALIDATION_ERROR）"
                    },
                    "503": {
                        "description": "レジストラへの空き確認に失敗（REGISTRAR_UNAVAILABLE）"
                    }
                }
            }
        },
        "/v1/domain/pricing": {
            "get": {
                "tags": [
                    "取得可能性・価格"
                ],
                "summary": "TLD別価格一覧を取得",
                "description": "ドメイン取得APIに対応しているTLDごとの取得・更新・移管価格（税込）を一覧で返します。\n\n対応TLDは300件を超えるため、必要なTLDだけを取得したい場合は tld パラメータで絞り込んでください。",
                "x-scope": "読み取り",
                "parameters": [
                    {
                        "name": "tld",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "取得するTLDを指定します。カンマ区切りで複数指定できます（例: com,net,jp）。先頭のドットは省略可。未指定の場合は全TLDを返します"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "prices": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "tld": {
                                                        "type": "string",
                                                        "description": "TLD（例: com）"
                                                    },
                                                    "register": {
                                                        "type": "integer",
                                                        "description": "取得価格（初年度・税込・円）"
                                                    },
                                                    "renew": {
                                                        "type": "integer",
                                                        "nullable": true,
                                                        "description": "更新価格（1年あたり・税込・円）。価格を取得できない場合は null"
                                                    },
                                                    "transfer": {
                                                        "type": "integer",
                                                        "nullable": true,
                                                        "description": "移管価格（税込・円）。移管API対象外のTLDは null"
                                                    },
                                                    "currency": {
                                                        "type": "string",
                                                        "description": "通貨（JPY）"
                                                    },
                                                    "campaign_applied": {
                                                        "type": "boolean",
                                                        "description": "キャンペーン価格が適用されているか"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    }
                }
            }
        },
        "/v1/domain/{domain_name}/transfer": {
            "post": {
                "tags": [
                    "ドメイン移管"
                ],
                "summary": "他社からの移管を申請",
                "description": "他社で管理しているドメインの移管（トランスファーイン）を申請します。対象は、価格一覧APIの transfer が null ではないTLDです。JPドメイン・属性型JPドメイン・プレミアムドメインには対応していません。移管料金として1年分の更新料金がプリペイド残高から引き落とされ、移管完了時に有効期限が1年延長されます。\n\nご利用には、APIキー発行時に「ドメインの新規取得・移管・更新（お申し込み）を許可する」設定を有効にしておく必要があります。\n\ndry_run が true の場合は、課金・移管申請を行わず、HTTP 200 で dry_run と total_price を返します。実申請には Idempotency-Key ヘッダーが必要です（UUID推奨）。実申請は同期的に処理され、申請に成功すると HTTP 200 で domain（status: transferring）を返します。\n\n移管はレジストリ側の承認を伴うため、申請後も完了までに時間がかかります。進行状況はドメイン詳細取得API（GET /v1/domain/{domain_name}）の status で確認できます（完了で active、失敗すると transfer_action_required）。進行中の移管が残っている間は再申請できません。詳しくは「取得・移管・更新の結果確認」を参照してください。\n\nお支払い完了後にレジストラ側の処理が失敗・保留のまま解消されない場合、自動での返金は行われません。状況の確認・返金のご相談はサポートまでお問い合わせください。\n\n当社から他社への移管（トランスファーアウト）に必要な認証鍵の取得は、APIでは提供していません。契約管理画面のドメインパネル「別サービスに移管」から取得してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "移管するドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）",
                        "schema": {
                            "type": "string",
                            "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）",
                            "example": "550e8400-e29b-41d4-a716-446655440000"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "auth_code": {
                                        "type": "string",
                                        "description": "認証鍵（AuthCode / EPPコード、最大255文字）。現在の管理事業者から取得したもの",
                                        "example": "xxxxxxxxxxxx"
                                    },
                                    "expected_total_price": {
                                        "type": "integer",
                                        "description": "合計金額（税込・円・キャンペーン適用後）。取得可能確認APIの transfer 価格を指定。不一致はエラー（PRICE_MISMATCH）",
                                        "example": 1602
                                    },
                                    "agree_to_terms": {
                                        "type": "boolean",
                                        "description": "利用規約への同意（true 必須）",
                                        "example": true
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "description": "true の場合、課金・申請を行わずに実行可否のみ検証（60日ルール・ロック状態等の事前チェック）",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "auth_code",
                                    "expected_total_price",
                                    "agree_to_terms"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "課金・移管申請を行わずに実行可否を検証した結果",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dry_run": {
                                            "type": "boolean",
                                            "description": "dry run であることを示す値（true）"
                                        },
                                        "total_price": {
                                            "type": "integer",
                                            "description": "実申請時の合計金額（税込・円）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "409": {
                        "description": "処理中の重複リクエスト・操作、または有効期限の不一致（DUPLICATE_REQUEST / DUPLICATE_OPERATION / EXPIRY_MISMATCH）"
                    },
                    "422": {
                        "description": "入力値・価格・Idempotency-Key等の検証エラー（VALIDATION_ERROR / PRICE_MISMATCH 等）"
                    },
                    "402": {
                        "description": "プリペイド残高不足または支払いエラー（PAYMENT_REQUIRED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    },
                    "503": {
                        "description": "レジストラ側のシステムを一時的に利用できない（REGISTRAR_UNAVAILABLE）"
                    }
                }
            }
        },
        "/v1/domain/{domain_name}/renew": {
            "post": {
                "tags": [
                    "契約更新"
                ],
                "summary": "契約を更新（期限延長）",
                "description": "ドメインの契約期限を延長します。更新できるのは有効（active）なドメインのみです。失効後の更新・復旧はサポートまでご相談ください。料金はプリペイド残高から引き落とされます。二重更新を防ぐため、現在の有効期限（current_expiry_date）の指定が必須です。ご利用には、APIキー発行時に「ドメインの新規取得・移管・更新（お申し込み）を許可する」設定を有効にしておく必要があります。\n\ndry_run が true の場合は、課金・更新を行わず、HTTP 200 で dry_run と total_price を返します。実申請には Idempotency-Key ヘッダーが必要です（UUID推奨）。\n\n実申請はリクエスト内で更新まで同期的に処理され、成功すると HTTP 200 で domain を返します。更新の成否は renewed（true で更新完了）と、expiry_date が previous_expiry_date から延長されていることで判定してください。詳しくは「取得・移管・更新の結果確認」を参照してください。",
                "x-scope": "書き込み",
                "parameters": [
                    {
                        "name": "domain_name",
                        "in": "path",
                        "required": true,
                        "description": "更新するドメイン名（Punycode表記）",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": false,
                        "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）",
                        "schema": {
                            "type": "string",
                            "description": "実申請時に必須。8〜64文字の英数字・ハイフン・アンダースコア（UUID推奨）",
                            "example": "550e8400-e29b-41d4-a716-446655440000"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "years": {
                                        "type": "integer",
                                        "description": "延長する年数。TLDごとの対応年数から指定します（最大5年）",
                                        "example": 1
                                    },
                                    "current_expiry_date": {
                                        "type": "string",
                                        "description": "現在の有効期限（YYYY-MM-DD）。実際の有効期限と一致しない場合はエラー（EXPIRY_MISMATCH）。二重更新の防止用",
                                        "example": "2026-12-31"
                                    },
                                    "expected_total_price": {
                                        "type": "integer",
                                        "description": "合計金額（税込・円・キャンペーン適用後）。更新価格 × 年数。不一致はエラー（PRICE_MISMATCH）",
                                        "example": 1602
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "description": "true の場合、課金・更新を行わずに検証のみ",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "years",
                                    "current_expiry_date",
                                    "expected_total_price"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "課金・更新を行わずに実行可否を検証した結果",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dry_run": {
                                            "type": "boolean",
                                            "description": "dry run であることを示す値（true）"
                                        },
                                        "total_price": {
                                            "type": "integer",
                                            "description": "実申請時の合計金額（税込・円）"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "リクエストの形式が不正（BAD_REQUEST）"
                    },
                    "401": {
                        "description": "認証エラー（UNAUTHORIZED）"
                    },
                    "403": {
                        "description": "権限不足またはIP制限（FORBIDDEN）"
                    },
                    "404": {
                        "description": "リソースまたはエンドポイントが見つからない（NOT_FOUND）"
                    },
                    "405": {
                        "description": "対応していないHTTPメソッド（METHOD_NOT_ALLOWED）"
                    },
                    "409": {
                        "description": "処理中の重複リクエスト・操作、または有効期限の不一致（DUPLICATE_REQUEST / DUPLICATE_OPERATION / EXPIRY_MISMATCH）"
                    },
                    "422": {
                        "description": "入力値・価格・Idempotency-Key等の検証エラー（VALIDATION_ERROR / PRICE_MISMATCH 等）"
                    },
                    "402": {
                        "description": "プリペイド残高不足または支払いエラー（PAYMENT_REQUIRED）"
                    },
                    "429": {
                        "description": "レート制限超過（RATE_LIMIT_EXCEEDED）"
                    },
                    "500": {
                        "description": "サーバー内部エラー（INTERNAL_ERROR）"
                    },
                    "502": {
                        "description": "バックエンド通信エラー（BACKEND_ERROR）"
                    },
                    "503": {
                        "description": "レジストラ側のシステムを一時的に利用できない（REGISTRAR_UNAVAILABLE）"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "APIキーを Bearer トークンとして送信します。取得可能性・価格・処理状況の取得、およびドメインの取得・移管・契約更新APIのご利用には、APIキー発行時に「ドメインの新規取得・移管・更新（お申し込み）を許可する」設定（専用のチェックボックス）を有効にしておく必要があります。"
            }
        }
    }
}