{
  "openapi": "3.0.3",
  "info": {
    "title": "Media Monitor Public Signals API",
    "description": "Public, read-only syndicated intelligence APIs providing latest issue top stories and briefing catalogs across Media Monitor publications.",
    "version": "1.0.0",
    "contact": {
      "name": "Media Monitor",
      "url": "https://mediamonitor.live/"
    }
  },
  "servers": [
    {
      "url": "https://ai-coding.mediamonitor.live",
      "description": "AI Coding Brief — Developer tooling & coding models"
    },
    {
      "url": "https://commerce-signal.mediamonitor.live",
      "description": "Commerce Signal — Retail, marketplaces, and commerce AI"
    },
    {
      "url": "https://growth-stack-brief.mediamonitor.live",
      "description": "Growth Stack Brief — Paid media, AI search, and growth tooling"
    }
  ],
  "paths": {
    "/api/public-newsletter-latest": {
      "get": {
        "summary": "Get latest issue top stories",
        "description": "Returns the latest published newsletter edition with its ranked top stories, summaries, and source attribution. Free, CORS-enabled, no authentication required.",
        "operationId": "getLatestNewsletterStories",
        "parameters": [
          {
            "name": "dispatch",
            "in": "query",
            "required": false,
            "description": "Optional newsletter ID or slug to select a specific briefing on the stage.",
            "schema": {
              "type": "string",
              "example": "ai-coding-daily"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Latest issue and stories payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicLatestResponse"
                }
              }
            }
          },
          "503": {
            "description": "Publication temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/public-newsletter-catalog": {
      "get": {
        "summary": "Get public newsletter catalog",
        "description": "Returns the list of active public briefings hosted on this stage, including publishing schedule, benefit promise, and intended reader.",
        "operationId": "getPublicNewsletterCatalog",
        "responses": {
          "200": {
            "description": "Public catalog of briefings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCatalogResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PublicLatestResponse": {
        "type": "object",
        "properties": {
          "newsletter": {
            "type": "object",
            "nullable": true,
            "properties": {
              "id": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            }
          },
          "issue": {
            "type": "object",
            "nullable": true,
            "properties": {
              "issueId": {
                "type": "string"
              },
              "dispatchId": {
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "topStories": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TopStory"
                }
              }
            }
          }
        }
      },
      "TopStory": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "sourceLabel": {
            "type": "string"
          },
          "categoryLabel": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "PublicCatalogResponse": {
        "type": "object",
        "properties": {
          "newsletters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "cadenceLabel": {
                  "type": "string"
                },
                "intendedReader": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "temporarily_unavailable"
          }
        }
      }
    }
  }
}
