openapi: "3.1.0"
info:
  title: Hydratic marketing site API
  version: "1.0.0"
  summary: "Public HTTP API for https://hydratic.ai"
  description: "Hydratic (https://hydratic.ai) is the public marketing and discovery site for the Hydratic enterprise AI agent platform.\n\nHydratic is the enterprise AI agent platform: connect existing applications, choose your models, require human approval, and deploy as SaaS, managed, or self-hosted.\n\n## What this spec covers\n\nThis OpenAPI document describes the public endpoints this host actually exposes: health, a public site index, contact/lead intake, and discovery documents (OpenAPI itself). It does **not** invent a product/runtime API.\n\n## Authentication and scoped permissions\n\nThis host has **no authenticated API**. There are no OAuth scopes, API keys, or role-based credentials to request here. Every operation in this spec uses `security: []`. Do not send `Authorization` headers to hydratic.ai — they are ignored.\n\nTenant identity, connector credentials, and product authorization live in the Hydratic application, which is **not served from this domain**.\n\n## Product API\n\nThe Hydratic product (agents, connectors, approvals, chat integrations) is a separate application. This marketing site links to developer resources at `/developers` and `/docs`. If you are looking for runtime APIs, start there — they are not published as HTTP routes on hydratic.ai."
  contact:
    name: Hydratic
    url: "https://hydratic.ai/developers"
servers:
  - url: "https://hydratic.ai"
    description: Hydratic marketing site
  - url: "http://localhost:3000"
    description: Local development
security: []
tags:
  - name: Discovery
    description: Unauthenticated machine-readable index of this host.
  - name: Contact
    description: Public lead/contact intake for the marketing site.
paths:
  /api/health:
    get:
      operationId: getHealth
      tags:
        - Discovery
      summary: Liveness check
      description: Unauthenticated health probe for hydratic.ai. No product data.
      security: []
      responses:
        200:
          description: The marketing site is up.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Health"
        405:
          description: Structured JSON error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
  /api/site:
    get:
      operationId: getSiteIndex
      tags:
        - Discovery
      summary: Public site index
      description: "Read model of this marketing site: brand, public pages, discovery URLs, and an explicit note that the product API is not on this host."
      security: []
      responses:
        200:
          description: Public site index
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SiteIndex"
        405:
          description: Structured JSON error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
  /api/lead:
    post:
      operationId: createLead
      tags:
        - Contact
      summary: Submit a contact/lead form
      description: "Public, unauthenticated contact intake. Rate-limited per IP. This is not a product signup API and does not create a Hydratic tenant."
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LeadRequest"
      responses:
        200:
          description: Lead accepted (delivered or logged).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LeadResponse"
        400:
          description: Structured JSON error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        405:
          description: Structured JSON error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        429:
          description: Structured JSON error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        502:
          description: Structured JSON error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
  /openapi.json:
    get:
      operationId: getOpenApiJson
      tags:
        - Discovery
      summary: OpenAPI 3.1 specification (JSON)
      security: []
      responses:
        200:
          description: OpenAPI document
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
  /api/openapi.yaml:
    get:
      operationId: getOpenApiYaml
      tags:
        - Discovery
      summary: OpenAPI 3.1 specification (YAML)
      security: []
      responses:
        200:
          description: OpenAPI document
          content:
            application/yaml:
              schema:
                type: string
components:
  schemas:
    ApiError:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
            - hint
            - docs
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
            message:
              type: string
              description: Human-readable explanation.
            hint:
              type: string
              description: "What to do next (valid methods, schema, or discovery URLs)."
            docs:
              type: string
              format: uri
              description: Hydratic developer resources for this host.
            details:
              description: "Optional structured details (validation issues, etc.)."
    Health:
      type: object
      additionalProperties: false
      required:
        - ok
        - name
        - service
        - status
      properties:
        ok:
          type: boolean
        name:
          type: string
          examples:
            - Hydratic
        service:
          type: string
          examples:
            - hydratic-landingpage
        status:
          type: string
          examples:
            - ok
    SiteIndex:
      type: object
      additionalProperties: false
      required:
        - name
        - url
        - kind
        - resources
        - productApi
      properties:
        name:
          type: string
        url:
          type: string
          format: uri
        kind:
          type: string
          examples:
            - marketing_site
        description:
          type: string
        resources:
          type: object
          additionalProperties:
            type: string
        productApi:
          type: object
          properties:
            status:
              type: string
            note:
              type: string
    LeadRequest:
      type: object
      additionalProperties: false
      required:
        - email
        - company
        - locale
      properties:
        email:
          type: string
          format: email
        company:
          type: string
          maxLength: 120
        message:
          type: string
          maxLength: 2000
        plan:
          type: string
          enum:
            - pro
            - business
            - enterprise
            - hosted
            - unspecified
        locale:
          type: string
          enum:
            - en
            - de
        website:
          type: string
          maxLength: 0
          description: Honeypot; must be omitted or empty.
    LeadResponse:
      type: object
      additionalProperties: false
      required:
        - ok
        - delivered
      properties:
        ok:
          type: boolean
        delivered:
          type: boolean
externalDocs:
  description: "Hydratic developer resources (OpenAPI, auth notes, discovery)"
  url: "https://hydratic.ai/developers"
