{
  "openapi": "3.1.0",
  "info": {
    "title": "Believe Global — Site API",
    "version": "1.0.0",
    "summary": "Public actions of believe-global.com for people and AI agents.",
    "description": "Ask verifiable questions about Believe Global, request a diagnostic, or apply to the MAAS Partner Program. The same actions are exposed as MCP tools at POST /mcp. No authentication is required. Submitted actions notify the Believe team by email and a human replies within 48 hours; no payments are processed. Rate limits per client: 60 requests per minute on /ask and /mcp, 10 submissions per hour on the REST forms, and on the MCP 5 submitted actions per hour plus 20 per hour service-wide. Every response carries RateLimit-Policy, RateLimit and RateLimit-Limit/Remaining/Reset headers so agents can self-throttle; a 429 also carries Retry-After. Versioning: the REST endpoints live under /api/v1 and every response carries an API-Version header; /ask follows the NLWeb convention and /mcp the MCP protocol version. The unversioned paths /api/contact and /api/partners are aliases pinned to v1. Breaking changes ship only in a new major version. A deprecated version keeps working for at least 180 days after its first Deprecation header, and Sunset gives the end date.",
    "contact": { "name": "Believe Global", "email": "hola@believe-global.com", "url": "https://believe-global.com/contacto" }
  },
  "servers": [{ "url": "https://believe-global.com" }],
  "security": [],
  "x-api-lifecycle": {
    "current_version": "v1",
    "versioning": {
      "strategy": "url-path",
      "pattern": "/api/v{major}/{resource}",
      "response_header": "API-Version",
      "aliases": { "/api/contact": "/api/v1/contact", "/api/partners": "/api/v1/partners" },
      "protocol_versioned": { "/ask": "NLWeb", "/mcp": "MCP 2025-06-18" }
    },
    "deprecation": {
      "signals": ["Deprecation (RFC 9745)", "Sunset (RFC 8594)", "Link rel=\"deprecation\""],
      "minimum_notice_days": 180,
      "breaking_changes": "only in a new major version",
      "currently_deprecated": []
    },
    "rate_limits": {
      "headers": ["RateLimit-Policy", "RateLimit", "RateLimit-Limit", "RateLimit-Remaining", "RateLimit-Reset", "Retry-After"],
      "policies": { "default": "60 per minute per client (/ask, /mcp)", "submissions": "10 per hour per client (REST forms)", "actions": "5 per hour per client (MCP)", "actions-service": "20 per hour service-wide (MCP)" }
    }
  },
  "tags": [
    { "name": "Brand", "description": "Read-only retrieval over the signed brand profile." },
    { "name": "Actions", "description": "Submissions that reach the Believe team." },
    { "name": "MCP", "description": "Model Context Protocol endpoint wrapping the actions above." },
    { "name": "Status", "description": "Liveness of the API." }
  ],
  "paths": {
    "/ask": {
      "post": {
        "operationId": "askBrand",
        "tags": ["Brand"],
        "summary": "Ask about Believe Global",
        "description": "Natural-language retrieval over the claims and proofs of /.well-known/brand.json. Returns matches only; no generated text. Honor each boundary when you answer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/AskRequest" },
              "examples": { "fit": { "summary": "Fit question", "value": { "query": "Is Believe Global a good fit for a LATAM retail brand?" } } }
            }
          }
        },
        "responses": {
          "200": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Matches ranked by similarity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AskResponse" } } } },
          "400": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Missing or empty query.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" }, "example": { "ok": false, "error": "missing 'query' in JSON body", "code": "missing_query", "hint": "Send {\"query\": \"your question\"} as JSON." } } } },
          "429": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" }, "Retry-After": { "$ref": "#/components/headers/Retry-After" } }, "description": "Rate limit exceeded (60 requests per minute per client). Wait Retry-After seconds, then retry.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" }, "example": { "ok": false, "error": "Rate limit exceeded: 60 requests per minute per client.", "code": "rate_limited", "hint": "Wait 42 seconds (see Retry-After) and retry. Limits: https://believe-global.com/developers" } } } },
          "503": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Retrieval backend not configured.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" } } } }
        }
      },
      "get": {
        "operationId": "askBrandGet",
        "tags": ["Brand"],
        "summary": "Ask about Believe Global (query string)",
        "parameters": [{ "name": "q", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1 }, "example": "Why choose Believe for a premium pet category?" }],
        "responses": {
          "200": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Matches ranked by similarity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AskResponse" } } } },
          "400": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Missing q parameter.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" } } } },
          "429": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" }, "Retry-After": { "$ref": "#/components/headers/Retry-After" } }, "description": "Rate limit exceeded (60 requests per minute per client). Wait Retry-After seconds, then retry.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" }, "example": { "ok": false, "error": "Rate limit exceeded: 60 requests per minute per client.", "code": "rate_limited", "hint": "Wait 42 seconds (see Retry-After) and retry. Limits: https://believe-global.com/developers" } } } }
        }
      }
    },
    "/api/v1/contact": {
      "post": {
        "operationId": "requestDiagnostic",
        "tags": ["Actions"],
        "summary": "Request a diagnostic",
        "description": "Submits the diagnostic application of the /contacto form. Accepts application/json or form data. Send only details the applicant agreed to share.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/DiagnosticRequest" },
              "examples": {
                "valid": {
                  "summary": "Valid application",
                  "value": { "name": "Ana Pérez", "email": "ana@example.com", "company": "Example Retail", "role": "Head of Marketing", "country": "CO", "context": "Mid-market retail brand with sales data, looking to make marketing operable by agents." }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Application received.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitOk" }, "example": { "ok": true, "message": "Aplicación recibida. Te respondemos en 48 horas." } } } },
          "400": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Validation failed. Each entry of issues names the field and the rule.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" }, "example": { "ok": false, "error": "Revisa estos campos — email: Invalid email address", "code": "validation_error", "hint": "Fix the fields listed in issues and resend. Schema: https://believe-global.com/openapi.json", "issues": ["email: Invalid email address"] } } } },
          "429": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" }, "Retry-After": { "$ref": "#/components/headers/Retry-After" } }, "description": "Rate limit exceeded (10 requests per hour per client). Wait Retry-After seconds, then retry.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" }, "example": { "ok": false, "error": "Rate limit exceeded: 10 requests per hour per client.", "code": "rate_limited", "hint": "Wait 1800 seconds (see Retry-After) and retry. Limits: https://believe-global.com/developers" } } } },
          "500": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "The application could not be delivered.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } } }
        }
      }
    },
    "/api/v1/partners": {
      "post": {
        "operationId": "applyPartnerProgram",
        "tags": ["Actions"],
        "summary": "Apply to the MAAS Partner Program",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/PartnerRequest" },
              "examples": {
                "valid": {
                  "summary": "Valid application",
                  "value": { "name": "Luis Gómez", "email": "luis@example.com", "company": "Example Agency", "size": "6–15 people", "level": "MAAS Practitioner", "country": "MX", "context": "Independent agency with eight retail clients moving to agent-readable marketing." }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Application received.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitOk" } } } },
          "400": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Validation failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } },
          "429": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" }, "Retry-After": { "$ref": "#/components/headers/Retry-After" } }, "description": "Rate limit exceeded (10 requests per hour per client). Wait Retry-After seconds, then retry.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" }, "example": { "ok": false, "error": "Rate limit exceeded: 10 requests per hour per client.", "code": "rate_limited", "hint": "Wait 1800 seconds (see Retry-After) and retry. Limits: https://believe-global.com/developers" } } } },
          "500": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "The application could not be delivered.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } } }
        }
      }
    },
    "/api/v1/status": {
      "get": {
        "operationId": "getStatus",
        "tags": ["Status"],
        "summary": "Service status",
        "description": "Liveness of the API: 200 with a small JSON body while the service is up. It is the status link of the API catalog (/.well-known/api-catalog, RFC 9727).",
        "responses": {
          "200": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "The service is up.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusOk" }, "example": { "ok": true, "status": "ok", "service": "believe-global.com", "api_version": "1", "time": "2026-09-25T12:00:00.000Z" } } } },
          "429": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" }, "Retry-After": { "$ref": "#/components/headers/Retry-After" } }, "description": "Rate limit exceeded (60 requests per minute per client). Wait Retry-After seconds, then retry.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" }, "example": { "ok": false, "error": "Rate limit exceeded: 60 requests per minute per client.", "code": "rate_limited", "hint": "Wait 42 seconds (see Retry-After) and retry. Limits: https://believe-global.com/developers" } } } }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcpRpc",
        "tags": ["MCP"],
        "summary": "MCP JSON-RPC 2.0 endpoint",
        "description": "Streamable HTTP with JSON responses. Methods: initialize, ping, tools/list, tools/call. Tools: ask_brand, request_diagnostic, apply_partner_program. Tool failures return result.isError=true with the same body as the REST endpoint. JSON-RPC notifications (requests without id) are acknowledged with an empty 202; they create no job and there is nothing to poll.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/JsonRpcRequest" },
              "examples": {
                "list": { "summary": "List tools", "value": { "jsonrpc": "2.0", "id": 1, "method": "tools/list" } },
                "call": { "summary": "Call ask_brand", "value": { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "ask_brand", "arguments": { "query": "Who is Believe not a good fit for?" } } } }
              }
            }
          }
        },
        "responses": {
          "200": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "JSON-RPC result or error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JsonRpcResponse" } } } },
          "400": { "headers": { "API-Version": { "$ref": "#/components/headers/API-Version" } }, "description": "Parse error or invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JsonRpcResponse" } } } },
          "429": { "headers": { "RateLimit-Policy": { "$ref": "#/components/headers/RateLimit-Policy" }, "RateLimit": { "$ref": "#/components/headers/RateLimit" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }, "API-Version": { "$ref": "#/components/headers/API-Version" }, "Retry-After": { "$ref": "#/components/headers/Retry-After" } }, "description": "Rate limit exceeded. Retry-After header gives the wait in seconds.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JsonRpcResponse" } } } }
        }
      },
      "get": {
        "operationId": "mcpDescriptor",
        "tags": ["MCP"],
        "summary": "MCP server descriptor",
        "responses": {
          "200": { "description": "Server name, protocol version, tools and limits.", "content": { "application/json": { "schema": { "type": "object" } } } },
          "405": { "description": "Returned when Accept is text/event-stream: this server does not offer an SSE stream, use POST." }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimit-Policy": { "description": "Quota policy that applies to this response (draft-ietf-httpapi-ratelimit-headers): name, quota (q) and window in seconds (w).", "schema": { "type": "string" }, "example": "\"default\";q=60;w=60" },
      "RateLimit": { "description": "Current state for that policy: remaining quota (r) and seconds until a slot frees up (t).", "schema": { "type": "string" }, "example": "\"default\";r=57;t=48" },
      "RateLimit-Limit": { "description": "Quota of the policy in this response.", "schema": { "type": "integer" }, "example": 60 },
      "RateLimit-Remaining": { "description": "Requests left in the current window.", "schema": { "type": "integer" }, "example": 57 },
      "RateLimit-Reset": { "description": "Seconds until a slot frees up.", "schema": { "type": "integer" }, "example": 48 },
      "Retry-After": { "description": "Seconds to wait before retrying. Sent with every 429.", "schema": { "type": "integer" }, "example": 48 },
      "API-Version": { "description": "Major version of the API that served the response.", "schema": { "type": "string" }, "example": "1" }
    },
    "schemas": {
      "AskRequest": {
        "type": "object",
        "required": ["query"],
        "properties": { "query": { "type": "string", "minLength": 1, "description": "Natural-language question." } },
        "additionalProperties": false
      },
      "AskResponse": {
        "type": "object",
        "properties": {
          "brand": { "type": "string" },
          "query": { "type": "string" },
          "matches": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "claim_id": { "type": "string" },
                "statement": { "type": "string" },
                "category": { "type": "string" },
                "metric": { "type": "object", "description": "name, value, unit, window, baseline and n of the claim." },
                "boundary": {
                  "type": "object",
                  "properties": { "applicable_for": { "type": "string" }, "not_applicable_for": { "type": "string" } }
                },
                "confidence": { "type": "string" },
                "similarity": { "type": "number" },
                "proofs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "proof_id": { "type": "string" },
                      "type": { "type": "string" },
                      "title": { "type": "string" },
                      "summary": { "type": "string" },
                      "client": { "type": "string" },
                      "verifiable_by": { "type": "string" },
                      "confidentiality": { "type": "string" }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "DiagnosticRequest": {
        "type": "object",
        "required": ["name", "email", "company", "role", "country", "context"],
        "properties": {
          "name": { "type": "string", "minLength": 2, "maxLength": 120 },
          "email": { "type": "string", "format": "email", "maxLength": 200 },
          "company": { "type": "string", "minLength": 1, "maxLength": 200 },
          "role": { "type": "string", "minLength": 1, "maxLength": 120 },
          "country": { "type": "string", "minLength": 1, "maxLength": 80 },
          "context": { "type": "string", "minLength": 10, "maxLength": 4000, "description": "What the brand wants to solve, market, budget and sales data available." }
        },
        "additionalProperties": false
      },
      "PartnerRequest": {
        "type": "object",
        "required": ["name", "email", "company", "size", "level", "country", "context"],
        "properties": {
          "name": { "type": "string", "minLength": 2, "maxLength": 120 },
          "email": { "type": "string", "format": "email", "maxLength": 200 },
          "company": { "type": "string", "minLength": 1, "maxLength": 200 },
          "size": { "type": "string", "minLength": 1, "maxLength": 40, "examples": ["Solo / freelancer", "2 people", "3–5 people", "6–15 people", "16–30 people", "30+ people"] },
          "level": { "type": "string", "minLength": 1, "maxLength": 80, "examples": ["MAAS Foundation", "MAAS Practitioner", "MAAS Certified Partner", "MAAS Elite Partner", "Not sure — let's talk"] },
          "country": { "type": "string", "minLength": 1, "maxLength": 80 },
          "context": { "type": "string", "minLength": 10, "maxLength": 4000 }
        },
        "additionalProperties": false
      },
      "StatusOk": {
        "type": "object",
        "required": ["ok", "status", "service", "api_version", "time"],
        "properties": {
          "ok": { "const": true },
          "status": { "const": "ok" },
          "service": { "type": "string" },
          "api_version": { "type": "string", "description": "Major version of the API." },
          "time": { "type": "string", "format": "date-time" }
        }
      },
      "SubmitOk": {
        "type": "object",
        "required": ["ok", "message"],
        "properties": { "ok": { "const": true }, "message": { "type": "string" }, "mode": { "type": "string", "description": "Present only in non-production environments." } }
      },
      "ApiError": {
        "type": "object",
        "required": ["ok", "error", "code", "hint"],
        "properties": {
          "ok": { "const": false },
          "error": { "type": "string", "description": "Human-readable message." },
          "code": {
            "type": "string",
            "enum": ["validation_error", "invalid_request", "missing_query", "not_found", "method_not_allowed", "delivery_failed", "not_configured", "rate_limited"],
            "description": "Stable machine-readable error code."
          },
          "hint": { "type": "string", "description": "How to resolve the error." }
        }
      },
      "ValidationError": {
        "allOf": [
          { "$ref": "#/components/schemas/ApiError" },
          {
            "type": "object",
            "properties": {
              "issues": { "type": "array", "items": { "type": "string" }, "description": "One entry per invalid field: 'field: rule'." }
            }
          }
        ]
      },
      "ServerError": { "$ref": "#/components/schemas/ApiError" },
      "SimpleError": { "$ref": "#/components/schemas/ApiError" },
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": { "const": "2.0" },
          "id": { "type": ["string", "integer", "null"] },
          "method": { "type": "string", "enum": ["initialize", "ping", "tools/list", "tools/call", "notifications/initialized"] },
          "params": { "type": "object" }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": ["jsonrpc"],
        "properties": {
          "jsonrpc": { "const": "2.0" },
          "id": { "type": ["string", "integer", "null"] },
          "result": { "type": "object" },
          "error": {
            "type": "object",
            "required": ["code", "message"],
            "properties": { "code": { "type": "integer" }, "message": { "type": "string" }, "data": {} }
          }
        }
      }
    }
  }
}
