{"openapi":"3.0.0","info":{"title":"Honen Connector API","version":"1.0.0","description":"Workspace Connector HTTP API. Every command is POST /api/v1/{domain}/{action} with a JSON body, authenticated with a Connector Bearer token and authorized by the Connector's policy. Mutating commands accept Idempotency-Key so network retries cannot duplicate writes. Versioning and deprecation policy: /api/v1 is stable; breaking changes use a new major version. Deprecated operations are marked in OpenAPI and documented with migration steps; scheduled retirement is announced with Sunset. See https://honen.com/developers/the-http-api-api-v1-conventions.md and https://honen.com/developers/llms.txt."},"servers":[{"url":"https://lti-6a62abf39bb1e3e67d9593ae.honen.com"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A Connector secret or child token (Authorization: Bearer hn_…)."}},"schemas":{"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"resolution":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"details":{"nullable":true}},"required":["code","message","resolution"]}},"required":["success","error"]}},"parameters":{}},"paths":{"/api/v1/analytics/monthly-overview":{"post":{"operationId":"analytics_monthly-overview","summary":"Monthly active creators, course types, creation starts/first publications, and learner start/completion MAU and totals.","description":"Matches the main Analytics page. Omit month for the current calendar month to date in America/New_York. Creator completions mean first publication; learner completions use recorded completion dates. Unique people are counted once per metric within each month. Requires workspace VIEW_ANALYTICS.","tags":["analytics"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Reporting month in YYYY-MM format, from January 2000 through the current month. Defaults to the current month."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"month":{"type":"string"},"currentMonth":{"type":"string"},"timezone":{"type":"string"},"creation":{"type":"object","properties":{"activeCreators":{"type":"number"},"coursesStarted":{"type":"number"},"coursesCompleted":{"type":"number"},"courseTypes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["COURSE","ASSESSMENT","ATOM"]},"started":{"type":"number"},"completed":{"type":"number"}},"required":["type","started","completed"]}}},"required":["activeCreators","coursesStarted","coursesCompleted","courseTypes"]},"learning":{"type":"object","properties":{"startingLearners":{"type":"number"},"completingLearners":{"type":"number"},"coursesStarted":{"type":"number"},"coursesCompleted":{"type":"number"}},"required":["startingLearners","completingLearners","coursesStarted","coursesCompleted"]}},"required":["month","currentMonth","timezone","creation","learning"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/analytics/hero":{"post":{"operationId":"analytics_hero","summary":"Workspace top-line counts (students, courses, completions).","description":"Workspace top-line counts (students, courses, completions).","tags":["analytics"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"scopeType":{"type":"string","enum":["WORKSPACE"]},"totalStudents":{"type":"number"},"totalInstructors":{"type":"number"},"totalAdmins":{"type":"number"},"totalCourses":{"type":"number"},"courseCompletions":{"type":"number"},"pendingInvites":{"type":"number"},"avgTimeToCompleteSeconds":{"type":"number","nullable":true}},"required":["scopeType","totalStudents","totalInstructors","totalAdmins","totalCourses","courseCompletions","pendingInvites","avgTimeToCompleteSeconds"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/analytics/courses":{"post":{"operationId":"analytics_courses","summary":"Per-course performance rows for the workspace.","description":"Per-course performance rows for the workspace.","tags":["analytics"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courses":{"type":"array","items":{"type":"object","properties":{"courseId":{"type":"string"},"title":{"type":"string"},"enrolled":{"type":"number"},"completed":{"type":"number"},"completionPercent":{"type":"number"}},"required":["courseId","title","enrolled","completed","completionPercent"]}}},"required":["courses"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/analytics/students":{"post":{"operationId":"analytics_students","summary":"Student roster with assigned vs completed counts.","description":"Student roster with assigned vs completed counts.","tags":["analytics"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true}},"required":["id","name","email","avatarUrl"]},"joinedAt":{"type":"string"},"coursesAssigned":{"type":"number"},"coursesCompleted":{"type":"number"},"groups":{"type":"array","items":{"type":"string"}}},"required":["user","joinedAt","coursesAssigned","coursesCompleted","groups"]}}},"required":["students"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/analytics/needs-attention":{"post":{"operationId":"analytics_needs-attention","summary":"Students with assigned coursework but zero completions.","description":"Students with assigned coursework but zero completions.","tags":["analytics"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true}},"required":["id","name","email","avatarUrl"]},"joinedAt":{"type":"string"},"coursesAssigned":{"type":"number"},"coursesCompleted":{"type":"number"},"groups":{"type":"array","items":{"type":"string"}}},"required":["user","joinedAt","coursesAssigned","coursesCompleted","groups"]}}},"required":["students"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/analytics/top-performers":{"post":{"operationId":"analytics_top-performers","summary":"Students ranked by completion ratio.","description":"Students ranked by completion ratio.","tags":["analytics"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"students":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true}},"required":["id","name","email","avatarUrl"]},"joinedAt":{"type":"string"},"coursesAssigned":{"type":"number"},"coursesCompleted":{"type":"number"},"groups":{"type":"array","items":{"type":"string"}}},"required":["user","joinedAt","coursesAssigned","coursesCompleted","groups"]}}},"required":["students"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/performance/student":{"post":{"operationId":"performance_student","summary":"One student's quiz/test scores and activity completion.","description":"One student's quiz/test scores and activity completion.","tags":["performance"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"courseId":{"type":"string"}},"required":["userId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"]},"courses":{"type":"array","items":{"type":"object","properties":{"courseId":{"type":"string"},"courseTitle":{"type":"string"},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"lastActiveAt":{"type":"string","nullable":true},"quizCount":{"type":"number"},"avgQuizPercent":{"type":"number","nullable":true},"testCount":{"type":"number"},"avgTestPercent":{"type":"number","nullable":true}},"required":["courseId","courseTitle","startedAt","completedAt","lastActiveAt","quizCount","avgQuizPercent","testCount","avgTestPercent"]}},"quizScores":{"type":"array","items":{"type":"object","properties":{"activityId":{"type":"string"},"topicId":{"type":"string"},"topicTitle":{"type":"string"},"unitId":{"type":"string"},"unitTitle":{"type":"string"},"score":{"type":"number"},"totalQuestions":{"type":"number"},"percent":{"type":"number"},"elapsedSeconds":{"type":"number"},"isCompleted":{"type":"boolean","enum":[false,true]},"updatedAt":{"type":"string"}},"required":["activityId","topicId","topicTitle","unitId","unitTitle","score","totalQuestions","percent","elapsedSeconds","isCompleted","updatedAt"]}},"testScores":{"type":"array","items":{"type":"object","properties":{"testId":{"type":"string"},"testTitle":{"type":"string"},"unitId":{"type":"string"},"unitTitle":{"type":"string"},"score":{"type":"number"},"totalGradeable":{"type":"number"},"percent":{"type":"number"},"elapsedSeconds":{"type":"number"},"isCompleted":{"type":"boolean","enum":[false,true]},"updatedAt":{"type":"string"}},"required":["testId","testTitle","unitId","unitTitle","score","totalGradeable","percent","elapsedSeconds","isCompleted","updatedAt"]}},"activityCompletion":{"type":"object","properties":{"READ":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]},"FLASHCARDS":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]},"QUIZ":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]},"LECTURE":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]},"PODCAST":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]},"JAM_SESSION":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]},"COMIC":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]},"GAME":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]},"CHAT":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]},"VIDEO":{"type":"object","properties":{"attempted":{"type":"number"},"completed":{"type":"number"}},"required":["attempted","completed"]}},"required":["READ","FLASHCARDS","QUIZ","LECTURE","PODCAST","JAM_SESSION","COMIC","GAME","CHAT","VIDEO"]}},"required":["user","courses","quizScores","testScores","activityCompletion"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/performance/course":{"post":{"operationId":"performance_course","summary":"Class-wide rollup for a course.","description":"Class-wide rollup for a course.","tags":["performance"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"}},"required":["courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"course":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]},"enrolled":{"type":"number"},"completed":{"type":"number"},"completionPercent":{"type":"number"},"avgQuizPercent":{"type":"number","nullable":true},"avgTestPercent":{"type":"number","nullable":true},"units":{"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string"},"unitTitle":{"type":"string"},"totalActivities":{"type":"number"},"attemptedActivities":{"type":"number"},"completedActivities":{"type":"number"},"percentAttempted":{"type":"number"},"percentCompleted":{"type":"number"},"unitTestScore":{"type":"object","properties":{"score":{"type":"number"},"total":{"type":"number"},"percent":{"type":"number"}},"required":["score","total","percent"],"nullable":true}},"required":["unitId","unitTitle","totalActivities","attemptedActivities","completedActivities","percentAttempted","percentCompleted","unitTestScore"]}},"perQuizActivity":{"type":"array","items":{"type":"object","properties":{"activityId":{"type":"string"},"topicId":{"type":"string"},"topicTitle":{"type":"string"},"unitId":{"type":"string"},"attempts":{"type":"number"},"completedAttempts":{"type":"number"},"avgScore":{"type":"number","nullable":true},"avgPercent":{"type":"number","nullable":true}},"required":["activityId","topicId","topicTitle","unitId","attempts","completedAttempts","avgScore","avgPercent"]}},"perUnitTest":{"type":"array","items":{"type":"object","properties":{"testId":{"type":"string"},"unitId":{"type":"string"},"unitTitle":{"type":"string"},"attempts":{"type":"number"},"completedAttempts":{"type":"number"},"avgScore":{"type":"number","nullable":true},"avgPercent":{"type":"number","nullable":true}},"required":["testId","unitId","unitTitle","attempts","completedAttempts","avgScore","avgPercent"]}}},"required":["course","enrolled","completed","completionPercent","avgQuizPercent","avgTestPercent","units","perQuizActivity","perUnitTest"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/performance/test":{"post":{"operationId":"performance_test","summary":"Score distribution for one unit test.","description":"Score distribution for one unit test.","tags":["performance"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"testId":{"type":"string"}},"required":["testId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"test":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"unitId":{"type":"string"},"courseId":{"type":"string"}},"required":["id","title","unitId","courseId"]},"attempts":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"]},"score":{"type":"number","nullable":true},"totalGradeable":{"type":"number","nullable":true},"percent":{"type":"number","nullable":true},"elapsedSeconds":{"type":"number"},"isCompleted":{"type":"boolean","enum":[false,true]},"updatedAt":{"type":"string"}},"required":["user","score","totalGradeable","percent","elapsedSeconds","isCompleted","updatedAt"]}},"completedAttempts":{"type":"number"},"avgScore":{"type":"number","nullable":true},"avgPercent":{"type":"number","nullable":true},"distribution":{"type":"object","properties":{"0-24":{"type":"number"},"25-49":{"type":"number"},"50-74":{"type":"number"},"75-100":{"type":"number"}},"required":["0-24","25-49","50-74","75-100"]}},"required":["test","attempts","completedAttempts","avgScore","avgPercent","distribution"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/performance/quiz":{"post":{"operationId":"performance_quiz","summary":"Score distribution for one quiz activity.","description":"Score distribution for one quiz activity.","tags":["performance"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string"}},"required":["activityId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"activity":{"type":"object","properties":{"id":{"type":"string"},"topicId":{"type":"string"},"topicTitle":{"type":"string"},"unitId":{"type":"string"},"unitTitle":{"type":"string"},"courseId":{"type":"string"}},"required":["id","topicId","topicTitle","unitId","unitTitle","courseId"]},"attempts":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"]},"score":{"type":"number","nullable":true},"totalQuestions":{"type":"number","nullable":true},"percent":{"type":"number","nullable":true},"elapsedSeconds":{"type":"number"},"isCompleted":{"type":"boolean","enum":[false,true]},"updatedAt":{"type":"string"}},"required":["user","score","totalQuestions","percent","elapsedSeconds","isCompleted","updatedAt"]}},"completedAttempts":{"type":"number"},"avgScore":{"type":"number","nullable":true},"avgPercent":{"type":"number","nullable":true},"distribution":{"type":"object","properties":{"0-24":{"type":"number"},"25-49":{"type":"number"},"50-74":{"type":"number"},"75-100":{"type":"number"}},"required":["0-24","25-49","50-74","75-100"]}},"required":["activity","attempts","completedAttempts","avgScore","avgPercent","distribution"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/course-units":{"post":{"operationId":"learning_course-units","summary":"Per-unit completion %, avg test score, avg time-on-task.","description":"Per-unit completion %, avg test score, avg time-on-task.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"groupId":{"type":"string"}},"required":["courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courseId":{"type":"string"},"totalMembers":{"type":"number"},"units":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"orderIndex":{"type":"number"},"topicCount":{"type":"number"},"projectCount":{"type":"number"},"projectCompletion":{"type":"number","nullable":true},"avgScore":{"type":"number","nullable":true},"minScore":{"type":"number","nullable":true},"maxScore":{"type":"number","nullable":true},"completion":{"type":"number"},"avgTimeSeconds":{"type":"number","nullable":true}},"required":["id","title","orderIndex","topicCount","projectCount","projectCompletion","avgScore","minScore","maxScore","completion","avgTimeSeconds"]}}},"required":["courseId","totalMembers","units"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/unit-topics":{"post":{"operationId":"learning_unit-topics","summary":"Per-topic completion %, avg quiz score, avg time-on-task.","description":"Per-topic completion %, avg quiz score, avg time-on-task.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"unitId":{"type":"string"},"groupId":{"type":"string"}},"required":["unitId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"unitId":{"type":"string"},"courseId":{"type":"string"},"totalMembers":{"type":"number"},"topics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"orderIndex":{"type":"number"},"avgScore":{"type":"number","nullable":true},"minScore":{"type":"number","nullable":true},"maxScore":{"type":"number","nullable":true},"completion":{"type":"number"},"avgTimeSeconds":{"type":"number","nullable":true}},"required":["id","title","orderIndex","avgScore","minScore","maxScore","completion","avgTimeSeconds"]}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"completion":{"type":"number","nullable":true},"requiredMembers":{"type":"number"},"totalMembers":{"type":"number"}},"required":["id","title","type","completion","requiredMembers","totalMembers"]}}},"required":["unitId","courseId","totalMembers","topics","projects"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/struggling-topics":{"post":{"operationId":"learning_struggling-topics","summary":"Ranked hardest topics (low completion + low scores).","description":"Ranked hardest topics (low completion + low scores).","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"groupId":{"type":"string"},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courseId":{"type":"string"},"totalMembers":{"type":"number"},"topics":{"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string"},"unitTitle":{"type":"string"},"topicId":{"type":"string"},"topicTitle":{"type":"string"},"completion":{"type":"number"},"avgScore":{"type":"number","nullable":true},"avgTimeSeconds":{"type":"number","nullable":true},"struggleScore":{"type":"number"}},"required":["unitId","unitTitle","topicId","topicTitle","completion","avgScore","avgTimeSeconds","struggleScore"]}}},"required":["courseId","totalMembers","topics"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/question-stats":{"post":{"operationId":"learning_question-stats","summary":"Cohort wrong-answer rates per question (worst-first).","description":"Cohort wrong-answer rates per question (worst-first).","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["test","quiz"]},"refId":{"type":"string"},"groupId":{"type":"string"}},"required":["kind","refId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"kind":{"type":"string","enum":["test","quiz"]},"refId":{"type":"string"},"title":{"type":"string"},"courseId":{"type":"string"},"unitId":{"type":"string"},"topicId":{"type":"string","nullable":true},"totalMembers":{"type":"number"},"completedAttempts":{"type":"number"},"avgElapsedSeconds":{"type":"number","nullable":true},"avgScorePercent":{"type":"number","nullable":true},"questions":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string"},"order":{"type":"number"},"type":{"type":"string"},"question":{"type":"string"},"answeredCount":{"type":"number"},"correctCount":{"type":"number"},"wrongCount":{"type":"number"},"wrongRatePercent":{"type":"number","nullable":true},"topWrongAnswer":{"type":"string","nullable":true},"topWrongAnswerCount":{"type":"number"}},"required":["questionId","order","type","question","answeredCount","correctCount","wrongCount","wrongRatePercent","topWrongAnswer","topWrongAnswerCount"]}}},"required":["kind","refId","title","courseId","unitId","topicId","totalMembers","completedAttempts","avgElapsedSeconds","avgScorePercent","questions"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/student-units":{"post":{"operationId":"learning_student-units","summary":"One learner's unit/topic/activity breakdown + times vs team avg.","description":"One learner's unit/topic/activity breakdown + times vs team avg.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"courseId":{"type":"string"},"groupId":{"type":"string"}},"required":["userId","courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"userId":{"type":"string"},"courseId":{"type":"string"},"overallProgress":{"type":"number"},"overallScore":{"type":"number","nullable":true},"overallStatus":{"type":"string","enum":["complete","active","not-started"]},"unitsCompleted":{"type":"number"},"totalUnits":{"type":"number"},"criteriaLabel":{"type":"string","nullable":true},"modules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"progress":{"type":"number"},"quizScore":{"type":"number","nullable":true},"teamAvg":{"type":"number","nullable":true},"status":{"type":"string","enum":["complete","active","not-started"]},"timeSeconds":{"type":"number","nullable":true},"unitComplete":{"type":"boolean","enum":[false,true]},"topics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"completedCount":{"type":"number"},"requiredCount":{"type":"number"},"totalActivities":{"type":"number"},"completed":{"type":"boolean","enum":[false,true]},"timeSeconds":{"type":"number","nullable":true},"activities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"completed":{"type":"boolean","enum":[false,true]},"timeSeconds":{"type":"number","nullable":true}},"required":["id","title","type","completed","timeSeconds"]}}},"required":["id","title","completedCount","requiredCount","totalActivities","completed","timeSeconds","activities"]}},"test":{"type":"object","properties":{"id":{"type":"string"},"required":{"type":"boolean","enum":[false,true]},"taken":{"type":"boolean","enum":[false,true]},"scorePercent":{"type":"number","nullable":true},"minScore":{"type":"number","nullable":true},"satisfied":{"type":"boolean","enum":[false,true]}},"required":["id","required","taken","scorePercent","minScore","satisfied"],"nullable":true},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"required":{"type":"boolean","enum":[false,true]},"completed":{"type":"boolean","enum":[false,true]},"satisfied":{"type":"boolean","enum":[false,true]}},"required":["id","title","required","completed","satisfied"]}}},"required":["id","title","progress","quizScore","teamAvg","status","timeSeconds","unitComplete","topics","test","projects"]}}},"required":["userId","courseId","overallProgress","overallScore","overallStatus","unitsCompleted","totalUnits","criteriaLabel","modules"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/course-detail":{"post":{"operationId":"learning_course-detail","summary":"All assigned members with progress %, scores, status.","description":"All assigned members with progress %, scores, status.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"groupId":{"type":"string"}},"required":["courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courseId":{"type":"string"},"enrolled":{"type":"number"},"completed":{"type":"number"},"avgScore":{"type":"number","nullable":true},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"progressPercent":{"type":"number"},"avgScore":{"type":"number","nullable":true},"minScore":{"type":"number","nullable":true},"maxScore":{"type":"number","nullable":true},"status":{"type":"string","enum":["complete","active","not-started"]},"completedAt":{"type":"string","nullable":true}},"required":["id","name","email","progressPercent","avgScore","minScore","maxScore","status","completedAt"]}}},"required":["courseId","enrolled","completed","avgScore","members"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/completions":{"post":{"operationId":"learning_completions","summary":"Paginated course completion events.","description":"Paginated course completions. Send page (default 1) and limit (default 25) in the JSON body. Increment page until pagination.page reaches pagination.totalPages. Filters and authorization apply to every page.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"userId":{"type":"string"},"groupId":{"type":"string"},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"completions":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"userName":{"type":"string","nullable":true},"userEmail":{"type":"string"},"courseId":{"type":"string"},"courseTitle":{"type":"string"},"completedAt":{"type":"string"},"avgScore":{"type":"number","nullable":true}},"required":["userId","userName","userEmail","courseId","courseTitle","completedAt","avgScore"]}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","limit","total","totalPages"]}},"required":["completions","pagination"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/assignment-cohort":{"post":{"operationId":"learning_assignment-cohort","summary":"Assignment assignees: completion %, weak units, struggling topics.","description":"Assignment assignees: completion %, weak units, struggling topics.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assignmentId":{"type":"string"}},"required":["assignmentId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"assignmentId":{"type":"string"},"courseId":{"type":"string"},"courseTitle":{"type":"string"},"assigneeCount":{"type":"number"},"completedCount":{"type":"number"},"completionPercent":{"type":"number"},"avgScore":{"type":"number","nullable":true},"strugglingTopics":{"type":"array","items":{"type":"object","properties":{"unitId":{"type":"string"},"unitTitle":{"type":"string"},"topicId":{"type":"string"},"topicTitle":{"type":"string"},"completion":{"type":"number"},"avgScore":{"type":"number","nullable":true},"avgTimeSeconds":{"type":"number","nullable":true},"struggleScore":{"type":"number"}},"required":["unitId","unitTitle","topicId","topicTitle","completion","avgScore","avgTimeSeconds","struggleScore"]}},"weakUnits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"orderIndex":{"type":"number"},"topicCount":{"type":"number"},"projectCount":{"type":"number"},"projectCompletion":{"type":"number","nullable":true},"avgScore":{"type":"number","nullable":true},"minScore":{"type":"number","nullable":true},"maxScore":{"type":"number","nullable":true},"completion":{"type":"number"},"avgTimeSeconds":{"type":"number","nullable":true}},"required":["id","title","orderIndex","topicCount","projectCount","projectCompletion","avgScore","minScore","maxScore","completion","avgTimeSeconds"]}}},"required":["assignmentId","courseId","courseTitle","assigneeCount","completedCount","completionPercent","avgScore","strugglingTopics","weakUnits"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/learning-modes":{"post":{"operationId":"learning_learning-modes","summary":"Which modalities learners used (% of cohort).","description":"Which modalities learners used (% of cohort).","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"userId":{"type":"string"},"groupId":{"type":"string"}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"totalMembers":{"type":"number"},"modalities":{"type":"array","items":{"type":"object","properties":{"percent":{"type":"number"},"id":{"type":"string"},"name":{"type":"string"},"users":{"type":"number"}},"required":["percent","id","name","users"]}},"singleUser":{"type":"boolean","enum":[false,true]}},"required":["totalMembers","modalities","singleUser"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/learning-modes-time":{"post":{"operationId":"learning_learning-modes-time","summary":"Time spent per modality.","description":"Time spent per modality.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"userId":{"type":"string"},"groupId":{"type":"string"}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"singleUser":{"type":"boolean","enum":[false,true]},"totalMembers":{"type":"number"},"totalSeconds":{"type":"number"},"modalities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"totalSeconds":{"type":"number"},"avgSecondsPerMember":{"type":"number"},"percent":{"type":"number"}},"required":["id","name","totalSeconds","avgSecondsPerMember","percent"]}}},"required":["totalMembers","totalSeconds","modalities"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/completion-time":{"post":{"operationId":"learning_completion-time","summary":"Fastest/slowest learners by avg tracked time-to-complete.","description":"Fastest/slowest learners by avg tracked time-to-complete.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string"},"search":{"type":"string"}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"completionsCount":{"type":"number"},"trackedCount":{"type":"number"},"avgSeconds":{"type":"number","nullable":true},"fastestSeconds":{"type":"number","nullable":true}},"required":["id","name","email","avatarUrl","completionsCount","trackedCount","avgSeconds","fastestSeconds"]}},"totalMembers":{"type":"number"},"scoredMembers":{"type":"number"}},"required":["members","totalMembers","scoredMembers"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/training-activity":{"post":{"operationId":"learning_training-activity","summary":"Daily active learners for the last 7 days.","description":"Daily active learners for the last 7 days.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string"}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"activeCount":{"type":"number"}},"required":["date","activeCount"]}}},"required":["data"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/student-questions":{"post":{"operationId":"learning_student-questions","summary":"One learner's per-question answers (office-hours drill-down).","description":"One learner's per-question answers (office-hours drill-down).","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"kind":{"type":"string","enum":["test","quiz"]},"refId":{"type":"string"},"attemptId":{"type":"string"}},"required":["userId","kind","refId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"kind":{"type":"string","enum":["test","quiz"]},"title":{"type":"string"},"isCompleted":{"type":"boolean","enum":[false,true]},"score":{"type":"number"},"totalGradeable":{"type":"number"},"scorePercent":{"type":"number","nullable":true},"elapsedSeconds":{"type":"number"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"type":{"type":"string"},"question":{"type":"string"},"explanation":{"type":"string","nullable":true},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"text":{"type":"string"},"isCorrect":{"type":"boolean","enum":[false,true]},"isSelected":{"type":"boolean","enum":[false,true]}},"required":["label","text","isCorrect","isSelected"]},"nullable":true},"studentAnswerText":{"type":"string","nullable":true},"correctAnswerText":{"type":"string","nullable":true},"isCorrect":{"type":"boolean","enum":[false,true],"nullable":true},"answered":{"type":"boolean","enum":[false,true]}},"required":["id","order","type","question","explanation","options","studentAnswerText","correctAnswerText","isCorrect","answered"]}},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"attemptNumber":{"type":"number"},"score":{"type":"number","nullable":true},"totalGradeable":{"type":"number"},"scorePercent":{"type":"number","nullable":true},"elapsedSeconds":{"type":"number"},"submittedAt":{"type":"string"}},"required":["id","attemptNumber","score","totalGradeable","scorePercent","elapsedSeconds","submittedAt"]}},"selectedAttemptId":{"type":"string","nullable":true}},"required":["kind","title","isCompleted","score","totalGradeable","scorePercent","elapsedSeconds","questions","attempts","selectedAttemptId"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/course-at-risk":{"post":{"operationId":"learning_course-at-risk","summary":"Who hasn't started, is behind, or has low test scores.","description":"Who hasn't started, is behind, or has low test scores.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"groupId":{"type":"string"},"behindBelow":{"type":"integer"},"scoreBelow":{"type":"integer"}},"required":["courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courseId":{"type":"string"},"enrolled":{"type":"number"},"completed":{"type":"number"},"classAvgScore":{"type":"number","nullable":true},"thresholds":{"type":"object","properties":{"behindBelow":{"type":"number"},"scoreBelow":{"type":"number"}},"required":["behindBelow","scoreBelow"]},"summary":{"type":"object","properties":{"notStarted":{"type":"number"},"behind":{"type":"number"},"lowScore":{"type":"number"},"needsHelp":{"type":"number"}},"required":["notStarted","behind","lowScore","needsHelp"]},"notStarted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"progressPercent":{"type":"number"},"avgScore":{"type":"number","nullable":true},"minScore":{"type":"number","nullable":true},"maxScore":{"type":"number","nullable":true},"status":{"type":"string","enum":["complete","active","not-started"]},"completedAt":{"type":"string","nullable":true}},"required":["id","name","email","progressPercent","avgScore","minScore","maxScore","status","completedAt"]}},"behind":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"progressPercent":{"type":"number"},"avgScore":{"type":"number","nullable":true},"minScore":{"type":"number","nullable":true},"maxScore":{"type":"number","nullable":true},"status":{"type":"string","enum":["complete","active","not-started"]},"completedAt":{"type":"string","nullable":true}},"required":["id","name","email","progressPercent","avgScore","minScore","maxScore","status","completedAt"]}},"lowScore":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"progressPercent":{"type":"number"},"avgScore":{"type":"number","nullable":true},"minScore":{"type":"number","nullable":true},"maxScore":{"type":"number","nullable":true},"status":{"type":"string","enum":["complete","active","not-started"]},"completedAt":{"type":"string","nullable":true}},"required":["id","name","email","progressPercent","avgScore","minScore","maxScore","status","completedAt"]}}},"required":["courseId","enrolled","completed","classAvgScore","thresholds","summary","notStarted","behind","lowScore"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/overdue-assignments":{"post":{"operationId":"learning_overdue-assignments","summary":"All incomplete assignments past due date in scope.","description":"All incomplete assignments past due date in scope.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"groupId":{"type":"string"}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"overdueCount":{"type":"number"},"rows":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"userName":{"type":"string"},"userEmail":{"type":"string"},"assignmentId":{"type":"string"},"assignmentName":{"type":"string","nullable":true},"courseId":{"type":"string"},"courseTitle":{"type":"string"},"dueDate":{"type":"string","nullable":true},"daysOverdue":{"type":"number","nullable":true}},"required":["userId","userName","userEmail","assignmentId","assignmentName","courseId","courseTitle","dueDate","daysOverdue"]}}},"required":["overdueCount","rows"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/project-scenarios":{"post":{"operationId":"learning_project-scenarios","summary":"Role-play / scenario completion, attempts, avg best score.","description":"Role-play / scenario completion, attempts, avg best score.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"unitId":{"type":"string"},"groupId":{"type":"string"}},"required":["courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courseId":{"type":"string"},"totalMembers":{"type":"number"},"projects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"unitId":{"type":"string"},"unitTitle":{"type":"string"},"startedPercent":{"type":"number"},"completionPercent":{"type":"number"},"avgAttempts":{"type":"number","nullable":true},"avgBestScorePercent":{"type":"number","nullable":true},"startedCount":{"type":"number"},"completedCount":{"type":"number"}},"required":["projectId","title","type","unitId","unitTitle","startedPercent","completionPercent","avgAttempts","avgBestScorePercent","startedCount","completedCount"]}}},"required":["courseId","totalMembers","projects"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/scenario-attempts":{"post":{"operationId":"learning_scenario-attempts","summary":"One learner's scenario attempt: evaluation + transcript.","description":"One learner's scenario attempt: evaluation + transcript.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"projectId":{"type":"string"},"attemptId":{"type":"string"}},"required":["userId","projectId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"projectTitle":{"type":"string"},"kind":{"type":"string"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"attemptNumber":{"type":"number"},"score":{"type":"number"},"maxScore":{"type":"number"},"submittedAt":{"type":"string","nullable":true}},"required":["id","attemptNumber","score","maxScore","submittedAt"]}},"selected":{"type":"object","properties":{"id":{"type":"string"},"attemptNumber":{"type":"number"},"score":{"type":"number"},"maxScore":{"type":"number"},"submittedAt":{"type":"string","nullable":true},"evaluation":{"type":"object","additionalProperties":{"description":"Arbitrary JSON value."},"nullable":true},"transcript":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","character"]},"content":{"type":"string"},"characterName":{"type":"string","nullable":true},"timestamp":{"type":"number","nullable":true}},"required":["role","content"]},"nullable":true},"recordingUrl":{"type":"string","nullable":true},"recordingPending":{"type":"boolean","enum":[false,true]}},"required":["id","attemptNumber","score","maxScore","submittedAt","evaluation","transcript","recordingUrl","recordingPending"],"nullable":true}},"required":["projectTitle","kind","attempts","selected"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/project-results":{"post":{"operationId":"learning_project-results","summary":"One learner's graded project: rubric grade + submission (form field responses, etc.).","description":"One learner's graded project: rubric grade + submission (form field responses, etc.).","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"projectId":{"type":"string"},"attemptId":{"type":"string"}},"required":["userId","projectId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"projectTitle":{"type":"string"},"projectType":{"type":"string"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"attemptNumber":{"type":"number"},"score":{"type":"number"},"maxScore":{"type":"number"},"submittedAt":{"type":"string","nullable":true}},"required":["id","attemptNumber","score","maxScore","submittedAt"]}},"selected":{"type":"object","properties":{"id":{"type":"string"},"attemptNumber":{"type":"number"},"score":{"type":"number"},"maxScore":{"type":"number"},"submittedAt":{"type":"string","nullable":true},"overallFeedback":{"type":"string","nullable":true},"criteria":{"type":"array","items":{"type":"object","properties":{"criterion":{"type":"string"},"score":{"type":"number"},"maxScore":{"type":"number"},"feedback":{"type":"string"}},"required":["criterion","score","maxScore","feedback"]}},"form":{"type":"object","properties":{"config":{"description":"Arbitrary JSON value."},"submission":{"type":"object","additionalProperties":{"description":"Arbitrary JSON value."}}},"required":["config","submission"],"nullable":true},"submission":{"description":"Arbitrary JSON value."}},"required":["id","attemptNumber","score","maxScore","submittedAt","overallFeedback","criteria","form","submission"],"nullable":true}},"required":["projectTitle","projectType","attempts","selected"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/learning/creator-review":{"post":{"operationId":"learning_creator-review","summary":"One creator's video-review submission + the Creator Team's feedback thread + acknowledgment status.","description":"One creator's video-review submission + the Creator Team's feedback thread + acknowledgment status.","tags":["learning"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"projectId":{"type":"string"}},"required":["userId","projectId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"submission":{"type":"object","additionalProperties":{"description":"Arbitrary JSON value."},"nullable":true},"submittedAt":{"type":"string","nullable":true},"feedback":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"adminName":{"type":"string"},"commentText":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","adminName","commentText","createdAt"]}},"acknowledgedAt":{"type":"string","nullable":true}},"required":["submission","submittedAt","feedback","acknowledgedAt"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/courses/list":{"post":{"operationId":"courses_list","summary":"List courses visible to this Connector (owner/editor/admin).","description":"List courses visible to this Connector (owner/editor/admin).","tags":["courses"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"isPublished":{"type":"boolean","enum":[false,true]},"visibility":{"type":"string","enum":["public","private"]},"isOwned":{"type":"boolean","enum":[false,true]},"canEdit":{"type":"boolean","enum":[false,true]},"role":{"type":"string","enum":["owner","editor","workspace-admin"]},"editUrl":{"type":"string","nullable":true},"visibilityNote":{"type":"string","nullable":true},"updatedAt":{"type":"string"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"peopleUrl":{"type":"string"}},"required":["id","name","email","peopleUrl"]}},"required":["id","title","description","isPublished","visibility","isOwned","canEdit","role","editUrl","visibilityNote","updatedAt","createdBy"]}},"totalCount":{"type":"number"}},"required":["courses","totalCount"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/courses/structure":{"post":{"operationId":"courses_structure","summary":"Unit/topic structure for a course.","description":"Unit/topic structure for a course.","tags":["courses"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"}},"required":["courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courseId":{"type":"string"},"courseTitle":{"type":"string"},"canEdit":{"type":"boolean","enum":[false,true]},"readOnlyNote":{"type":"string","nullable":true},"unitCount":{"type":"number"},"topicCount":{"type":"number"},"projectCount":{"type":"number"},"unitTestCount":{"type":"number"},"units":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"orderIndex":{"type":"number"},"contentOrder":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"]}},"topics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"orderIndex":{"type":"number"},"learningGoalCount":{"type":"number"},"activityTypes":{"type":"array","items":{"type":"string"}},"editUrl":{"type":"string","nullable":true}},"required":["id","title","description","orderIndex","learningGoalCount","activityTypes","editUrl"]}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"orderIndex":{"type":"number"},"editUrl":{"type":"string","nullable":true}},"required":["id","title","type","orderIndex","editUrl"]}},"test":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"questionCount":{"type":"number"},"editUrl":{"type":"string","nullable":true}},"required":["id","title","questionCount","editUrl"],"nullable":true}},"required":["id","title","description","orderIndex","topics","projects","test"]}}},"required":["courseId","courseTitle","canEdit","readOnlyNote","unitCount","topicCount","projectCount","unitTestCount","units"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/courses/topic":{"post":{"operationId":"courses_topic","summary":"Topic detail (learning goals + activities).","description":"Topic detail (learning goals + activities).","tags":["courses"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topicId":{"type":"string"}},"required":["topicId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"topicId":{"type":"string"},"unitId":{"type":"string"},"courseId":{"type":"string"},"courseTitle":{"type":"string"},"unitTitle":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"instructions":{"type":"string","nullable":true},"orderIndex":{"type":"number"},"learningGoals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["id","title","description"]}},"activities":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["FLASHCARDS"]},"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"title":{"type":"string","nullable":true},"cards":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string"},"definition":{"type":"string"},"hint":{"type":"string","nullable":true}},"required":["term","definition","hint"]}}},"required":["kind","id","type","status","title","cards"]},{"type":"object","properties":{"kind":{"type":"string","enum":["QUIZ"]},"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"questions":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"correctAnswerIndex":{"type":"number","nullable":true},"explanation":{"type":"string","nullable":true}},"required":["prompt","options","correctAnswerIndex","explanation"]}}},"required":["kind","id","type","status","title","description","questions"]},{"type":"object","properties":{"kind":{"type":"string","enum":["OTHER"]},"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"contentNote":{"type":"string","nullable":true}},"required":["kind","id","type","status","title","description","contentNote"]}]}},"editUrl":{"type":"string","nullable":true}},"required":["topicId","unitId","courseId","courseTitle","unitTitle","title","description","instructions","orderIndex","learningGoals","activities","editUrl"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/courses/activity":{"post":{"operationId":"courses_activity","summary":"Activity detail (cards/questions/body by type).","description":"Activity detail (cards/questions/body by type).","tags":["courses"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string"}},"required":["activityId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["FLASHCARDS"]},"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"topicId":{"type":"string"},"courseId":{"type":"string"},"title":{"type":"string","nullable":true},"cards":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string"},"definition":{"type":"string"},"hint":{"type":"string","nullable":true}},"required":["term","definition","hint"]}},"editUrl":{"type":"string","nullable":true}},"required":["kind","id","type","status","topicId","courseId","title","cards","editUrl"]},{"type":"object","properties":{"kind":{"type":"string","enum":["QUIZ"]},"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"topicId":{"type":"string"},"courseId":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"questions":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"correctAnswerIndex":{"type":"number","nullable":true},"explanation":{"type":"string","nullable":true}},"required":["prompt","options","correctAnswerIndex","explanation"]}},"editUrl":{"type":"string","nullable":true}},"required":["kind","id","type","status","topicId","courseId","title","description","questions","editUrl"]},{"type":"object","properties":{"kind":{"type":"string","enum":["READ"]},"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"topicId":{"type":"string"},"courseId":{"type":"string"},"title":{"type":"string","nullable":true},"contentKey":{"type":"string","nullable":true},"body":{"type":"string","nullable":true},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":"string"}},"required":["url","alt"]}},"url":{"type":"string"},"bodyTruncated":{"type":"boolean","enum":[false,true]},"bodyError":{"type":"string","nullable":true},"editUrl":{"type":"string","nullable":true}},"required":["kind","id","type","status","topicId","courseId","title","contentKey","body","images","url","bodyTruncated","bodyError","editUrl"]},{"type":"object","properties":{"kind":{"type":"string","enum":["OTHER"]},"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"topicId":{"type":"string"},"courseId":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"meta":{"type":"object","additionalProperties":{"description":"Arbitrary JSON value."},"nullable":true},"contentNote":{"type":"string"},"editUrl":{"type":"string","nullable":true}},"required":["kind","id","type","status","topicId","courseId","title","description","meta","contentNote","editUrl"]}]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/courses/project":{"post":{"operationId":"courses_project","summary":"Project detail (type, config, learning goals).","description":"Project detail (type, config, learning goals).","tags":["courses"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"}},"required":["projectId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"projectId":{"type":"string"},"unitId":{"type":"string"},"courseId":{"type":"string"},"courseTitle":{"type":"string"},"unitTitle":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"goal":{"type":"string","nullable":true},"type":{"type":"string"},"orderIndex":{"type":"number"},"config":{"type":"string","nullable":true},"configTruncated":{"type":"boolean","enum":[false,true]},"learningGoals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["id","title","description"]}},"editUrl":{"type":"string","nullable":true}},"required":["projectId","unitId","courseId","courseTitle","unitTitle","title","description","goal","type","orderIndex","config","configTruncated","learningGoals","editUrl"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/courses/unit-test":{"post":{"operationId":"courses_unit-test","summary":"Unit test detail (questions).","description":"Unit test detail (questions).","tags":["courses"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"testId":{"type":"string"}},"required":["testId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"testId":{"type":"string"},"unitId":{"type":"string"},"courseId":{"type":"string"},"courseTitle":{"type":"string"},"unitTitle":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"questions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"question":{"type":"string"},"explanation":{"type":"string","nullable":true},"options":{"type":"array","items":{"type":"string"},"nullable":true},"correctOptionIndex":{"type":"number","nullable":true},"correctAnswer":{"type":"boolean","enum":[false,true],"nullable":true},"sampleAnswer":{"type":"string","nullable":true}},"required":["type","question","explanation","options","correctOptionIndex","correctAnswer","sampleAnswer"]}},"editUrl":{"type":"string","nullable":true}},"required":["testId","unitId","courseId","courseTitle","unitTitle","title","description","questions","editUrl"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/members/list":{"post":{"operationId":"members_list","summary":"List workspace members and their roles.","description":"List workspace members and their roles.","tags":["members"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true}},"required":["id","email","name","avatarUrl"]},"primaryRole":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"],"nullable":true},"extraRoles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"]}},"joinedAt":{"type":"string"},"groups":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"]}}},"required":["user","primaryRole","extraRoles","joinedAt","groups","tags"]}}},"required":["members"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/members/remove":{"post":{"operationId":"members_remove","summary":"Remove a member from the workspace.","description":"Remove a member from the workspace.","tags":["members"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"removed":{"type":"boolean","enum":[true]}},"required":["removed"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/members/set-role":{"post":{"operationId":"members_set-role","summary":"Set a member's workspace role.","description":"Set a member's workspace role.","tags":["members"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER"]}},"required":["userId","systemKey"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"userId":{"type":"string"},"primaryRole":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"],"nullable":true}},"required":["userId","primaryRole"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/members/set-tags":{"post":{"operationId":"members_set-tags","summary":"Replace a member's organizational tags (labels). Creates missing tags; [] clears.","description":"Replace a member's organizational tags (labels). Creates missing tags; [] clears.","tags":["members"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"tags":{"type":"array","items":{"type":"string"},"maxItems":20}},"required":["userId","tags"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"userId":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"]}}},"required":["userId","tags"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/invites/list":{"post":{"operationId":"invites_list","summary":"List invites, optionally filtered by status.","description":"List invites, optionally filtered by status.","tags":["invites"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","ACCEPTED","EXPIRED","REVOKED"]}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"type":{"type":"string","enum":["EMAIL","CODE"]},"target":{"type":"string","enum":["WORKSPACE","GROUP"]},"workspaceRole":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"],"nullable":true},"groupRole":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"],"nullable":true},"groupId":{"type":"string","nullable":true},"status":{"type":"string","enum":["PENDING","EXPIRED","ACCEPTED","REVOKED"]},"invitedBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true}},"required":["id","email","firstName","lastName","code","type","target","workspaceRole","groupRole","groupId","status","invitedBy","createdAt","expiresAt"]}}},"required":["invites"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/invites/create":{"post":{"operationId":"invites_create","summary":"Invite a person to the workspace (or a group).","description":"Invite a person to the workspace (or a group).","tags":["invites"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"},"role":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER"],"default":"MEMBER"},"groupId":{"type":"string"}},"required":["email"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"type":{"type":"string","enum":["EMAIL","CODE"]},"target":{"type":"string","enum":["WORKSPACE","GROUP"]},"expiresAt":{"type":"string","nullable":true},"emailSent":{"type":"boolean","enum":[false,true],"nullable":true}},"required":["id","code","email","type","target","expiresAt","emailSent"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/invites/revoke":{"post":{"operationId":"invites_revoke","summary":"Revoke a pending invite.","description":"Revoke a pending invite.","tags":["invites"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inviteId":{"type":"string"}},"required":["inviteId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"revoked":{"type":"boolean","enum":[true]}},"required":["revoked"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/invites/resend":{"post":{"operationId":"invites_resend","summary":"Resend a pending invite email.","description":"Resend a pending invite email.","tags":["invites"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inviteId":{"type":"string"}},"required":["inviteId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"type":{"type":"string","enum":["EMAIL","CODE"]},"target":{"type":"string","enum":["WORKSPACE","GROUP"]},"expiresAt":{"type":"string","nullable":true},"emailSent":{"type":"boolean","enum":[false,true],"nullable":true}},"required":["id","code","email","type","target","expiresAt","emailSent"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/groups/list":{"post":{"operationId":"groups_list","summary":"List groups (optionally a subtree).","description":"List groups (optionally a subtree).","tags":["groups"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parentId":{"type":"string","nullable":true},"includeDescendants":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"parentId":{"type":"string","nullable":true},"depth":{"type":"number"},"memberCount":{"type":"number"},"childCount":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"leadInstructor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"nullable":true},"isArchived":{"type":"boolean","enum":[false,true]}},"required":["id","name","description","parentId","depth","memberCount","childCount","tags","leadInstructor","isArchived"]}}},"required":["groups"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/groups/members-list":{"post":{"operationId":"groups_members-list","summary":"List members of a group.","description":"List members of a group.","tags":["groups"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string"}},"required":["groupId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true}},"required":["id","name","email","avatarUrl"]},"primaryRole":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"],"nullable":true},"extraRoles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"]}},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]},"joinedAt":{"type":"string","nullable":true},"enrolledAt":{"type":"string"}},"required":["user","primaryRole","extraRoles","status","joinedAt","enrolledAt"]}}},"required":["members"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/groups/create":{"post":{"operationId":"groups_create","summary":"Create a group.","description":"Create a group.","tags":["groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"parentId":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"ancestorIds":{"type":"array","items":{"type":"string"}},"joinCode":{"type":"string","nullable":true},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"parentId":{"type":"string","nullable":true},"depth":{"type":"number"},"memberCount":{"type":"number"},"childCount":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"leadInstructor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"nullable":true},"isArchived":{"type":"boolean","enum":[false,true]}},"required":["ancestorIds","joinCode","id","name","description","parentId","depth","memberCount","childCount","tags","leadInstructor","isArchived"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/groups/update":{"post":{"operationId":"groups_update","summary":"Update a group's name, description, or lead instructor.","description":"Update a group's name, description, or lead instructor.","tags":["groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"leadInstructorId":{"type":"string"}},"required":["groupId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"group":{"type":"object","properties":{"ancestorIds":{"type":"array","items":{"type":"string"}},"joinCode":{"type":"string","nullable":true},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"parentId":{"type":"string","nullable":true},"depth":{"type":"number"},"memberCount":{"type":"number"},"childCount":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"leadInstructor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"nullable":true},"isArchived":{"type":"boolean","enum":[false,true]}},"required":["ancestorIds","joinCode","id","name","description","parentId","depth","memberCount","childCount","tags","leadInstructor","isArchived"]}},"required":["group"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/groups/delete":{"post":{"operationId":"groups_delete","summary":"Delete a group (cascades children + memberships).","description":"Delete a group (cascades children + memberships).","tags":["groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string"}},"required":["groupId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/groups/member-add":{"post":{"operationId":"groups_member-add","summary":"Add a user to a group.","description":"Add a user to a group.","tags":["groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string"},"userId":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER"],"default":"MEMBER"}},"required":["groupId","userId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"membership":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true}},"required":["id","name","email","avatarUrl"]},"primaryRole":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"],"nullable":true},"extraRoles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"]}},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]},"joinedAt":{"type":"string","nullable":true},"enrolledAt":{"type":"string"}},"required":["user","primaryRole","extraRoles","status","joinedAt","enrolledAt"]}},"required":["membership"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/groups/member-remove":{"post":{"operationId":"groups_member-remove","summary":"Remove a user from a group.","description":"Remove a user from a group.","tags":["groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string"},"userId":{"type":"string"}},"required":["groupId","userId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"removed":{"type":"boolean","enum":[true]}},"required":["removed"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/groups/member-set-status":{"post":{"operationId":"groups_member-set-status","summary":"Set a group member's status (ACTIVE/INACTIVE).","description":"Set a group member's status (ACTIVE/INACTIVE).","tags":["groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"type":"string"},"userId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]}},"required":["groupId","userId","status"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"membership":{"type":"object","properties":{"status":{"type":"string","enum":["ACTIVE","INACTIVE"]}},"required":["status"]}},"required":["membership"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/assignments/list":{"post":{"operationId":"assignments_list","summary":"List course assignments in the workspace.","description":"List course assignments in the workspace.","tags":["assignments"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["WORKSPACE","GROUP","CUSTOM"]},"groupId":{"type":"string"}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["WORKSPACE","GROUP","CUSTOM"]},"name":{"type":"string","nullable":true},"course":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"thumbnailUrl":{"type":"string","nullable":true}},"required":["id","title"]},"groupId":{"type":"string","nullable":true},"groupName":{"type":"string","nullable":true},"assignedById":{"type":"string"},"assignedAt":{"type":"string"},"dueDate":{"type":"string","nullable":true},"totalAssignees":{"type":"number"},"completedCount":{"type":"number"},"completionPercent":{"type":"number"}},"required":["id","type","name","course","groupId","groupName","assignedById","assignedAt","dueDate","totalAssignees","completedCount","completionPercent"]}}},"required":["assignments"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/assignments/get":{"post":{"operationId":"assignments_get","summary":"Get one assignment with completion stats.","description":"Get one assignment with completion stats.","tags":["assignments"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assignmentId":{"type":"string"}},"required":["assignmentId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"assignment":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["WORKSPACE","GROUP","CUSTOM"]},"name":{"type":"string","nullable":true},"courseId":{"type":"string"},"courseTitle":{"type":"string"},"courseDescription":{"type":"string","nullable":true},"groupId":{"type":"string","nullable":true},"groupName":{"type":"string","nullable":true},"assignedById":{"type":"string"},"assignedByName":{"type":"string"},"assignedAt":{"type":"string"},"dueDate":{"type":"string","nullable":true},"totalAssignees":{"type":"number"},"completedCount":{"type":"number"},"completionPercent":{"type":"number"},"completionCriteria":{"type":"object","properties":{"activitiesPerTopic":{"anyOf":[{"type":"number"},{"type":"string","enum":["ALL"]}]},"testRequired":{"type":"boolean","enum":[false,true]},"testMinScore":{"type":"number","nullable":true},"projectsRequired":{"type":"boolean","enum":[false,true]},"quizMinScore":{"type":"number","nullable":true},"refreshersRequired":{"type":"boolean","enum":[false,true]}},"required":["activitiesPerTopic","testRequired","testMinScore","projectsRequired","quizMinScore"],"nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["INCLUDE","EXCLUDE"]},"targetType":{"type":"string","enum":["GROUP","USER","INVITE"]},"groupId":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true}},"required":["kind","targetType","groupId","userId"]}},"assignedUsers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"complete":{"type":"boolean","enum":[false,true]},"progressPercent":{"type":"number"},"completedAt":{"type":"string","nullable":true}},"required":["userId","name","email","avatarUrl","complete","progressPercent","completedAt"]}}},"required":["id","type","name","courseId","courseTitle","courseDescription","groupId","groupName","assignedById","assignedByName","assignedAt","dueDate","totalAssignees","completedCount","completionPercent","completionCriteria","rules","assignedUsers"]}},"required":["assignment"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/assignments/for-user":{"post":{"operationId":"assignments_for-user","summary":"List one user's assignments and completion state.","description":"List one user's assignments and completion state.","tags":["assignments"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true}},"required":["id","name","email","avatarUrl"]},"assignments":{"type":"array","items":{"type":"object","properties":{"assignmentId":{"type":"string"},"name":{"type":"string","nullable":true},"courseId":{"type":"string"},"courseTitle":{"type":"string"},"type":{"type":"string","enum":["WORKSPACE","GROUP","CUSTOM"]},"scopeLabel":{"type":"string"},"groupName":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"complete":{"type":"boolean","enum":[false,true]},"progressPercent":{"type":"number"},"completedAt":{"type":"string","nullable":true},"overdue":{"type":"boolean","enum":[false,true]}},"required":["assignmentId","name","courseId","courseTitle","type","scopeLabel","groupName","dueDate","complete","progressPercent","completedAt","overdue"]}}},"required":["user","assignments"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/assignments/create":{"post":{"operationId":"assignments_create","summary":"Assign one or more courses to a scope.","description":"Assign one or more courses to a scope.","tags":["assignments"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseIds":{"type":"array","items":{"type":"string"},"minItems":1},"scopeType":{"type":"string","enum":["WORKSPACE","GROUP","CUSTOM"]},"groupId":{"type":"string"},"name":{"type":"string"},"dueDate":{"type":"string"},"message":{"type":"string"},"includedGroupIds":{"type":"array","items":{"type":"string"}},"includedUserIds":{"type":"array","items":{"type":"string"}},"excludedGroupIds":{"type":"array","items":{"type":"string"}},"excludedUserIds":{"type":"array","items":{"type":"string"}}},"required":["courseIds","scopeType"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"courseId":{"type":"string"},"type":{"type":"string","enum":["WORKSPACE","GROUP","CUSTOM"]},"name":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true},"assignedCount":{"type":"number"},"alreadyAssigned":{"type":"boolean","enum":[false,true]}},"required":["id","courseId","type","name","dueDate","assignedCount"]}}},"required":["assignments"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/assignments/remove":{"post":{"operationId":"assignments_remove","summary":"Remove an assignment.","description":"Remove an assignment.","tags":["assignments"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assignmentId":{"type":"string"}},"required":["assignmentId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"removed":{"type":"boolean","enum":[true]}},"required":["removed"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/workspace/get":{"post":{"operationId":"workspace_get","summary":"Get workspace metadata (name, member + group counts).","description":"Get workspace metadata (name, member + group counts).","tags":["workspace"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","nullable":true},"isPersonal":{"type":"boolean","enum":[false,true]},"isEnterprise":{"type":"boolean","enum":[false,true]},"ownerId":{"type":"string","nullable":true},"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"systemKey":{"type":"string","enum":["ADMIN","INSTRUCTOR","MEMBER","EXTERNAL"],"nullable":true},"color":{"type":"string","nullable":true},"scopeGroupId":{"type":"string","nullable":true},"scopeGroupName":{"type":"string"}},"required":["id","name","systemKey","color","scopeGroupId"],"nullable":true},"memberCount":{"type":"number"},"groupCount":{"type":"number"}},"required":["id","name","slug","isPersonal","isEnterprise","ownerId","role","memberCount","groupCount"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/workspace/update":{"post":{"operationId":"workspace_update","summary":"Update workspace name and/or slug.","description":"Update workspace name and/or slug.","tags":["workspace"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","nullable":true},"isPersonal":{"type":"boolean","enum":[false,true]},"profilePictureKey":{"type":"string","nullable":true},"whitelabelEnabled":{"type":"boolean","enum":[false,true]},"coursePublishingReviewsEnabled":{"type":"boolean","enum":[false,true]},"whitelabelName":{"type":"string","nullable":true},"whitelabelLogoKey":{"type":"string","nullable":true},"whitelabelFaviconKey":{"type":"string","nullable":true},"whitelabelLoginImageKey":{"type":"string","nullable":true},"whitelabelLoginMessage":{"type":"string","nullable":true},"defaultTimezone":{"type":"string","nullable":true},"locale":{"type":"string","nullable":true},"terminology":{"type":"object","properties":{"admin":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]},"student":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]},"group":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]},"workspace":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]},"subgroup":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]},"member":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]},"instructor":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]},"organization":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]},"curriculum":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]},"tag":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"},"Singular":{"type":"string"},"Plural":{"type":"string"}},"required":["singular","plural","Singular","Plural"]}},"required":["admin","student","group","workspace","subgroup","member","instructor","organization","curriculum","tag"]}},"required":["id","name","slug","isPersonal","profilePictureKey","whitelabelEnabled","coursePublishingReviewsEnabled","whitelabelName","whitelabelLogoKey","whitelabelFaviconKey","whitelabelLoginImageKey","whitelabelLoginMessage","defaultTimezone","locale","terminology"]}},"required":["workspace"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/radar/monitors-list":{"post":{"operationId":"radar_monitors-list","summary":"List Radar monitors.","description":"List Radar monitors.","tags":["radar"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"monitors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"query":{"type":"string"},"frequency":{"type":"string"},"status":{"type":"string"},"lastError":{"type":"string","nullable":true},"lastRunAt":{"type":"string","nullable":true},"alerts30d":{"type":"number"},"attachedCourses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"thumbnailUrl":{"type":"string","nullable":true}},"required":["id","title"]}},"createdAt":{"type":"string"}},"required":["id","name","description","tags","query","frequency","status","lastError","lastRunAt","alerts30d","attachedCourses","createdAt"]}}},"required":["monitors"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/radar/alerts-list":{"post":{"operationId":"radar_alerts-list","summary":"List Radar alerts by status.","description":"List Radar alerts by status.","tags":["radar"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["new","dismissed","actioned","partially_actioned","all"]},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"monitorId":{"type":"string"},"monitorName":{"type":"string"},"monitorTags":{"type":"array","items":{"type":"string"}},"monitorAttachedCourseIds":{"type":"array","items":{"type":"string"}},"tailoredTitle":{"type":"string"},"tailoredSummary":{"type":"string"},"recommendations":{"description":"Arbitrary JSON value."},"status":{"type":"string"},"detectedAt":{"type":"string"},"actionedActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"mode":{"type":"string","enum":["create","append"]},"courseId":{"type":"string","nullable":true},"courseTitle":{"type":"string","nullable":true},"status":{"type":"string"}},"required":["id","mode","courseId","courseTitle","status"]}}},"required":["id","monitorId","monitorName","monitorTags","monitorAttachedCourseIds","tailoredTitle","tailoredSummary","recommendations","status","detectedAt","actionedActions"]}}},"required":["alerts"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/radar/monitor-create":{"post":{"operationId":"radar_monitor-create","summary":"Create a Radar monitor.","description":"Create a Radar monitor.","tags":["radar"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"query":{"type":"string"},"frequency":{"type":"string","enum":["1h","1d","1w"],"default":"1d"},"tags":{"type":"array","items":{"type":"string"}},"attachedCourseIds":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["name","query"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"monitor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"query":{"type":"string"},"frequency":{"type":"string"},"status":{"type":"string"},"lastError":{"type":"string","nullable":true},"lastRunAt":{"type":"string","nullable":true},"alerts30d":{"type":"number"},"attachedCourses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"thumbnailUrl":{"type":"string","nullable":true}},"required":["id","title"]}},"createdAt":{"type":"string"}},"required":["id","name","description","tags","query","frequency","status","lastError","lastRunAt","alerts30d","attachedCourses","createdAt"]}},"required":["monitor"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/radar/monitor-trigger":{"post":{"operationId":"radar_monitor-trigger","summary":"Schedule an immediate monitor run.","description":"Schedule an immediate monitor run.","tags":["radar"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monitorId":{"type":"string"}},"required":["monitorId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/radar/monitor-cancel":{"post":{"operationId":"radar_monitor-cancel","summary":"Cancel a monitor.","description":"Cancel a monitor.","tags":["radar"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monitorId":{"type":"string"}},"required":["monitorId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"monitor":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}},"required":["monitor"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/radar/alert-dismiss":{"post":{"operationId":"radar_alert-dismiss","summary":"Dismiss a Radar alert.","description":"Dismiss a Radar alert.","tags":["radar"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"alertId":{"type":"string"}},"required":["alertId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/sections-list":{"post":{"operationId":"explore_sections-list","summary":"List Explore sections + the master toggle state.","description":"List Explore sections + the master toggle state.","tags":["explore"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"exploreEnabled":{"type":"boolean","enum":[false,true]},"exploreOnHome":{"type":"boolean","enum":[false,true]},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string","nullable":true},"tag":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"layout":{"type":"string"},"position":{"type":"number"},"isActive":{"type":"boolean","enum":[false,true]},"courseIds":{"type":"array","items":{"type":"string"}},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"coverImage":{"type":"string"},"isPublished":{"type":"boolean","enum":[false,true]}},"required":["id","title","isPublished"]}},"source":{"type":"string","enum":["MANUAL","CURRICULUM","CATALOG"]},"catalogId":{"type":"string","nullable":true},"curriculumId":{"type":"string","nullable":true},"curriculumTitle":{"type":"string","nullable":true},"visibleToGroupIds":{"type":"array","items":{"type":"string"}},"hiddenFromGroupIds":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string"}},"required":["id","slug","title","subtitle","tag","description","color","layout","position","isActive","courseIds","courses","source","catalogId","curriculumId","curriculumTitle","visibleToGroupIds","hiddenFromGroupIds","updatedAt"]}},"totalCount":{"type":"number"}},"required":["exploreEnabled","exploreOnHome","sections","totalCount"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/candidate-courses":{"post":{"operationId":"explore_candidate-courses","summary":"List courses eligible to feature on Explore.","description":"List courses eligible to feature on Explore.","tags":["explore"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"coverImage":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}}},"required":["id","title","description","categories"]}},"totalCount":{"type":"number"}},"required":["courses","totalCount"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/candidate-catalogs":{"post":{"operationId":"explore_candidate-catalogs","summary":"List catalogs eligible as live Explore sources.","description":"List catalogs eligible as live Explore sources.","tags":["explore"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean","enum":[false,true]},"visibility":{"type":"string","enum":["WORKSPACE","PUBLIC"]}},"required":["id","name","enabled","visibility"]}}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/toggle":{"post":{"operationId":"explore_toggle","summary":"Show or hide the Explore page for learners.","description":"Show or hide the Explore page for learners.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"exploreEnabled":{"type":"boolean"}},"required":["exploreEnabled"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"exploreEnabled":{"type":"boolean","enum":[false,true]}},"required":["exploreEnabled"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/toggle-home":{"post":{"operationId":"explore_toggle-home","summary":"Also show the Explore rows on the learner home page.","description":"Also show the Explore rows on the learner home page.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"exploreOnHome":{"type":"boolean"}},"required":["exploreOnHome"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"exploreOnHome":{"type":"boolean","enum":[false,true]}},"required":["exploreOnHome"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/set-courses":{"post":{"operationId":"explore_set-courses","summary":"Replace a section's course list, in order.","description":"Replace a section's course list, in order.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string"},"courseIds":{"type":"array","items":{"type":"string"}}},"required":["sectionId","courseIds"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"courseIds":{"type":"array","items":{"type":"string"}}},"required":["courseIds"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/set-audience":{"post":{"operationId":"explore_set-audience","summary":"Limit a section to groups, or hide it from groups.","description":"Limit a section to groups, or hide it from groups.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string"},"visibleToGroupIds":{"type":"array","items":{"type":"string"}},"hiddenFromGroupIds":{"type":"array","items":{"type":"string"}}},"required":["sectionId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"visibleToGroupIds":{"type":"array","items":{"type":"string"}},"hiddenFromGroupIds":{"type":"array","items":{"type":"string"}}},"required":["id","title","visibleToGroupIds","hiddenFromGroupIds"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/create-section":{"post":{"operationId":"explore_create-section","summary":"Create an Explore section.","description":"Create an Explore section.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"tag":{"type":"string"},"description":{"type":"string"},"color":{"type":"string","nullable":true,"maxLength":100},"layout":{"type":"string","enum":["heading","row","featured","trending","path","path-vertical"]},"position":{"type":"integer","minimum":0},"isActive":{"type":"boolean"},"curriculumId":{"type":"string","nullable":true},"catalogId":{"type":"string","nullable":true},"source":{"type":"string","enum":["MANUAL","CURRICULUM","CATALOG"]},"courseIds":{"type":"array","items":{"type":"string"}},"visibleToGroupIds":{"type":"array","items":{"type":"string"}},"hiddenFromGroupIds":{"type":"array","items":{"type":"string"}}},"required":["slug","title"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string","nullable":true},"tag":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"layout":{"type":"string"},"position":{"type":"number"},"isActive":{"type":"boolean","enum":[false,true]},"courseIds":{"type":"array","items":{"type":"string"}},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"coverImage":{"type":"string"},"isPublished":{"type":"boolean","enum":[false,true]}},"required":["id","title","isPublished"]}},"source":{"type":"string","enum":["MANUAL","CURRICULUM","CATALOG"]},"catalogId":{"type":"string","nullable":true},"curriculumId":{"type":"string","nullable":true},"curriculumTitle":{"type":"string","nullable":true},"visibleToGroupIds":{"type":"array","items":{"type":"string"}},"hiddenFromGroupIds":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string"}},"required":["id","slug","title","subtitle","tag","description","color","layout","position","isActive","courseIds","courses","source","catalogId","curriculumId","curriculumTitle","visibleToGroupIds","hiddenFromGroupIds","updatedAt"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/update-section":{"post":{"operationId":"explore_update-section","summary":"Update an Explore section.","description":"Update an Explore section.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"tag":{"type":"string"},"description":{"type":"string"},"color":{"type":"string","nullable":true,"maxLength":100},"layout":{"type":"string","enum":["heading","row","featured","trending","path","path-vertical"]},"position":{"type":"integer","minimum":0},"isActive":{"type":"boolean"},"curriculumId":{"type":"string","nullable":true},"catalogId":{"type":"string","nullable":true},"source":{"type":"string","enum":["MANUAL","CURRICULUM","CATALOG"]},"courseIds":{"type":"array","items":{"type":"string"}},"visibleToGroupIds":{"type":"array","items":{"type":"string"}},"hiddenFromGroupIds":{"type":"array","items":{"type":"string"}}},"required":["sectionId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string","nullable":true},"tag":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"layout":{"type":"string"},"position":{"type":"number"},"isActive":{"type":"boolean","enum":[false,true]},"courseIds":{"type":"array","items":{"type":"string"}},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"coverImage":{"type":"string"},"isPublished":{"type":"boolean","enum":[false,true]}},"required":["id","title","isPublished"]}},"source":{"type":"string","enum":["MANUAL","CURRICULUM","CATALOG"]},"catalogId":{"type":"string","nullable":true},"curriculumId":{"type":"string","nullable":true},"curriculumTitle":{"type":"string","nullable":true},"visibleToGroupIds":{"type":"array","items":{"type":"string"}},"hiddenFromGroupIds":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string"}},"required":["id","slug","title","subtitle","tag","description","color","layout","position","isActive","courseIds","courses","source","catalogId","curriculumId","curriculumTitle","visibleToGroupIds","hiddenFromGroupIds","updatedAt"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/delete-section":{"post":{"operationId":"explore_delete-section","summary":"Delete an Explore section.","description":"Delete an Explore section.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string"}},"required":["sectionId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[false,true]}},"required":["deleted"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/reorder":{"post":{"operationId":"explore_reorder","summary":"Reorder Explore sections top-to-bottom.","description":"Reorder Explore sections top-to-bottom.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderedIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["orderedIds"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"reordered":{"type":"number"}},"required":["reordered"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/add-course":{"post":{"operationId":"explore_add-course","summary":"Add a course to an Explore section.","description":"Add a course to an Explore section.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string"},"courseId":{"type":"string"}},"required":["sectionId","courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"added":{"type":"boolean","enum":[false,true]},"courseIds":{"type":"array","items":{"type":"string"}}},"required":["added","courseIds"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/explore/remove-course":{"post":{"operationId":"explore_remove-course","summary":"Remove a course from an Explore section.","description":"Remove a course from an Explore section.","tags":["explore"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sectionId":{"type":"string"},"courseId":{"type":"string"}},"required":["sectionId","courseId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"removed":{"type":"boolean","enum":[false,true]},"courseIds":{"type":"array","items":{"type":"string"}}},"required":["removed","courseIds"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/tree":{"post":{"operationId":"kb_tree","summary":"List KB folders and documents.","description":"List KB folders and documents.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parentId":{"type":"string","nullable":true},"includeDescendants":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FOLDER","DOCUMENT"]},"parentId":{"type":"string","nullable":true},"depth":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"latestVersionId":{"type":"string","nullable":true},"isDeleted":{"type":"boolean","enum":[false,true]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"updatedAt":{"type":"string"},"syncProvider":{"type":"string","enum":["GOOGLE_DRIVE","GRANOLA","WEB","YOUTUBE","NOTION","CONFLUENCE","SALESFORCE","DOCUMENT360","ONEDRIVE","SHAREPOINT","GITHUB"],"nullable":true},"syncStatus":{"type":"string","enum":["SYNCING","SYNCED","ERROR"],"nullable":true},"syncExternalUrl":{"type":"string","nullable":true},"syncedAt":{"type":"string","nullable":true},"syncErrorMessage":{"type":"string","nullable":true},"syncContentMode":{"type":"string","nullable":true},"source":{"type":"string","enum":["course"],"nullable":true},"sourcePath":{"type":"string","nullable":true},"readOnly":{"type":"boolean","enum":[false,true]}},"required":["id","title","type","parentId","depth","tags","latestVersionId","isDeleted","role","url","href","dashboardUrl","updatedAt","syncProvider","syncStatus","syncExternalUrl","syncedAt","syncErrorMessage","syncContentMode","source","sourcePath","readOnly"]}}},"required":["items"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/search":{"post":{"operationId":"kb_search","summary":"Keyword + vector search over the KB.","description":"Keyword + vector search over the KB.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["query"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"excerpt":{"type":"string","nullable":true},"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FOLDER","DOCUMENT"]},"parentId":{"type":"string","nullable":true},"depth":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"latestVersionId":{"type":"string","nullable":true},"isDeleted":{"type":"boolean","enum":[false,true]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"updatedAt":{"type":"string"},"syncProvider":{"type":"string","enum":["GOOGLE_DRIVE","GRANOLA","WEB","YOUTUBE","NOTION","CONFLUENCE","SALESFORCE","DOCUMENT360","ONEDRIVE","SHAREPOINT","GITHUB"],"nullable":true},"syncStatus":{"type":"string","enum":["SYNCING","SYNCED","ERROR"],"nullable":true},"syncExternalUrl":{"type":"string","nullable":true},"syncedAt":{"type":"string","nullable":true},"syncErrorMessage":{"type":"string","nullable":true},"syncContentMode":{"type":"string","nullable":true},"source":{"type":"string","enum":["course"],"nullable":true},"sourcePath":{"type":"string","nullable":true},"readOnly":{"type":"boolean","enum":[false,true]}},"required":["excerpt","id","title","type","parentId","depth","tags","latestVersionId","isDeleted","role","url","href","dashboardUrl","updatedAt","syncProvider","syncStatus","syncExternalUrl","syncedAt","syncErrorMessage","syncContentMode","source","sourcePath","readOnly"]}},"degraded":{"type":"boolean","enum":[false,true]},"failedPasses":{"type":"array","items":{"type":"string","enum":["snapshot","items","vectors"]}}},"required":["results","degraded","failedPasses"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/read":{"post":{"operationId":"kb_read","summary":"Read a document's canonical HTML.","description":"Read a document's canonical HTML.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"itemId":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FOLDER","DOCUMENT"]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"html":{"type":"string"},"previewHtml":{"type":"string"},"plainText":{"type":"string"},"versionId":{"type":"string"}},"required":["id","itemId","title","type","role","url","href","dashboardUrl","html","previewHtml","plainText","versionId"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/walkthrough-import-start":{"post":{"operationId":"kb_walkthrough-import-start","summary":"Create a walkthrough import and return a presigned video PUT URL.","description":"Create a walkthrough import and return a presigned video PUT URL.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["video/mp4","video/webm","video/quicktime"]},"sizeBytes":{"type":"integer","minimum":0,"exclusiveMinimum":true},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"parentId":{"type":"string","nullable":true},"title":{"type":"string","minLength":1,"maxLength":200}},"required":["filename","mimeType","sizeBytes","sha256"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"jobId":{"type":"string"},"itemId":{"type":"string"},"gcsKey":{"type":"string"},"existed":{"type":"boolean","enum":[false,true]},"uploadUrl":{"type":"string"},"uploadExpiresAt":{"type":"string"}},"required":["jobId","itemId","gcsKey","existed"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/import-dispatch":{"post":{"operationId":"kb_import-dispatch","summary":"Dispatch a completed presigned upload for processing.","description":"Start an asynchronous import job. The result contains jobId, itemId, and status. Poll kb/import-status with jobId until status is READY or FAILED. Poll every 5 seconds with backoff; visual walkthrough processing has a separate walkthroughStatus. This legacy command returns HTTP 200 even when processing continues.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"}},"required":["jobId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"jobId":{"type":"string"},"itemId":{"type":"string"},"status":{"type":"string","enum":["PROCESSING","READY","FAILED"]}},"required":["jobId","itemId","status"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/import-status":{"post":{"operationId":"kb_import-status","summary":"Poll transcript and visual-analysis status for an import.","description":"Poll an existing asynchronous import job. READY and FAILED are terminal for the transcript. walkthroughStatus independently reports optional visual analysis. Only authorized workspace items are returned.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"}},"required":["jobId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"jobId":{"type":"string"},"itemId":{"type":"string"},"status":{"type":"string","enum":["PROCESSING","READY","FAILED"]},"errorMessage":{"type":"string","nullable":true},"filename":{"type":"string"},"walkthroughStatus":{"type":"string","enum":["NOT_APPLICABLE","QUEUED","PROCESSING","READY","FAILED"]},"walkthroughErrorMessage":{"type":"string","nullable":true}},"required":["jobId","itemId","status","errorMessage","filename","walkthroughStatus","walkthroughErrorMessage"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/walkthrough-read":{"post":{"operationId":"kb_walkthrough-read","summary":"Read structured walkthrough steps and short-lived media URLs.","description":"Read structured walkthrough steps and short-lived media URLs.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"}},"required":["jobId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"jobId":{"type":"string"},"itemId":{"type":"string"},"filename":{"type":"string"},"importStatus":{"type":"string","enum":["FAILED","PROCESSING","READY"]},"importError":{"type":"string","nullable":true},"state":{"type":"string","enum":["FAILED","PROCESSING","READY"]},"generationError":{"type":"string","nullable":true},"sourceVideoUrl":{"type":"string","nullable":true},"walkthrough":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"aspectRatio":{"type":"number"},"frameWidth":{"type":"number"},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"number"},"type":{"type":"string","enum":["type","select","click","scroll","drag","hover","navigate","modal_open","modal_close"]},"t":{"type":"number","nullable":true},"tStart":{"type":"number","nullable":true},"tEnd":{"type":"number","nullable":true},"frameKey":{"type":"string"},"box_2d":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4},"point":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"zoom_box":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4},"target_label":{"type":"string"},"what_changed":{"type":"string"},"caption":{"type":"string"},"chapter":{"type":"string"},"endFrameKey":{"type":"string","nullable":true}},"required":["step","type","t","tStart","tEnd","frameKey","box_2d","point","zoom_box","target_label","what_changed","caption","chapter"]}},"sourceVideoKey":{"type":"string","nullable":true},"sourceMaterialId":{"type":"string","nullable":true},"generationStep":{"type":"string","nullable":true},"generationError":{"type":"string","nullable":true}},"required":["title","description","aspectRatio","frameWidth","steps"],"nullable":true},"frames":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"step":{"type":"number"},"frameUrl":{"type":"string"},"endFrameUrl":{"type":"string","nullable":true}},"required":["index","step","frameUrl","endFrameUrl"]}}},"required":["jobId","itemId","filename","importStatus","importError","state","generationError","sourceVideoUrl","walkthrough","frames"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/versions":{"post":{"operationId":"kb_versions","summary":"List document revision history.","description":"List document revision history.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100},"offset":{"type":"integer","minimum":0}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"itemId":{"type":"string"},"currentVersionId":{"type":"string","nullable":true},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"bytes":{"type":"number"},"htmlSha256":{"type":"string"},"artifactCommitSha":{"type":"string","nullable":true},"operationId":{"type":"string","nullable":true},"medium":{"type":"string"},"connectorId":{"type":"string","nullable":true},"source":{"type":"string","enum":["WEB","ASSISTANT","MCP","CLI","DEVELOPER_API"]},"reason":{"type":"string","nullable":true},"actorUser":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"nullable":true},"createdAt":{"type":"string"},"restoredFromVersionId":{"type":"string","nullable":true},"current":{"type":"boolean","enum":[false,true]}},"required":["id","bytes","htmlSha256","artifactCommitSha","operationId","medium","connectorId","source","reason","actorUser","createdAt","restoredFromVersionId","current"]}},"nextOffset":{"type":"number","nullable":true}},"required":["itemId","currentVersionId","versions","nextOffset"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/read-version":{"post":{"operationId":"kb_read-version","summary":"Read one historical document revision.","description":"Read one historical document revision.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"versionId":{"type":"string"}},"required":["itemId","versionId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"itemId":{"type":"string"},"versionId":{"type":"string"},"html":{"type":"string"},"previewHtml":{"type":"string"},"plainText":{"type":"string"},"htmlSha256":{"type":"string"},"artifactCommitSha":{"type":"string","nullable":true}},"required":["itemId","versionId","html","previewHtml","plainText","htmlSha256","artifactCommitSha"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/artifact-branches":{"post":{"operationId":"kb_artifact-branches","summary":"List Git branches for a migrated document.","description":"List Git branches for a migrated document.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"workspaceId":{"type":"string"},"repositoryGeneration":{"type":"string"},"branches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"branch":{"type":"string"},"type":{"type":"string","enum":["CANONICAL","DRAFT","AGENT","REVIEW","STAGING","MIGRATION"]},"status":{"type":"string","enum":["ACTIVE","READY","MERGING","CONFLICTED","MERGED","CLOSED","EXPIRED"]},"baseCommitSha":{"type":"string","nullable":true},"commitSha":{"type":"string","nullable":true},"scopeRootItemIds":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","nullable":true}},"required":["id","branch","type","status","baseCommitSha","commitSha","scopeRootItemIds","expiresAt"]}}},"required":["workspaceId","repositoryGeneration","branches"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/artifact-files":{"post":{"operationId":"kb_artifact-files","summary":"List files on an ACL-scoped Knowledge Base branch.","description":"List files on an ACL-scoped Knowledge Base branch.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"branchId":{"type":"string"}},"required":["branchId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"branchId":{"type":"string"},"files":{"type":"array","items":{}},"branch":{}},"required":["branchId","files"]},{"type":"object","properties":{"branchId":{"type":"string"},"branch":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"required":["branchId","branch","files"]}]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/artifact-read-file":{"post":{"operationId":"kb_artifact-read-file","summary":"Read one file from an ACL-scoped Knowledge Base branch.","description":"Read one file from an ACL-scoped Knowledge Base branch.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"branchId":{"type":"string"},"path":{"type":"string"}},"required":["branchId","path"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"branchId":{"type":"string"},"branch":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"bytes":{"type":"number"}},"required":["branchId","branch","path","content","bytes"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/artifact-diff":{"post":{"operationId":"kb_artifact-diff","summary":"Compare an ACL-scoped branch with its base commit.","description":"Compare an ACL-scoped branch with its base commit.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"branchId":{"type":"string"}},"required":["branchId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"branchId":{"type":"string"},"changes":{"type":"array","items":{}},"branch":{}},"required":["branchId","changes"]},{"type":"object","properties":{"branchId":{"type":"string"},"branch":{"type":"string"},"changes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"status":{"type":"string","enum":["added","modified","deleted"]},"beforeOid":{"type":"string","nullable":true},"afterOid":{"type":"string","nullable":true}},"required":["path","status","beforeOid","afterOid"]}}},"required":["branchId","branch","changes"]}]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/permissions":{"post":{"operationId":"kb_permissions","summary":"List permission grants on an item.","description":"List permission grants on an item.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"principalType":{"type":"string","enum":["WORKSPACE","GROUP","USER","API_KEY"]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true}},"required":["id","name","email","avatarUrl"],"nullable":true},"group":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"type":"string","nullable":true},"depth":{"type":"number"}},"required":["id","name","parentId","depth"],"nullable":true},"createdAt":{"type":"string"}},"required":["id","principalType","role","user","group","createdAt"]}},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"itemId":{"type":"string"}},"required":["grants","url","href","dashboardUrl","itemId"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/public-link-get":{"post":{"operationId":"kb_public-link-get","summary":"Get a document's public link status.","description":"Get a document's public link status.","tags":["kb"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"link":{"type":"object","properties":{"slug":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"enabledAt":{"type":"string","nullable":true},"enabledById":{"type":"string","nullable":true}},"required":["slug","path","url","enabledAt","enabledById"]}},"required":["link"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/write":{"post":{"operationId":"kb_write","summary":"Overwrite a document's HTML.","description":"Overwrite a document's HTML.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"html":{"type":"string"}},"required":["itemId","html"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"itemId":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FOLDER","DOCUMENT"]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"versionId":{"type":"string"},"gcsKey":{"type":"string","nullable":true},"artifactCommitSha":{"type":"string","nullable":true},"artifactPath":{"type":"string","nullable":true},"bytes":{"type":"number"},"unchanged":{"type":"boolean","enum":[false,true]}},"required":["id","itemId","title","type","role","url","href","dashboardUrl","versionId","gcsKey","artifactCommitSha","artifactPath","bytes","unchanged"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/str-replace":{"post":{"operationId":"kb_str-replace","summary":"Surgical exact-match HTML edit.","description":"Surgical exact-match HTML edit.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"oldString":{"type":"string","minLength":1},"newString":{"type":"string"},"replaceAll":{"type":"boolean"},"expectedReplacements":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["itemId","oldString","newString"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"itemId":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FOLDER","DOCUMENT"]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"versionId":{"type":"string"},"previousVersionId":{"type":"string"},"gcsKey":{"type":"string","nullable":true},"artifactCommitSha":{"type":"string","nullable":true},"artifactPath":{"type":"string","nullable":true},"bytes":{"type":"number"},"unchanged":{"type":"boolean","enum":[false,true]},"matches":{"type":"number"},"replacements":{"type":"number"}},"required":["id","itemId","title","type","role","url","href","dashboardUrl","versionId","previousVersionId","gcsKey","artifactCommitSha","artifactPath","bytes","unchanged","matches","replacements"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/create":{"post":{"operationId":"kb_create","summary":"Create a document or folder.","description":"Create a document or folder.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"itemType":{"type":"string","enum":["FOLDER","DOCUMENT"],"default":"DOCUMENT"},"html":{"type":"string"},"parentId":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}}},"required":["title"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FOLDER","DOCUMENT"]},"parentId":{"type":"string","nullable":true},"depth":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"latestVersionId":{"type":"string","nullable":true},"isDeleted":{"type":"boolean","enum":[false,true]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"updatedAt":{"type":"string"},"syncProvider":{"type":"string","enum":["GOOGLE_DRIVE","GRANOLA","WEB","YOUTUBE","NOTION","CONFLUENCE","SALESFORCE","DOCUMENT360","ONEDRIVE","SHAREPOINT","GITHUB"],"nullable":true},"syncStatus":{"type":"string","enum":["SYNCING","SYNCED","ERROR"],"nullable":true},"syncExternalUrl":{"type":"string","nullable":true},"syncedAt":{"type":"string","nullable":true},"syncErrorMessage":{"type":"string","nullable":true},"syncContentMode":{"type":"string","nullable":true},"source":{"type":"string","enum":["course"],"nullable":true},"sourcePath":{"type":"string","nullable":true},"readOnly":{"type":"boolean","enum":[false,true]}},"required":["id","title","type","parentId","depth","tags","latestVersionId","isDeleted","role","url","href","dashboardUrl","updatedAt","syncProvider","syncStatus","syncExternalUrl","syncedAt","syncErrorMessage","syncContentMode","source","sourcePath","readOnly"]}},"required":["item"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/update":{"post":{"operationId":"kb_update","summary":"Rename and/or retag an item.","description":"Rename and/or retag an item.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"title":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FOLDER","DOCUMENT"]},"parentId":{"type":"string","nullable":true},"depth":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"latestVersionId":{"type":"string","nullable":true},"isDeleted":{"type":"boolean","enum":[false,true]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"updatedAt":{"type":"string"},"syncProvider":{"type":"string","enum":["GOOGLE_DRIVE","GRANOLA","WEB","YOUTUBE","NOTION","CONFLUENCE","SALESFORCE","DOCUMENT360","ONEDRIVE","SHAREPOINT","GITHUB"],"nullable":true},"syncStatus":{"type":"string","enum":["SYNCING","SYNCED","ERROR"],"nullable":true},"syncExternalUrl":{"type":"string","nullable":true},"syncedAt":{"type":"string","nullable":true},"syncErrorMessage":{"type":"string","nullable":true},"syncContentMode":{"type":"string","nullable":true},"source":{"type":"string","enum":["course"],"nullable":true},"sourcePath":{"type":"string","nullable":true},"readOnly":{"type":"boolean","enum":[false,true]}},"required":["id","title","type","parentId","depth","tags","latestVersionId","isDeleted","role","url","href","dashboardUrl","updatedAt","syncProvider","syncStatus","syncExternalUrl","syncedAt","syncErrorMessage","syncContentMode","source","sourcePath","readOnly"]}},"required":["item"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/move":{"post":{"operationId":"kb_move","summary":"Move an item under a folder (or to root).","description":"Move an item under a folder (or to root).","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"parentId":{"type":"string","nullable":true}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FOLDER","DOCUMENT"]},"parentId":{"type":"string","nullable":true},"depth":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"latestVersionId":{"type":"string","nullable":true},"isDeleted":{"type":"boolean","enum":[false,true]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"updatedAt":{"type":"string"},"syncProvider":{"type":"string","enum":["GOOGLE_DRIVE","GRANOLA","WEB","YOUTUBE","NOTION","CONFLUENCE","SALESFORCE","DOCUMENT360","ONEDRIVE","SHAREPOINT","GITHUB"],"nullable":true},"syncStatus":{"type":"string","enum":["SYNCING","SYNCED","ERROR"],"nullable":true},"syncExternalUrl":{"type":"string","nullable":true},"syncedAt":{"type":"string","nullable":true},"syncErrorMessage":{"type":"string","nullable":true},"syncContentMode":{"type":"string","nullable":true},"source":{"type":"string","enum":["course"],"nullable":true},"sourcePath":{"type":"string","nullable":true},"readOnly":{"type":"boolean","enum":[false,true]}},"required":["id","title","type","parentId","depth","tags","latestVersionId","isDeleted","role","url","href","dashboardUrl","updatedAt","syncProvider","syncStatus","syncExternalUrl","syncedAt","syncErrorMessage","syncContentMode","source","sourcePath","readOnly"]}},"required":["item"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/delete":{"post":{"operationId":"kb_delete","summary":"Soft-delete (or permanently delete) an item.","description":"Soft-delete (or permanently delete) an item.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"permanent":{"type":"boolean"}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/restore":{"post":{"operationId":"kb_restore","summary":"Restore a soft-deleted item.","description":"Restore a soft-deleted item.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"restored":{"type":"number"}},"required":["restored"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/restore-version":{"post":{"operationId":"kb_restore-version","summary":"Restore a historical revision as a new current version.","description":"Restore a historical revision as a new current version.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"versionId":{"type":"string"}},"required":["itemId","versionId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"itemId":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["FOLDER","DOCUMENT"]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"versionId":{"type":"string"}},"required":["id","itemId","title","type","role","url","href","dashboardUrl","versionId"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/artifact-create-branch":{"post":{"operationId":"kb_artifact-create-branch","summary":"Create an isolated Git draft/agent/review branch.","description":"Create an isolated Git draft/agent/review branch.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"branch":{"type":"string"}},"required":["itemId","branch"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"itemId":{"type":"string"},"branchId":{"type":"string"},"branch":{"type":"string"},"fromCommitSha":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true}},"required":["itemId","branchId","branch","fromCommitSha","expiresAt"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/artifact-write-file":{"post":{"operationId":"kb_artifact-write-file","summary":"Commit one UTF-8 file to an ACL-scoped branch.","description":"Commit one UTF-8 file to an ACL-scoped branch.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"branchId":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"reason":{"type":"string","maxLength":500}},"required":["branchId","path","content"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"branchId":{"type":"string"},"branch":{"type":"string"},"commitSha":{"type":"string"},"path":{"type":"string"}},"required":["branchId","branch","commitSha","path"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/artifact-merge":{"post":{"operationId":"kb_artifact-merge","summary":"Merge an ACL-scoped branch into canonical main.","description":"Merge an ACL-scoped branch into canonical main.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"branchId":{"type":"string"},"reason":{"type":"string","maxLength":500}},"required":["branchId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"branchId":{"type":"string"},"branch":{"type":"string"},"commitSha":{"type":"string"},"changedItems":{"type":"array","items":{"type":"string"}}},"required":["branchId","branch","commitSha","changedItems"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/artifact-move":{"post":{"operationId":"kb_artifact-move","summary":"Move an item on an ACL-scoped branch.","description":"Move an item on an ACL-scoped branch.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"branchId":{"type":"string"},"itemId":{"type":"string"},"parentId":{"type":"string","nullable":true},"reason":{"type":"string","maxLength":500}},"required":["branchId","itemId","parentId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"branchId":{"type":"string"},"branch":{"type":"string"},"commitSha":{"type":"string"},"itemId":{"type":"string"},"path":{"type":"string"}},"required":["branchId","branch","commitSha","itemId","path"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/artifact-delete":{"post":{"operationId":"kb_artifact-delete","summary":"Delete an item on an ACL-scoped branch.","description":"Delete an item on an ACL-scoped branch.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"branchId":{"type":"string"},"itemId":{"type":"string"},"reason":{"type":"string","maxLength":500}},"required":["branchId","itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"branchId":{"type":"string"},"branch":{"type":"string"},"commitSha":{"type":"string"},"deletedItemIds":{"type":"array","items":{"type":"string"}}},"required":["branchId","branch","commitSha","deletedItemIds"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/share":{"post":{"operationId":"kb_share","summary":"Grant a permission on an item.","description":"Grant a permission on an item.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"principalType":{"type":"string","enum":["WORKSPACE","GROUP","USER","API_KEY"]},"role":{"type":"string","enum":["VIEWER","EDITOR","MAINTAINER","ADMIN"]},"userId":{"type":"string"},"groupId":{"type":"string"},"integrationKeyId":{"type":"string"}},"required":["itemId","principalType","role"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"grant":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string","nullable":true},"workspaceId":{"type":"string"},"groupId":{"type":"string","nullable":true},"itemId":{"type":"string"},"principalType":{"type":"string","enum":["WORKSPACE","GROUP","USER","API_KEY"]},"role":{"type":"string","enum":["ADMIN","VIEWER","EDITOR","MAINTAINER"]},"integrationKeyId":{"type":"string","nullable":true},"grantedById":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","userId","workspaceId","groupId","itemId","principalType","role","integrationKeyId","grantedById"]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"itemId":{"type":"string"}},"required":["grant","url","href","dashboardUrl","itemId"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/revoke-share":{"post":{"operationId":"kb_revoke-share","summary":"Revoke a permission grant.","description":"Revoke a permission grant.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"grantId":{"type":"string"}},"required":["itemId","grantId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false,true]},"url":{"type":"string"},"href":{"type":"string"},"dashboardUrl":{"type":"string"},"itemId":{"type":"string"}},"required":["ok","url","href","dashboardUrl","itemId"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/upload-image":{"post":{"operationId":"kb_upload-image","summary":"Upload an image (base64) and get an embeddable public URL.","description":"Upload an image (base64) and get an embeddable public URL.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"imageContentType":{"type":"string"},"imageBase64":{"type":"string"},"imageFilename":{"type":"string","maxLength":200}},"required":["itemId","imageContentType","imageBase64"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"imageId":{"type":"string"},"gcsPath":{"type":"string"},"publicUrl":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"number"},"description":{"type":"string"},"artifactCommitSha":{"type":"string","nullable":true},"artifactPath":{"type":"string","nullable":true}},"required":["imageId","gcsPath","publicUrl","contentType","sizeBytes","description"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/sign-image-upload":{"post":{"operationId":"kb_sign-image-upload","summary":"Get a presigned PUT URL for a client-side image upload.","description":"Get a presigned PUT URL for a client-side image upload.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"imageContentType":{"type":"string"},"imageFilename":{"type":"string","maxLength":200},"imageSizeBytes":{"type":"integer","minimum":0}},"required":["itemId","imageContentType"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"imageId":{"type":"string"},"gcsPath":{"type":"string"},"uploadUrl":{"type":"string"},"expiresAt":{"type":"string"},"publicUrl":{"type":"string"},"contentType":{"type":"string"}},"required":["imageId","gcsPath","uploadUrl","expiresAt","publicUrl","contentType"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/confirm-image-upload":{"post":{"operationId":"kb_confirm-image-upload","summary":"Finalize a presigned image PUT (downloads bytes + indexes).","description":"Finalize a presigned image PUT (downloads bytes + indexes).","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"imageId":{"type":"string"},"imageContentType":{"type":"string"}},"required":["itemId","imageId","imageContentType"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"imageId":{"type":"string"},"gcsPath":{"type":"string"},"publicUrl":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"number"},"description":{"type":"string"},"artifactCommitSha":{"type":"string","nullable":true},"artifactPath":{"type":"string","nullable":true}},"required":["imageId","gcsPath","publicUrl","contentType","sizeBytes","description"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/public-link-enable":{"post":{"operationId":"kb_public-link-enable","summary":"Publish a document's public /p/{slug} link.","description":"Publish a document's public /p/{slug} link.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"link":{"type":"object","properties":{"slug":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"enabledAt":{"type":"string","nullable":true},"enabledById":{"type":"string","nullable":true}},"required":["slug","path","url","enabledAt","enabledById"]}},"required":["link"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/kb/public-link-disable":{"post":{"operationId":"kb_public-link-disable","summary":"Disable a document's public link.","description":"Disable a document's public link.","tags":["kb"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"link":{"type":"object","properties":{"slug":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"enabledAt":{"type":"string","nullable":true},"enabledById":{"type":"string","nullable":true}},"required":["slug","path","url","enabledAt","enabledById"]}},"required":["link"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/workspace-assistant/run":{"post":{"operationId":"workspace-assistant_run","summary":"Run a bash script in the Workspace Assistant sandbox.","description":"Same just-bash environment, fetch-*/do-* commands, and /skills/*.md as the in-app assistant. Pass sessionId to persist /data across calls.","tags":["workspace-assistant"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"script":{"type":"string","minLength":1},"sessionId":{"type":"string"}},"required":["script"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"sessionId":{"type":"string","nullable":true},"exitCode":{"type":"number"},"stdout":{"type":"string"},"stderr":{"type":"string"},"navigateIntents":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["navigate"]},"href":{"type":"string"},"label":{"type":"string"}},"required":["kind","href","label"]}},"dataFiles":{"type":"array","items":{"type":"string"}},"snapshotReport":{"type":"string"},"dataSnapshotMaxBytes":{"type":"number"}},"required":["sessionId","exitCode","stdout","stderr","navigateIntents","dataFiles","snapshotReport","dataSnapshotMaxBytes"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/course-editor/run":{"post":{"operationId":"course-editor_run","summary":"Run a bash script against a course revision filesystem.","description":"Run a bash script against a course revision filesystem.","tags":["course-editor"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409."},"required":false,"description":"Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"script":{"type":"string","minLength":1},"sessionId":{"type":"string"}},"required":["courseId","script"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"text":{"type":"string"},"isError":{"type":"boolean","enum":[false,true]}},"required":["text"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency key is reused, in progress, or belongs to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/courses/view-image":{"post":{"operationId":"courses_view-image","summary":"Fetch a course image asset as base64 + metadata.","description":"Fetch a course image asset as base64 + metadata.","tags":["courses"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"courseId":{"type":"string"},"target":{"type":"string","minLength":1}},"required":["courseId","target"]}}}},"responses":{"200":{"description":"Command result.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"role":{"type":"string","enum":["thumbnail","slide-image","panel-image","cover-image","audio","generated-audio","music","video","generated-video","character-portrait","scene-image","reference-image","walkthrough-frame","read-inline-image","read-inline-video","item-media","brand-logo","lecture-outline","lecture-pdf","comic-outline","podcast-script","podcast-cover","jam-cover","jam-lyrics","video-script","video-transcript","video-thumbnail","explainer-source-media","chat-context"]},"path":{"type":"string"},"assetId":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"number"},"base64":{"type":"string"}},"required":["role","path","assetId","mediaType","bytes","base64"]}},"required":["success","data"]}}}},"400":{"description":"Malformed JSON request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid Connector credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Connector policy does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Input validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}