{"openapi":"3.0.3","info":{"title":"カスハラ API","description":"カスタマーハラスメント対策AIプラットフォーム REST API","version":"1.0.0","contact":{"email":"support@cushara.jp"}},"servers":[{"url":"https://cushara.jp","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"APIキー（設定画面から取得）"}},"schemas":{"Incident":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"severity":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","RESOLVED","ESCALATED"]},"channel":{"type":"string","enum":["PHONE","IN_PERSON","SNS","EMAIL","CHAT","MAIL"]},"category":{"type":"string","nullable":true},"occurredAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/api/incidents":{"get":{"summary":"インシデント一覧取得","tags":["Incidents"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"severity","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{"incidents":{"type":"array","items":{"$ref":"#/components/schemas/Incident"}}}}}}},"401":{"description":"認証エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"インシデント作成","tags":["Incidents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","description","severity","channel"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"severity":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"channel":{"type":"string","enum":["PHONE","IN_PERSON","SNS","EMAIL","CHAT","MAIL"]},"category":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"作成成功"},"400":{"description":"バリデーションエラー"},"401":{"description":"認証エラー"}}}},"/api/incidents/{id}":{"get":{"summary":"インシデント詳細取得","tags":["Incidents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"成功"},"404":{"description":"見つからない"}}},"patch":{"summary":"インシデント更新","tags":["Incidents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"成功"}}},"delete":{"summary":"インシデント削除","tags":["Incidents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"成功"}}}},"/api/export":{"get":{"summary":"データエクスポート","tags":["Data"],"parameters":[{"name":"format","in":"query","schema":{"type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"成功"}}},"delete":{"summary":"アカウント削除リクエスト","tags":["Data"],"responses":{"200":{"description":"成功"}}}},"/api/benchmark":{"get":{"summary":"業界ベンチマーク取得","tags":["Analytics"],"responses":{"200":{"description":"成功"}}}},"/api/integrations/webhook":{"get":{"summary":"Webhook一覧","tags":["Integrations"],"responses":{"200":{"description":"成功"}}},"post":{"summary":"Webhook登録","tags":["Integrations"],"responses":{"201":{"description":"作成成功"}}},"delete":{"summary":"Webhook削除","tags":["Integrations"],"responses":{"200":{"description":"成功"}}}},"/api/training":{"get":{"summary":"研修モジュール一覧","tags":["Training"],"responses":{"200":{"description":"成功"}}},"post":{"summary":"研修モジュール作成（AI生成）","tags":["Training"],"responses":{"201":{"description":"作成成功"}}}}}}