{"openapi":"3.1.0","info":{"title":"Red Bamboo Tone Analyzer","version":"0.1.0"},"paths":{"/analyze":{"post":{"summary":"Analyze","operationId":"analyze_analyze_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_analyze_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events":{"post":{"summary":"Record Events","operationId":"record_events_events_post","responses":{"204":{"description":"Successful Response"}}}},"/me/data":{"delete":{"summary":"Delete My Data","description":"Called by the app when someone deletes their account: removes their server-side records.","operationId":"delete_my_data_me_data_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Delete My Data Me Data Delete"}}}}}}},"/bug-report":{"post":{"summary":"Bug Report","description":"The app's \"Report a bug\" form: one email to Blake, sent with the Resend email service (this server cannot use Gmail's mail ports).\nNothing is stored here, and the message text is never logged. 503 = no Resend key set yet (the app then shows the support address),\n429 = too many, 502 = Resend did not accept it.","operationId":"bug_report_bug_report_post","responses":{"204":{"description":"Successful Response"}}}},"/webhooks/revenuecat":{"post":{"summary":"Revenuecat Webhook","description":"Receives RevenueCat webhook events and syncs entitlement state into Firestore.\nConfigure this URL + a shared secret in RevenueCat → Project Settings → Integrations\n→ Webhooks. RevenueCat sends the secret as a Bearer token in the Authorization header.","operationId":"revenuecat_webhook_webhooks_revenuecat_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Revenuecat Webhook Webhooks Revenuecat Post"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}}},"components":{"schemas":{"AnalysisResponse":{"properties":{"targetTone":{"type":"integer","title":"Targettone"},"spokenTone":{"type":"integer","title":"Spokentone"},"isCorrect":{"type":"boolean","title":"Iscorrect"},"wordCorrect":{"type":"boolean","title":"Wordcorrect"},"confidence":{"type":"number","title":"Confidence"},"pitchContour":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pitchcontour"},"whisperText":{"type":"string","title":"Whispertext"}},"type":"object","required":["targetTone","spokenTone","isCorrect","wordCorrect","confidence","pitchContour","whisperText"],"title":"AnalysisResponse"},"Body_analyze_analyze_post":{"properties":{"audio":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio"},"targetTone":{"type":"integer","title":"Targettone"},"targetPinyin":{"type":"string","title":"Targetpinyin"},"consentVersion":{"type":"string","title":"Consentversion","default":""},"traceId":{"type":"string","title":"Traceid","default":""}},"type":"object","required":["audio","targetTone","targetPinyin"],"title":"Body_analyze_analyze_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}