{
  "openapi": "3.1.0",
  "info": {
    "title": "ProURLMonitor API",
    "version": "1.0.0",
    "description": "Public URL indexing and discovery endpoints.",
    "contact": { "email": "contact@prourlmonitor.com" }
  },
  "servers": [{ "url": "https://www.prourlmonitor.com" }],
  "paths": {
    "/api/v1/index-urls": {
      "post": {
        "operationId": "indexUrls",
        "summary": "Submit URLs for indexing",
        "security": [{ "apiKey": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["urls"],
                "properties": {
                  "urls": {
                    "type": "array",
                    "minItems": 1,
                    "items": { "type": "string", "format": "uri" }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": { "description": "Submission batch created" },
          "400": { "description": "Invalid request or insufficient credits" },
          "401": { "description": "Missing or invalid API key" }
        }
      }
    },
    "/api/v2/plans": {
      "get": {
        "operationId": "listPlans",
        "summary": "List available plans",
        "responses": { "200": { "description": "Available plans" } }
      }
    },
    "/api/discovery/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Check API availability",
        "responses": {
          "200": {
            "description": "Service is available",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status", "service"],
                  "properties": {
                    "status": { "type": "string", "const": "ok" },
                    "service": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A ProURLMonitor API key, not an OAuth access token."
      }
    }
  },
  "externalDocs": {
    "description": "API and authentication guide",
    "url": "https://www.prourlmonitor.com/api-docs.md"
  }
}
