{
  "openapi": "3.1.0",
  "info": {
    "title": "Theralya Games — Public API",
    "summary": "Machine-readable discovery and contact endpoints for Theralya Games.",
    "description": "Public, unauthenticated endpoints published by Theralya Games: an MCP (Model Context Protocol) discovery endpoint, machine-readable `.well-known` catalogues, and the contact/newsletter form endpoint. There is intentionally no CRUD/REST data API — the product is a therapeutic board game.\n\n## API versioning policy\n\nThis API is versioned with a **date-based version identifier** carried in the\n`X-Theralya-API-Version` request header (see the reusable `ApiVersionHeader`\nparameter applied to every operation below). The only currently released\nversion is `2026-01-01`; requests that omit the header are treated as that\nversion. Additive, backwards-compatible changes are released in place; any\nbreaking change to a response shape or semantics introduces a new date\nidentifier which clients must opt into explicitly. Corresponding versions are\nalso mirrored in `info.version` and in the `X-Theralya-API-Version` response\nheader.\n\n## Rate limiting\n\nEvery response carries the standard IETF `RateLimit-Limit`,\n`RateLimit-Remaining`, `RateLimit-Reset` and `RateLimit-Policy` headers\ndescribing the public, unauthenticated policy (120 requests / 60 seconds).\nThese headers are documented as reusable response headers\n(`RateLimitLimit`, `RateLimitRemaining`, `RateLimitReset`, `RateLimitPolicy`)\nand attached to each operation below.\n\n## Errors\n\nAll error responses use the shared `Error` schema with\n`Content-Type: application/json`; the same schema is referenced from every\n4xx/5xx response across all operations.",
    "version": "2026-01-01",
    "contact": {
      "name": "Theralya Games",
      "url": "https://theralya.vercel.app/contact"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "servers": [
    {
      "url": "https://theralya.vercel.app",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "MCP",
      "description": "Model Context Protocol discovery and JSON-RPC endpoint."
    },
    {
      "name": "Discovery",
      "description": "Machine-readable `.well-known` catalogues."
    },
    {
      "name": "Forms",
      "description": "Contact and newsletter submissions."
    }
  ],
  "paths": {
    "/api/mcp": {
      "get": {
        "tags": [
          "MCP"
        ],
        "operationId": "getMcpEndpoint",
        "summary": "MCP discovery / initialize probe",
        "description": "Probe endpoint for MCP clients. Returns the same initialize result payload as the `initialize` JSON-RPC method, without a request body. Public and unauthenticated.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "$ref": "#/components/parameters/McpProtocolVersionHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Initialize payload.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "X-Theralya-API-Version": {
                "$ref": "#/components/headers/ApiVersionResponseHeader"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RpcInitializeResult"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "post": {
        "tags": [
          "MCP"
        ],
        "operationId": "postMcpJsonRpc",
        "summary": "MCP Streamable HTTP JSON-RPC 2.0",
        "description": "Accepts a JSON-RPC 2.0 request (or batch array) and answers with a JSON response. Supported methods: `initialize`, `ping`, `tools/list`, `tools/call`, `resources/list`, `prompts/list`. Notifications such as `notifications/initialized` return HTTP 202 with no body.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/JsonRpcRequest"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/JsonRpcRequest"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result or error object. JSON-RPC protocol errors are returned in the body with HTTP 200; only transport-level failures use 4xx/5xx.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "X-Theralya-API-Version": {
                "$ref": "#/components/headers/ApiVersionResponseHeader"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted (no response body).",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "options": {
        "tags": [
          "MCP"
        ],
        "operationId": "optionsMcpEndpoint",
        "summary": "CORS preflight",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/CorsPreflight"
          }
        }
      }
    },
    "/api/forms": {
      "post": {
        "tags": [
          "Forms"
        ],
        "operationId": "submitForm",
        "summary": "Submit a contact, newsletter or questionnaire form",
        "description": "Persists a form submission and (when configured) sends confirmation emails. The `kind` field selects the payload shape.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormSubmission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Submission accepted.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "X-Theralya-API-Version": {
                "$ref": "#/components/headers/ApiVersionResponseHeader"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Forms"
        ],
        "operationId": "getFormsMethodNotAllowed",
        "summary": "GET is not supported",
        "description": "This endpoint only accepts POST. A JSON error body is returned.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ],
        "responses": {
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      },
      "options": {
        "tags": [
          "Forms"
        ],
        "operationId": "optionsFormsEndpoint",
        "summary": "CORS preflight",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/CorsPreflight"
          }
        }
      }
    },
    "/.well-known/mcp": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "operationId": "getMcpServerCardShort",
        "summary": "MCP server card (short form)",
        "description": "Public, unauthenticated MCP discovery card. Advertises capabilities, instructions and the available tools (name, description, inputSchema) without requiring credentials.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "MCP server card.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerCard"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      }
    },
    "/.well-known/mcp/server-card.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "operationId": "getMcpServerCard",
        "summary": "MCP server card",
        "description": "Public, unauthenticated MCP discovery card with the full tool list and capabilities.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "MCP server card.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerCard"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "operationId": "getApiCatalog",
        "summary": "RFC 9727 API catalog (linkset)",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "API linkset.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/linkset+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCatalog"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCatalog"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      }
    },
    "/.well-known/ai-catalog.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "operationId": "getAiCatalog",
        "summary": "AI / agent discovery catalog",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "AI catalog.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiCatalog"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      }
    },
    "/api/{path}": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "operationId": "getUnknownApiEndpoint",
        "summary": "Unknown /api/* endpoint (JSON 404 catch-all)",
        "description": "Catch-all for any `/api/*` request that does not match a real endpoint. Always answers with a structured JSON error so agent tooling never receives an HTML 404 page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "description": "The unknown API path segment(s).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "ApiVersionHeader": {
        "name": "X-Theralya-API-Version",
        "in": "header",
        "required": false,
        "description": "Date-based API version the client opts into. Omitted requests default to `2026-01-01`. Breaking changes introduce a new value.",
        "schema": {
          "type": "string",
          "enum": [
            "2026-01-01"
          ],
          "default": "2026-01-01"
        }
      },
      "McpProtocolVersionHeader": {
        "name": "MCP-Protocol-Version",
        "in": "header",
        "required": false,
        "description": "MCP protocol version the client speaks.",
        "schema": {
          "type": "string",
          "enum": [
            "2025-06-18"
          ],
          "default": "2025-06-18"
        }
      }
    },
    "headers": {
      "RateLimitLimit": {
        "description": "Maximum number of requests permitted in the current window.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "examples": [
            120
          ]
        }
      },
      "RateLimitRemaining": {
        "description": "Number of requests remaining in the current window.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "examples": [
            120
          ]
        }
      },
      "RateLimitReset": {
        "description": "Seconds until the current rate-limit window resets (epoch seconds).",
        "schema": {
          "type": "integer",
          "examples": [
            1735689660
          ]
        }
      },
      "RateLimitPolicy": {
        "description": "The enforced rate-limit policy, IETF `RateLimit-Policy` syntax.",
        "schema": {
          "type": "string",
          "examples": [
            "120;w=60"
          ]
        }
      },
      "ApiVersionResponseHeader": {
        "description": "The date-based API version that served the response.",
        "schema": {
          "type": "string",
          "examples": [
            "2026-01-01"
          ]
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Structured JSON error body (RFC 9457-inspired).",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable, machine-readable error code.",
                "examples": [
                  "invalid_json",
                  "method_not_allowed"
                ]
              },
              "message": {
                "type": "string",
                "description": "Human-readable message."
              },
              "detail": {
                "type": "string",
                "description": "Optional additional context."
              }
            }
          }
        }
      },
      "OkResponse": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "email": {
            "type": "object",
            "description": "Diagnostics only: present when emails could not be sent. Absent on the nominal path. `disabled` = RESEND_API_KEY missing; `no_notify` = CONTACT_NOTIFY_EMAIL missing/invalid so the internal alert never arrives; `failed`/`partial` = Resend rejected one or all sends (unverified sender domain, quota exceeded, invalid key...).",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "disabled",
                  "no_notify",
                  "failed",
                  "partial"
                ]
              },
              "results": {
                "type": "array",
                "description": "Details of the rejected sends (never a secret, never a recipient address).",
                "items": {
                  "type": "object",
                  "required": [
                    "label",
                    "ok"
                  ],
                  "properties": {
                    "label": {
                      "type": "string",
                      "examples": [
                        "newsletter",
                        "contact notify"
                      ]
                    },
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "status": {
                      "type": "integer",
                      "description": "HTTP status returned by Resend."
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "initialize",
              "ping",
              "tools/list",
              "tools/call",
              "resources/list",
              "prompts/list",
              "notifications/initialized"
            ]
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "JsonRpcResult": {
        "type": "object",
        "required": [
          "jsonrpc",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "JsonRpcError": {
        "type": "object",
        "required": [
          "jsonrpc",
          "error"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "description": "JSON-RPC error code.",
                "examples": [
                  -32700
                ]
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "JsonRpcResponse": {
        "description": "A JSON-RPC 2.0 response: either a result or an error envelope.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/JsonRpcResult"
          },
          {
            "$ref": "#/components/schemas/JsonRpcError"
          }
        ]
      },
      "RpcInitializeResult": {
        "type": "object",
        "required": [
          "protocolVersion",
          "capabilities",
          "serverInfo"
        ],
        "properties": {
          "protocolVersion": {
            "type": "string",
            "examples": [
              "2025-06-18"
            ]
          },
          "capabilities": {
            "$ref": "#/components/schemas/McpCapabilities"
          },
          "serverInfo": {
            "$ref": "#/components/schemas/McpServerInfo"
          },
          "instructions": {
            "type": "string"
          }
        }
      },
      "McpServerInfo": {
        "type": "object",
        "required": [
          "name",
          "version"
        ],
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "theralya-games"
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Theralya Games"
            ]
          },
          "version": {
            "type": "string",
            "examples": [
              "0.1.0"
            ]
          }
        }
      },
      "McpCapabilities": {
        "type": "object",
        "properties": {
          "tools": {
            "$ref": "#/components/schemas/McpCapabilityToggle"
          },
          "resources": {
            "$ref": "#/components/schemas/McpCapabilityToggle"
          },
          "prompts": {
            "$ref": "#/components/schemas/McpCapabilityToggle"
          }
        }
      },
      "McpCapabilityToggle": {
        "type": "object",
        "properties": {
          "listChanged": {
            "type": "boolean",
            "default": false
          },
          "subscribe": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "McpTool": {
        "type": "object",
        "required": [
          "name",
          "description",
          "inputSchema"
        ],
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "get_site_info"
            ]
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "type": "object",
            "description": "JSON Schema describing the tool input.",
            "additionalProperties": true
          }
        }
      },
      "FormSubmission": {
        "type": "object",
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "newsletter",
              "contact",
              "questionnaire"
            ]
          },
          "locale": {
            "type": "string",
            "description": "Locale prefix.",
            "examples": [
              "fr",
              "en"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "answers": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "McpServerCard": {
        "type": "object",
        "required": [
          "name",
          "url",
          "version",
          "transports",
          "capabilities",
          "tools"
        ],
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "theralya-games"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "version": {
            "type": "string"
          },
          "protocolVersion": {
            "type": "string",
            "examples": [
              "2025-06-18"
            ]
          },
          "transports": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type",
                "url"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "examples": [
                    "streamable-http"
                  ]
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "capabilities": {
            "$ref": "#/components/schemas/McpCapabilities"
          },
          "instructions": {
            "type": "string"
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpTool"
            }
          },
          "documentationUrl": {
            "type": "string",
            "format": "uri"
          },
          "openapiUrl": {
            "type": "string",
            "format": "uri"
          },
          "authentication": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              },
              "type": {
                "type": "string",
                "examples": [
                  "none"
                ]
              }
            }
          }
        }
      },
      "ApiCatalog": {
        "type": "object",
        "required": [
          "linkset"
        ],
        "properties": {
          "linkset": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "AiCatalog": {
        "type": "object",
        "required": [
          "name",
          "url"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "mcp": {
            "type": "object",
            "additionalProperties": true
          },
          "api_catalog": {
            "type": "string",
            "format": "uri"
          },
          "llms_txt": {
            "type": "string",
            "format": "uri"
          },
          "sitemap": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request payload.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "MethodNotAllowed": {
        "description": "HTTP method not supported on this endpoint.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Service temporarily unavailable (e.g. missing configuration).",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected server error.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "CorsPreflight": {
        "description": "CORS preflight response (no body).",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        }
      },
      "NotFound": {
        "description": "Unknown endpoint (JSON body, never HTML).",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}