{
  "openapi": "3.1.0",
  "info": {
    "title": "Henneth Agent API",
    "version": "1.0.0",
    "description": "Agent-facing API for Henneth. The endpoints published here are discovery and sample endpoints and need no authentication; their payloads are fixtures that show the response shape. Real per-brand measurement across answer engines needs an API key from hello@henneth.ai.",
    "contact": {
      "email": "hello@henneth.ai"
    }
  },
  "servers": [
    {
      "url": "https://henneth.ai"
    }
  ],
  "paths": {
    "/api/agent/discovery": {
      "get": {
        "operationId": "getDiscovery",
        "summary": "API overview and capabilities",
        "responses": {
          "200": {
            "description": "Service overview with available endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/brands": {
      "get": {
        "operationId": "searchBrandVisibility",
        "summary": "Sample brand visibility payload",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Brand name to look up, e.g. sephora",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sample payload. Fixed values, not measured for the queried brand.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "brand",
                    "data_quality",
                    "note"
                  ],
                  "properties": {
                    "brand": {
                      "type": "string",
                      "description": "The query echoed back."
                    },
                    "data_quality": {
                      "type": "string",
                      "enum": [
                        "sample"
                      ],
                      "description": "Always 'sample' on this endpoint. The figures below are a fixture, not a measurement."
                    },
                    "ai_visibility_score": {
                      "type": "integer",
                      "description": "Sample score. The same value for every brand."
                    },
                    "mentions_last_30_days": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      },
                      "description": "Sample mention counts per answer engine (chatgpt, gemini, perplexity, google_ai_overviews)."
                    },
                    "sentiment": {
                      "type": "string",
                      "description": "Sample sentiment label."
                    },
                    "top_queries": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Example queries built from the brand name."
                    },
                    "note": {
                      "type": "string",
                      "description": "States that the payload is a sample."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or empty query parameter"
          }
        },
        "description": "Returns a fixed sample payload so an integrator can see the response shape before requesting a key. The figures are identical for every brand and are not a measurement of the brand in the query. Real per-brand measurement needs an API key from hello@henneth.ai."
      }
    },
    "/api/agent/reports/sample": {
      "get": {
        "operationId": "getSampleReport",
        "summary": "Sample agent visibility report with mock data",
        "responses": {
          "200": {
            "description": "Fully populated example of the visibility-report payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Service health check",
        "responses": {
          "200": {
            "description": "Service is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "ok"
                    }
                  },
                  "required": [
                    "status"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
