{
  "openapi": "3.1.0",
  "info": {
    "title": "Half Taste growth review API",
    "version": "2.0.0",
    "summary": "The only public API this site has: a growth review request path, and a health check for it.",
    "description": "Half Taste is a brand and growth systems studio for consumer brands. There is no product API, no account system and nothing to purchase. This document exists so an agent evaluating the studio on someone's behalf can check availability and understand how contact works before attempting it.\n\nNote the human-verification requirement on POST /api/enquiry: submissions carry a Cloudflare Turnstile token, so a fully automated submission will be rejected with 403. This is deliberate. An agent should surface the enquiry form to its human, or fall back to the published email address.",
    "contact": {
      "name": "Half Taste",
      "email": "hello@halftaste.com",
      "url": "https://halftaste.com"
    },
    "license": {
      "name": "All rights reserved",
      "url": "https://halftaste.com/privacy"
    }
  },
  "servers": [{ "url": "https://halftaste.com" }],
  "paths": {
    "/api/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Whether the enquiry path is accepting submissions",
        "description": "Reports binding presence only. Returns no counts and no personal data.",
        "responses": {
          "200": {
            "description": "Accepting enquiries",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Status" },
                "example": {
                  "status": "ok",
                  "enquiry": { "accepting": true, "humanVerificationRequired": true }
                }
              }
            }
          },
          "503": {
            "description": "Not currently accepting enquiries",
            "content": {
              "application/json": { "schema": { "$ref": "#/components/schemas/Status" } }
            }
          }
        }
      }
    },
    "/api/enquiry": {
      "post": {
        "operationId": "submitEnquiry",
        "summary": "Request a growth review",
        "description": "Delivers the growth review request to the studio by email and nothing else. There is no database, no CRM and no mailing list; the email is the system of record. Reply-To is set to the submitted address.\n\nRequires a valid Cloudflare Turnstile token in `turnstileToken`. Without one the request is rejected with 403. Rate limited to 5 requests per minute per IP. Request bodies over 8 KiB are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/Enquiry" },
              "example": {
                "name": "Alex",
                "email": "alex@examplebrand.com",
                "store": "examplebrand.com",
                "revenue": "$50k to $150k",
                "spend": "$10k to $30k",
                "constraints": ["Paid media", "Creative"],
                "detail": "Spending £40k/month on Meta, ROAS has been sliding since March.",
                "turnstileToken": "0.abc123..."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted and sent",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Ok" },
                "example": { "ok": true }
              }
            }
          },
          "400": {
            "description": "Schema validation failed, body too large, or wrong content type",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ok" } } }
          },
          "403": {
            "description": "Origin not allowed, or Turnstile token missing or invalid",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ok" } } }
          },
          "429": {
            "description": "Rate limited, 5 per minute per IP",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ok" } } }
          },
          "502": {
            "description": "Delivery failed downstream",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ok" } } }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Ok": {
        "type": "object",
        "required": ["ok"],
        "properties": { "ok": { "type": "boolean" } }
      },
      "Status": {
        "type": "object",
        "required": ["status", "enquiry"],
        "properties": {
          "status": { "type": "string", "enum": ["ok", "degraded"] },
          "enquiry": {
            "type": "object",
            "required": ["accepting", "humanVerificationRequired"],
            "properties": {
              "accepting": { "type": "boolean" },
              "humanVerificationRequired": {
                "type": "boolean",
                "description": "When true, a Turnstile token is required and unattended submission will fail."
              }
            }
          }
        }
      },
      "Enquiry": {
        "type": "object",
        "required": ["name", "email", "store", "constraints"],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "description": "First name is enough."
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "description": "Where the reply goes. Set as Reply-To on the delivered mail."
          },
          "store": {
            "type": "string",
            "maxLength": 2048,
            "description": "Store URL. A bare domain is accepted and normalised to https."
          },
          "revenue": {
            "type": "string",
            "enum": [
              "Under $50k",
              "$50k to $150k",
              "$150k to $500k",
              "$500k to $1m",
              "More than $1m",
              "Prefer not to say"
            ],
            "description": "Approximate monthly online revenue."
          },
          "spend": {
            "type": "string",
            "enum": [
              "Not currently spending",
              "Under $10k",
              "$10k to $30k",
              "$30k to $100k",
              "$100k to $250k",
              "More than $250k"
            ],
            "description": "Approximate monthly paid-media spend."
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Positioning",
                "Offers",
                "Creative",
                "Paid media",
                "Storefront",
                "Email and SMS",
                "Measurement",
                "Not sure yet"
              ]
            },
            "minItems": 1,
            "description": "Where growth feels constrained. Multiple selections allowed."
          },
          "detail": {
            "type": "string",
            "maxLength": 1000,
            "description": "Optional context. A sentence is plenty."
          },
          "turnstileToken": {
            "type": "string",
            "maxLength": 4096,
            "description": "Cloudflare Turnstile token. Required in production."
          },
          "company": {
            "type": "string",
            "maxLength": 0,
            "description": "Honeypot. Must be absent or empty. A non-empty value returns 200 without sending."
          }
        }
      }
    }
  }
}
