{"openapi":"3.1.0","info":{"title":"IQ Vector AI PhD Portal API","version":"1.1.0","description":"Doctoral research application intake backed by 4-table Cloudflare D1 graph and R2 raw payload storage."},"servers":[{"url":"https://iqvector.org"}],"paths":{"/api/apply":{"post":{"summary":"Submit PhD Research Pod Application","description":"Validates Turnstile token, anti-bot telemetry, CSV formula guardrails, URL shortener/disposable email checks, stores raw JSON in R2, and records candidate graph state across D1.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["full_name","email","country_hub","university","degree_track","research_area","profile_url"],"properties":{"full_name":{"type":"string","minLength":2,"example":"Dr. Ana Kovačević"},"email":{"type":"string","format":"email","example":"ana.kovacevic@university.edu"},"country_hub":{"type":"string","example":"serbia"},"pod_slug":{"type":"string","enum":["pod-1","pod-2","pod-3"],"default":"pod-1"},"university":{"type":"string","minLength":2,"example":"University of Belgrade"},"degree_track":{"type":"string","minLength":2,"example":"Doktor nauka (Ph.D.)"},"profile_url":{"type":"string","format":"uri","example":"https://scholar.google.com/citations?user=example"},"research_area":{"type":"string","minLength":2,"example":"Stochastic pricing mechanisms and multi-agent routing."},"cf-turnstile-response":{"type":"string","description":"Cloudflare Turnstile response token."},"website_hp":{"type":"string","description":"Honeypot field; must be empty."},"form_ts":{"type":"string","description":"Form open timestamp in ms."},"dwell_time_ms":{"type":"string","description":"Time spent on form in ms."},"keystroke_count":{"type":"string","description":"Keystrokes recorded during form entry."}}}}}},"responses":{"201":{"description":"Application accepted and persisted to D1 and R2","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"id":{"type":"string","format":"uuid"},"r2_raw_profile_key":{"type":"string","example":"applications/11111111-2222-3333-4444-555555555555.json"},"storage":{"type":"string","example":"Cloudflare D1 (4-table graph) + R2"}}}}}},"400":{"description":"Validation error or disallowed input"},"403":{"description":"Anti-bot / Turnstile / timing check failed"},"429":{"description":"Rate limit exceeded (10 req/min)"},"500":{"description":"Server or storage error"}}}}}}