{
  "openapi": "3.1.0",
  "info": {
    "title": "Tommy & Spartan Platform API",
    "version": "0.1.0-pre-ga",
    "summary": "Programmatic access to the Tommy & Spartan marketing-and-strategy platform.",
    "description": "PRE-GA. This specification is published for integration ahead of General Availability on 2026-07-31. Endpoints begin serving traffic at GA. Tommy is a marketing director built as software; Spartan is a strategy director built the same way. Senior partners sign off on every output.",
    "contact": { "name": "Tommy & Spartan", "email": "mike@tokenomik.com", "url": "https://tommyspartan.com" }
  },
  "servers": [
    { "url": "https://api.tommyspartan.com", "description": "Production (activates 2026-07-31)" }
  ],
  "security": [{ "oauth2": ["agent.invoke"] }],
  "paths": {
    "/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Service health",
        "security": [],
        "responses": {
          "200": {
            "description": "Service status",
            "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" } } } } }
          }
        }
      }
    },
    "/v1/signal-assessment": {
      "post": {
        "operationId": "createSignalAssessment",
        "summary": "Request a SIGNAL Assessment (7-pillar marketing diagnostic)",
        "responses": { "202": { "description": "Assessment queued" } }
      }
    },
    "/v1/accounts/{accountId}/engine": {
      "post": {
        "operationId": "runMqlToSqlEngine",
        "summary": "Run the MQL-to-SQL engine for a named account (research, MEDDIC qualification, 1:1 pitch, cadences, per-account webpage)",
        "parameters": [
          { "name": "accountId", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "202": { "description": "Engine run queued" } }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://auth.tommyspartan.com/oauth/token",
            "scopes": {
              "agent.read": "Read account-engagement and catalogue resources",
              "agent.invoke": "Invoke the MQL-to-SQL engine for a named account",
              "mcp": "Connect to the Tommy & Spartan MCP server"
            }
          }
        }
      }
    }
  }
}
