{"openapi":"3.1.0","info":{"title":"mAIxs public website API","version":"1.0.0","description":"mAIxs is de AI-partner die je aan je team toevoegt. Van training en strategie tot werkende AI-oplossingen. Praktisch, no cure no pay, en zonder poespas. This OpenAPI document exposes only public or intentionally callable website endpoints for AI agents and automation tools.","contact":{"name":"mAIxs","email":"mike@maixs.nl","url":"https://www.maixs.nl"}},"servers":[{"url":"https://www.maixs.nl","description":"mAIxs | Jouw AI-partner"}],"tags":[{"name":"Discovery","description":"Machine-readable website discovery."},{"name":"Content","description":"Public content and publishing endpoints."},{"name":"Lead intake","description":"Public lead and contact intake endpoints."},{"name":"Diagnostics","description":"Health and status endpoints."}],"paths":{"/api/health":{"get":{"tags":["Diagnostics"],"operationId":"getHealth","summary":"Get website health status","responses":{"200":{"description":"Healthy service status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"Service is unhealthy."}}}},"/api/contact":{"post":{"tags":["Lead intake"],"operationId":"submitContactRequest","summary":"Submit a contact request for mAIxs","description":"Use this endpoint only when the user explicitly wants mAIxs to contact them. The website applies validation, honeypot protection and rate limiting.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}}},"responses":{"200":{"description":"Contact request accepted."},"400":{"description":"Validation error."},"429":{"description":"Rate limit exceeded."},"503":{"description":"Email service unavailable."}}}},"/api/chat":{"post":{"tags":["Lead intake"],"operationId":"sendChatMessage","summary":"Send a message to the mAIxs website assistant","description":"Public website chat endpoint. It is designed for short Dutch lead-intake conversations, not for bulk automation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Assistant response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"400":{"description":"Invalid message."},"500":{"description":"AI configuration or provider error."}}}},"/api/blog/posts":{"get":{"tags":["Content"],"operationId":"getBlogPostApiDocumentation","summary":"Get documentation for the authenticated blog-post publishing endpoint","responses":{"200":{"description":"Blog post API documentation."}}},"post":{"tags":["Content"],"operationId":"createBlogPost","summary":"Create a Sanity blog post","description":"Authenticated endpoint for trusted automation such as n8n or content workflows. Requires x-api-key or Authorization: Bearer.","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlogPostRequest"}}}},"responses":{"200":{"description":"Blog post created or updated."},"401":{"description":"Missing or invalid authentication."},"500":{"description":"Publishing failed."}}}},"/api/scan/submit":{"post":{"tags":["Lead intake"],"operationId":"submitAiMaturityScan","summary":"Submit an AI maturity scan","description":"Public scan submission endpoint. Requires a valid Cloudflare Turnstile token and explicit processing consent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanSubmitRequest"}}}},"responses":{"200":{"description":"Scan result URL generated."},"202":{"description":"Honeypot submission silently accepted."},"401":{"description":"Turnstile verification failed."},"422":{"description":"Invalid submission."},"429":{"description":"Rate limit exceeded."}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"},"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"HealthResponse":{"type":"object","required":["status","timestamp","version","environment","uptime"],"properties":{"status":{"type":"string","enum":["healthy"]},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"},"environment":{"type":"string"},"uptime":{"type":"number"}}},"ContactRequest":{"type":"object","required":["name","email","message"],"properties":{"name":{"type":"string","minLength":2,"maxLength":100},"email":{"type":"string","format":"email"},"message":{"type":"string","minLength":10,"maxLength":5000},"website":{"type":"string","description":"Honeypot field. Leave empty.","maxLength":0}},"additionalProperties":false},"ChatRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":2000},"history":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"},"maxItems":20}},"additionalProperties":true},"ChatMessage":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"}}},"ChatResponse":{"type":"object","properties":{"response":{"type":"string"},"message":{"type":"string"},"error":{"type":"string"}}},"CreateBlogPostRequest":{"type":"object","required":["title","content","excerpt"],"properties":{"title":{"type":"string"},"content":{"type":"string","description":"HTML or plain text."},"excerpt":{"type":"string"},"slug":{"type":"string"},"featuredImageUrl":{"type":"string","format":"uri"},"featuredImageAlt":{"type":"string"},"authorId":{"type":"string"},"categoryIds":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"publishedAt":{"type":"string","format":"date-time"},"published":{"type":"boolean","default":false},"seo":{"type":"object","properties":{"metaTitle":{"type":"string"},"metaDescription":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}}}}}},"ScanSubmitRequest":{"type":"object","description":"Shape follows the website scan form. Use the UI unless the user explicitly authorizes an automated scan submission.","required":["answers","contact","consent","turnstileToken"],"properties":{"answers":{"type":"array","items":{"type":"object","required":["questionId","value"],"properties":{"questionId":{"type":"string"},"value":{"type":"integer","minimum":0,"maximum":4},"rawAnswer":{"type":"string"}}}},"contact":{"type":"object","required":["name","email","companyName"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"companyName":{"type":"string"}}},"branche":{"type":"string"},"companySizeBucket":{"type":"string"},"role":{"type":"string"},"consent":{"type":"object","required":["processing","textVersion"],"properties":{"processing":{"type":"boolean","const":true},"newsletter":{"type":"boolean"},"textVersion":{"type":"string"}}},"turnstileToken":{"type":"string"},"idempotencyKey":{"type":"string"},"honeypot":{"type":"string","maxLength":0}}}}},"externalDocs":{"description":"LLM-readable mAIxs overview","url":"https://www.maixs.nl/llms.txt"}}