{
  "openapi": "3.1.0",
  "info": {
    "title": "Lead Catalyst Discovery API",
    "version": "1.0.0",
    "description": "Read-only company identity, services, and contact information for Lead Catalyst integrations and software agents.",
    "contact": { "name": "Lead Catalyst", "email": "viraj@leadcatalyst.in", "url": "https://leadcatalyst.in/contact" }
  },
  "servers": [{ "url": "https://leadcatalyst.in", "description": "Production" }],
  "paths": {
    "/api/company": {
      "get": {
        "operationId": "getLeadCatalystCompany",
        "summary": "Get Lead Catalyst company information",
        "description": "Returns the canonical Lead Catalyst identity, legal name, company description, founder, service categories, and contact details. Use this operation when an agent needs to identify Lead Catalyst or decide whether its product studio fits a software project.",
        "tags": ["Company"],
        "responses": {
          "200": {
            "description": "Canonical company information.",
            "headers": {
              "RateLimit": { "$ref": "#/components/headers/RateLimit" },
              "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" },
              "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" },
              "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" },
              "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" }
            },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyResponse" } } }
          },
          "405": {
            "description": "The HTTP method is not supported.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          },
          "429": {
            "description": "The rate limit was exceeded. Retry after the number of seconds in Retry-After.",
            "headers": { "Retry-After": { "schema": { "type": "integer", "minimum": 1 }, "description": "Seconds until the client should retry." } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          },
          "500": {
            "description": "An unexpected server error occurred.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimit": { "description": "RFC 9651 current service-limit information, including remaining quota and reset time.", "schema": { "type": "string", "examples": ["\"default\";r=59;t=60"] } },
      "RateLimitPolicy": { "description": "RFC 9651 quota policy and time window.", "schema": { "type": "string", "examples": ["\"default\";q=60;w=60"] } },
      "RateLimitLimit": { "description": "Maximum requests in the current window.", "schema": { "type": "integer", "minimum": 1 } },
      "RateLimitRemaining": { "description": "Requests remaining in the current window.", "schema": { "type": "integer", "minimum": 0 } },
      "RateLimitReset": { "description": "Seconds until the current window resets.", "schema": { "type": "integer", "minimum": 0 } }
    },
    "schemas": {
      "Company": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "legalName", "url", "email", "founder", "description", "services"],
        "properties": {
          "name": { "type": "string", "description": "Public brand name.", "examples": ["Lead Catalyst"] },
          "legalName": { "type": "string", "description": "Registered company name." },
          "url": { "type": "string", "format": "uri", "description": "Canonical company website." },
          "email": { "type": "string", "format": "email", "description": "Project and support contact address." },
          "founder": { "type": "string", "description": "Company founder." },
          "description": { "type": "string", "description": "Concise company description." },
          "services": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "Product development capabilities." }
        }
      },
      "CompanyResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": ["data"],
        "properties": { "data": { "$ref": "#/components/schemas/Company" } }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": ["code", "message", "resolution"],
        "properties": {
          "code": { "type": "string", "description": "Stable machine-readable error identifier." },
          "message": { "type": "string", "description": "Human-readable explanation." },
          "resolution": { "type": "string", "description": "Action the caller can take to resolve the error." }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": { "error": { "$ref": "#/components/schemas/Error" } }
      }
    }
  }
}
